Unix command to find CPU Utilization
2019獨(dú)角獸企業(yè)重金招聘Python工程師標(biāo)準(zhǔn)>>>
http://www.cyberciti.biz/faq/unix-command-to-find-cpu-utilization/
Task:Watching system activity evolve i.e. reports CPU Utilization
# sar -u 12 5
Where,
- -u 12 5: Comparison of CPU utilization; 12 seconds apart; 5 times.
Output includes:
Task: You can watch CPU activity evolve for 10 minutes and save data
# sar -o file-name 60 10
Task: You can just sar and logout and let the report store in files
# nohup sar -A -o output-file 60 10 1>/dev/null 2>&1 &
Note to display data stored in output-file pass -f option to sar command:
# sar -f output-file
UNIX mpstat example
Type the following command to display per-processor statistics; 12 seconds apart; 5 times
# mpstat 12 5
You can also use traditional ps and top command:
# top
# ps -e -o pcpu -o pid -o user -o args
Read man pages of ps, top, mpstat and sar for more information.
轉(zhuǎn)載于:https://my.oschina.net/u/2308739/blog/761774
《新程序員》:云原生和全面數(shù)字化實(shí)踐50位技術(shù)專家共同創(chuàng)作,文字、視頻、音頻交互閱讀總結(jié)
以上是生活随笔為你收集整理的Unix command to find CPU Utilization的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: C#泛型对类型参数的推断
- 下一篇: js怎么获取访问页数记录(知道的能不能告