Java web application consumes CPU on server

Java programs consume a lot of CPU and are easier to analyze. There are several steps:1. View threads with high 
through the top command (press shift+H after top to display threads) ;
2. Convert the thread number to hexadecimal;
3. Use jps to view the Java process number of the server;
4. Use jstack [process number] to print the current process stack;
5. From the printed information, find the thread number obtained in step 2 and see what this thread is doing.
You may not be able to grasp the thread status at one time. You can record several more threads in the first step.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326554038&siteId=291194637