top使用方法总结

 进入top后

按P    以 CPU 占用率大小的顺序排列进程列表

按M   以内存占用率大小的顺序排列进程列表

 

1. top命令后,输入数组1可以查看各逻辑CPU的使用情况, 也是一种查看有多少CPU的方法。

 其中id表示空闲的CPU百分比,可用来查看系统资源是否不足

CPU各字段说明:

us:user cpu time (or) % CPU time spent in user space
sy:system cpu time (or) % CPU time spent in kernel space
ni :user nice cpu time (or) % CPU time spent on low priority processes
id :idle cpu time (or) % CPU time spent idle
wa :io wait cpu time (or) % CPU time spent in wait (on disk)
hi :hardware irq (or) % CPU time spent servicing/handling hardware interrupts
si :software irq (or) % CPU time spent servicing/handling software interrupts
st :steal time - - % CPU time in involuntary wait by virtual cpu while hypervisor is servicing another processor (or) % CPU time stolen from a virtual machine

 

 

2. 使用top命令后,按f, 可以选择相关参数,按d标示 是否显示,按q标示退出

下例中,我在默认显示的基础上添加了PPID, UID(使用字母d或者空格键来添加或删除显示项)

 

posted @ 2021-09-13 10:34  坚强的小蚂蚁  阅读(701)  评论(0编辑  收藏  举报