Query method with high Java CPU load

Source: Internet
Author: User

 

Symptom
1. Top
2. jconsole: Use jconsole-pluginpath $ java_home/demo/management/jtop. jar to start CPU usage: CPU usage, heap usage, thread usage, and memory usage (two stress tests ):
Process
1. in JPs-LV, locate the Java Process pid2. run the http_load-p 8-S 100 http_load_command.txt command to perform the stress test 3.top-H (or SHIFT + h after startup), and switch to display top in thread mode, find the top thread ID 4. jstack pid>/tmp/a, export the stack 5. convert the thread ID to hexadecimal: Echo 'obase = 16; decimal number to be converted '| BC 6.cat/tmp/A | grep-a 20-B 10 "hexadecimal number", view the stack to see the method stack currently being executed
Tools
  • Flowchart of querying the stack of the highest CPU usage thread in JVM

 

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.