[LINUX使用] top 命令的使用

COLUMNS=150 LINES=100 top

序号

是否为启动命令

命令模板

详解

1

no

vh

帮助

2

yes

-d 0.01

0.01秒的间隔刷新top输出

3

no

c

COMMAND列切换

4

yes

-e [k | m | g | t | p]

 

以何种计量单位显示内存列

k-kb,m-mb,g-gb,t-tb

5

yes

-i

不显示idel状态的进程,即不占cpu的进程不会显示出来

6

yes

-o [field name]

启动就按照某个字段进行排序,不如 -o %CPU表示启动就以 cpu 使用率排序

7

yes

-O

列出 -o 选项所有可以使用的值

8

yes

-p [N1, N2...]

 

跟踪某些进程号的进程,逗号隔开

非启动命令u取消此命令的筛选效果

9

yes

-1 / -2 / -3 / -4 / ...

跟踪具体某个CPU,不常用

10

no

k

向某个进程号的进程发送 signal , 按k后会要求先输入进程号,再要求输出信号值

11

no

M / N / T / P

按照 内存/PID/运行时间/CPU使用率 排序

12

yes

-u [username]

只罗列某个用户创建的进程

13

no

t

切换cpu统计显示的格式

 

no

m

切换内存统计显示的格式

yes

-n

只刷新n次就退出,用处不大

no

r

改变某个进程的nice值

no

o

对当前输出增加过滤条件,比如 %CPU>90.0 只显示所有CPU 大于 90%的进程。与-O配合使用

 

no

f

自定义输出内容,上下focus到条目上,d用来改变是否显示,右抓起条目再通过上下来调整显示在哪一列,左来释放抓起状态从而将指定列安插到目标位置。

每一列的解释:

PID (Process Identification) - The process ID assigned to each task. This is assigned a unique number which is not assigned in numerical order, so it is normal to what appears to be a random selection of numbers.

PPID (Parent Process Identification) - PIDs can share a single PPID. A single process can create several child processes. Typically a PPID of 1 will be seen within this column however other values will be seen depending on the parent process which it was derived from. This also indicates that the process was derived from the Init process which is also referred to the grandfarther process. The PID is unique whereas the PPID can be a duplicate value.

USER - The process or task in which user it was created under. Since EXOS runs on a Linux platform, the root user is used within the core background.

STAT (State) - Represent the state of the process/task running. The state flags include:

S - sleeping

D - uninterruptible sleep

R - running

W - swapped out process

Z - zombies

T - stopped or traced

N - process with positive nice value

< - process with negative nice value

 

RSS (Resident Set Size) - The amount of memory total used for the task/process used. This statistical information is also show in further detail within the command show memory process .

当前使用的物理内存

%MEM - The share of physical memory in percentage being used by the process/task.

使用的物理内存占使用的虚拟内存的百分之几

CPU - The physical processor being used. This can be represented by CPU0 or CPU1 depending on the CPU architecture type.

%CPU - The total CPU percentage in which is being used by the CPU. This is typical used to identify problematic process/tasks that could be overutilize the CPU.

你可能感兴趣的:(#,Linux,使用,linux,服务器,运维)