I need to get the PID of a running Java process, in this case Glassfish 3 to see if it is running before I run some asadmin commands.
ps -ax | grep "java -cp /opt/bmam/glassfish" | grep -v "grep" | cut -d " " -f 1
26306
26306
I need to get the PID of a running Java process, in this case Glassfish 3 to see if it is running before I run some asadmin commands.