I'm trying to build a JAVA application that, among many other things, fetches a list of the system processes currently executing on the machine and their properties (CPU usage, memory, etc). As it is now I'm parsing the result of a command (like ps on UNIX) to find this information. However this seems to be rather ineficient, especially on *NIX systems that typically have over 100 processes executing at a time.
On Windows I'm using another
I've read somewhere (another forum) that JNI would be the best way to do this task... I think I understood what it was but can someone point me out where to start looking for it?
Or can someone suggest another alternative on how to do this?
I'm fully aware of the fact that whatever the solution, it will be very dependent on the Operating System. My design is prepared to deal with that so it's more of an hassle than a problem.
Any help is much appreciated and the points may be increased to reflect that appreciation.