ps -ef | grep java
when working with Java in Unix or Linux.The snapshot below (click on image to see larger version) shows some of the basic options of
jps
in action.One use of the
jps
command 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 jps -lm
.
3 comments:
Hi,
Can you hazard a guess as to what "feature" of Windows 2003 would prevent jps from viewing processes that both Windows XP (and linux)
can view?
Thanks,
Henry
There are a few possibilities that commonly cause Windows users trouble. One possibility has to do with the default Windows temporary directory being on a FAT type system. You can find discussion about work-around of this issue in the jvmstat FAQ. Another common obstacle for Windows users of jps is inappropriate permissions settings in the temp directory. I specifically discuss this issue and its fix in the blog post Making jps and jconsole Work with Java SE 6 on Windows Vista.
Thanks for response. My particular case was that of not disabling the ssl on the jmxremote. This allowed the remote jconsole to connect.
Post a Comment