What is the right command line to get cpu usage for certain process in java

拥有回忆 提交于 2019-12-23 18:23:17

问题


Given a process ID, what is the right command to get the current cpu usage from the process, in Java.

The command typeperf "\Memory\Available bytes" "\processor(_total)\% processor time" is not for a specific process, and any 3rd party utility is not a option, ProcDump alike. Thanks for any pointers!


回答1:


Try http://support.hyperic.com/display/SIGAR/Home

Otherwise look at How can a Java program get its own process ID?



来源:https://stackoverflow.com/questions/7359245/what-is-the-right-command-line-to-get-cpu-usage-for-certain-process-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!