Monitoring Windows processes from Java

Discussions

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?

    TIA.

    Saby.
  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.

    Joe
  3. Try Windows Management Instrumentation
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/scripting_api_for_wmi.asp

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

    For more info
    http://manageengine.adventnet.com/products/applications_manager/windows-monitoring.html

    http://manageengine.adventnet.com/products/applications_manager/help/monitors/system-resource-monitoring.html

    The product is free to monitor upto 10 windows machines

    --Yoge