If the Java program consumes more resources and is unstable, it can use its own VISUALVM tool for monitoring and performance analysis, and can also generate snapshots for further analysis based on the application snapshot functionality it provides. The procedure is as follows:
1. Execute the "JVISUALVM" command under the CMD console or Linux terminal of Windows to enter the Java VISUALVM Workbench.
2. Double-click the left tree process menu to see how this process works. Also right-click on the application snapshot generation for offline further analysis. (How to know the Java program corresponding to the process ID, see this post: http://blog.csdn.net/johnnysun2015/article/details/45644703)
Other
If the Java program goes down, you need to collect the JVM memory dump file for further analysis, please refer to this blog post: http://blog.csdn.net/johnnysun2015/article/details/45310027
Java Program performance analysis and monitoring using Java VISUALVM in Windows/linux environment