General J2EE: Monitoring Windows processes from Java
- Posted by: sabyasachi chakravarty
- Posted on: May 31 2004 12:18 EDT
This mail is slightly out of the J2EE context. I am want to write a custom Java monitoring agent for applications/processes running on windows. I need stuff like PID, memory usage (basically the Task Manager stuff)Is there an available API for that? Or do I need to write custom JNI code to access the same through Win32 libraries?
There is no pure Java library that I know of to do that stuff. There probably isn't one, since that would kill the "Write Once, Run Anywhere" philosophy of Java, right?
So yes, you'll have to use JNI. The good news is, however, that the Windows API calls to get information about running processes is pretty straightforward.
Try Windows Management Instrumentation
You will need to use JNI.
Applications Manager supports monitoring process running in a remote Windows machine
For more info
The product is free to monitor upto 10 windows machines