I have a number of Java programs that must be active for my system to work, but I can't figure out an easy way to monitor if a specific Java program is running or not. Can somebody help me? Thanks in advance.
Inicio del debate
GunnarHovmark · 27 sept 2011, 14:53 · 4 mensajes · 64 visitas
I have a number of Java programs that must be active for my system to work, but I can't figure out an easy way to monitor if a specific Java program is running or not. Can somebody help me? Thanks in advance.
Hi GunnarHovmark, If your OS is linux you can do with the next module:
module_exec ps -Af | grep process_name | grep -v "grep" | wc -l
in windows i guess that you can do it but i don't know. thanks
I guess the most similar thing to that in Windows would be to check what processes I have running, but there I can only see if Java is running or not. I can't figure out a way (at least not an easy way) to see what's running inside the Java virtual machine.
I use jps in linux to know wich jvm I want to monitor... I think this could work in windows too: http://download.oracle.com/javase/1.5.0/docs/tooldocs/share/jps.html I hope this helps. Regards.
Entra en tu cuenta para publicar.