|
From: Mirko P. <m.p...@gm...> - 2011-03-13 19:28:48
|
Hi,
have a look at the sigar commandline tool
java -jar sigar-1.6.4.jar pinfo
You will get some information about processes, e.g.
cpu={LastTime=627591, StartTime=1300044278000, Percent=0.0, Sys=30, User=250, Total=280}
I think this is the class you are after
http://www.hyperic.com/support/docs/sigar/org/hyperic/sigar/ProcTime.html
And an example how to use it
https://github.com/hyperic/sigar/blob/master/bindings/java/src/org/hyperic/sigar/cmd/ProcInfo.java
Hope this helps,
Mirko
|