ps -ef | grep javawhen working with Java in Unix or Linux.
The snapshot below (click on image to see larger version) shows some of the basic options of
One use of the
jpscommand is in conjunction with the handy JConsole tool to identify the PID of the JVM for to which JConsole should be run against. The document Using JConsole - Java SE Monitoring and Management Guide explains that the ps commands can be used with Linux or Unix systems and that the Task Manager can be used in Windows. However, it points out that jps can be used on all of these operating systems. This universal nature of the jps command makes it very attractive. Not only can it be used on all of these operating systems, but it provides useful output. I especially like the output from the command