top命令:用于动态地监视进程活动与系统负载等信息
top - 23:27:36 up 30 min, 0 users, load average: 0.52, 0.58, 0.59
Tasks: 6 total, 1 running, 5 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.1 us, 1.1 sy, 0.0 ni, 98.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 16251.8 total, 6330.6 free, 9697.3 used, 224.0 buff/cache
MiB Swap: 25600.0 total, 25440.0 free, 160.0 used. 6423.9 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 8944 336 292 S 0.0 0.0 0:00.10 init
8 root 20 0 8944 232 188 S 0.0 0.0 0:00.00 init
9 simon 20 0 18096 3616 3496 S 0.0 0.0 0:00.07 bash
73 root 20 0 18920 2892 2796 S 0.0 0.0 0:00.01 sudo
74 root 20 0 17144 2596 2496 S 0.0 0.0 0:01.25 bash
87 root 20 0 18904 2180 1520 R 0.0 0.0 0:00.04 top
top命令执行结果的前5行为系统整体的统计信息,其所代表的含义如下:
- 第1行:系统时间、运行时间、登录终端数、系统负载(三个数值分别是1分钟、5分钟、15分钟内的平均值,数值越小意味着负载越低)。
- 第2行:进程总数、运行中的进程数、睡眠中的进程数、停止的进程数、僵死的进程数。
- 第3行:用户占用资源百分比、系统内核占用资源百分比、改变过优先级的进程资源百分比、空闲的资源百分比等。