基于进程的命令方式查看:
`ps -o pcpu,pmem,nlwp -p $PID`
#(pmem = % mem usage and nlwp is number of threads)
其中pcpu定义是:cpu utilization of the process in “##.#” format. It is the CPU time used divided by the time the process has been running (cputime/realtime ratio), expressed as a percentage. pcpu gives me the % CPU utilization for the process for the lifetime of the process.
区别于实时检测的top命令(CPU utilization of the process since the last update)
下面是找到的一些参考文章:
Performance Monitoring Tools for Linux[解释很清晰的一篇文章]
/proc/stat explained
vmstat命令
Performance Management Guide [AIX,讲解各种工具]