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或者空格鍵來添加或刪除顯示項)