top使用方法总结


 

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或者空格键来添加或删除显示项)

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM