Monitoring Windows processes from Java


General J2EE: Monitoring Windows processes from Java

  1. Greetings All,
      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?


  2. Hi Saby,

    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.

  3. Try Windows Management Instrumentation

    You will need to use JNI.
  4. Applications Manager supports monitoring process running in a remote Windows machine

    For more info

    The product is free to monitor upto 10 windows machines