centos 7 显示系统执行的进程
命令:ps -aux
ps -aux | more USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.2 191160 4228 ? Ss 22:49 0:01 /usr/lib/systemd/systemd --switched-root --system --deserialize 22 root 2 0.0 0.0 0 0 ? S 22:49 0:00 [kthreadd] root 3 0.0 0.0 0 0 ? S 22:49 0:00 [ksoftirqd/0] root 5 0.0 0.0 0 0 ? S< 22:49 0:00 [kworker/0:0H] root 7 0.0 0.0 0 0 ? S 22:49 0:00 [migration/0] root 8 0.0 0.0 0 0 ? S 22:49 0:00 [rcu_bh] root 9 0.0 0.0 0 0 ? S 22:49 0:00 [rcu_sched] root 10 0.0 0.0 0 0 ? S< 22:49 0:00 [lru-add-drain] root 11 0.0 0.0 0 0 ? S 22:49 0:00 [watchdog/0] root 12 0.0 0.0 0 0 ? S 22:49 0:00 [watchdog/1] root 13 0.0 0.0 0 0 ? S 22:49 0:00 [migration/1] root 14 0.0 0.0 0 0 ? S 22:49 0:00 [ksoftirqd/1] root 15 0.0 0.0 0 0 ? S 22:49 0:00 [kworker/1:0] root 16 0.0 0.0 0 0 ? S< 22:49 0:00 [kworker/1:0H] root 17 0.0 0.0 0 0 ? S 22:49 0:00 [watchdog/2] root 18 0.0 0.0 0 0 ? S 22:49 0:00 [migration/2] root 19 0.0 0.0 0 0 ? S 22:49 0:00 [ksoftirqd/2] root 21 0.0 0.0 0 0 ? S< 22:49 0:00 [kworker/2:0H] root 22 0.0 0.0 0 0 ? S 22:49 0:00 [watchdog/3] root 23 0.0 0.0 0 0 ? S 22:49 0:00 [migration/3] root 24 0.0 0.0 0 0 ? S 22:49 0:00 [ksoftirqd/3] root 26 0.0 0.0 0 0 ? S< 22:49 0:00 [kworker/3:0H] root 28 0.0 0.0 0 0 ? S 22:49 0:00 [kdevtmpfs]
指令说明 System V 展示风格
USER:用户名称
PID:进程号
%CPU:进程占用 CPU 的百分比
%MEM:进程占用物理内存的百分比
VSZ:进程占用的虚拟内存大小(单位:KB)
RSS:进程占用的物理内存大小(单位:KB)
TTY:终端名称,缩写 .
STAT:进程状态,其中 S-睡眠,s-表示该进程是会话的先导进程,N-表示进程拥有比普通优先级 更低的优先级,R-正在运行,D-短期等待,Z-僵死进程,T-被跟踪或者被停止等等
STARTED:进程的启动时间
TIME:CPU 时间,即进程使用 CPU 的总时间
COMMAND:启动进程所用的命令和参数,如果过长会被截断显示
进程状态stat 表示含义
D 不可中断睡眠 (通常是在IO操作) 收到信号不唤醒和不可运行, 进程必须等待直到有中断发生
R 正在运行或可运行(在运行队列排队中)
S 可中断睡眠 (休眠中, 受阻, 在等待某个条件的形成或接受到信号)
T 已停止的 进程收到SIGSTOP, SIGSTP, SIGTIN, SIGTOU信号后停止运行
W 正在换页(2.6.内核之前有效)
X 死进程 (未开启)
Z 僵尸进程 进程已终止, 但进程描述符存在, 直到父进程调用wait4()系统调用后释放BSD风格的
< 高优先级(not nice to other users)
N 低优先级(nice to other users)
L 页面锁定在内存(实时和定制的IO)
s 一个信息头
l 多线程(使用 CLONE_THREAD,像NPTL的pthreads的那样)
+ 在前台进程组
仅供学习交流