This content has been marked as final. Show 7 replies
idan72 wrote:From within the application, or from another application? Many operating systems has tools that can give you cpu usage.
I have application that run on different operation system (Windows,Linux,Solaris).
I need to get the cpu and memory usage for the process.
I am using Java1.6 .
How can I find the cpu usage for the process ?
can I run the jconsole programaly and get the info it collect ?
idan72 wrote:For any random non-VM process? I don't think you can
How can I find with JMX the values of process cpu usage
and overall cpu usage for windows alsoI don't think you can.
You'll need to use OS-specific libraries for that (probably via JNI/JNA). I'm sure there are existing third-party libraries for this.