top command skills

top

After the terminal performs top Commands can also be followed by a number of options, such as top -p 1 monitor only the init process, top -u root display only run as root processes, etc.], you can tap the following buttons, different functions:

1 (number 1): List all the individual CPU load

z:top显示颜色
P[大写]:按CPU占用高低顺序列出程序
M[大写]:按内存占用高低顺序列出程序
x:类似高亮显示,在z显示模式下效果才会更明显

Swap top show utilization, after the top command f key press, and then press the p key, Enter to see the state after the Swap

d: top default refresh time is 3s, using the d key can customize refresh time

top of the page up and down a similar manner:

shift <next page

shift page> on

top by default sort cpu usage, which also can be modified, according to F (uppercase) to select the appropriate sort after any key to exit

c:显示进程命令的全路径与参数
f:可以指定top显示的内容,如ppid、swap等都可以选择显示
k:输入k之后可以kill掉指定的进程
A:分类显示各种系统资源高的进程。可用于快速识别系统上的性能要求极高的任务,推荐使用
h:获取top的命令帮助
H:显示线程,默认只显示进程
W[大写]:将当前设置写入~/.toprc文件中。这是写top配置文件的推荐方法

Reproduced in: https: //my.oschina.net/suveng/blog/3058705

Guess you like

Origin blog.csdn.net/weixin_34137799/article/details/91858047