基于进程的命令方式查看:
`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,讲解各种工具]
本文详细介绍了如何使用基于进程的命令来查看进程的CPU利用率、内存使用百分比及线程数等关键信息。并通过对比`ps`与`top`命令的区别,帮助读者更好地理解实时与累计资源消耗的概念。
1031

被折叠的 条评论
为什么被折叠?



