View Java Process ID method under Windows/linux environment

Source: Internet
Author: User

If you start multiple Java programs, and because all Java programs run in the JVM, the process Manager will have multiple java.exe, but how do you determine if a Java program corresponds to Java.exe in the process?


You can use the Java VISUALVM tool to implement the "JVISUALVM" command on the Windows CMD Console or Linux terminal to enter the Java VISUALVM Workbench.

Mouse double-click on the left side of the tree process list of a process (PID is the process id), in the lower right of the pop-up window, click on the "System Properties" tab, drag down the scroll bar to the bottom, view the "User.dir" parameter, you can see the location of the program, the Java program specific process ID.


Other

For Linux, you can use the JPS command to filter based on known special configurations or characters in the service, such as a service with the XMS parameter configured as "7168m", using the following command to get the process ID for this service:

JPS  -v|grep  7168


View Java Process ID method under Windows/linux environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.