017-Top命令

Top 命令能夠 top -bn1 讓當前狀態靜態顯示,並能夠應用在shell 腳本python

[root@Carlton ~]# top
top - 15:47:00 up  5:54,  2 users,  load average: 0.00, 0.00, 0.00
Tasks: 141 total,   1 running, 140 sleeping,   0 stopped,   0 zombie
Cpu0  :  1.7%us,  0.7%sy,  0.0%ni, 97.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1019988k total,   866956k used,   153032k free,    66932k buffers
Swap:        0k total,        0k used,        0k free,   266180k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                                                       
 2586 carlton   20   0 2099m 221m  63m S  0.3 22.2   4:56.56 firefox                                                                                                                                                                       
 2670 carlton   20   0 1912m 192m  55m S  1.3 19.4  10:30.72 Web Content                                                                                                                                                                   
 2111 root      20   0  183m  35m  16m S  0.3  3.5   0:12.90 Xorg                                                                                                                                                                          
 2580 carlton   20   0  333m  23m  11m S  0.0  2.4   0:00.39 python

技巧1:Shift +M  按照內存使用狀況排序shell

技巧2:按住1 查看各個CPU的使用狀況firefox

相關文章
相關標籤/搜索