Workaround for Java program that causes CPU utilization 100%

Source: Internet
Author: User

1) First use top to find out which thread occupies the CPU

#top

View the process number for CPU 100%, such as process number 16459


#top-H-P 16459


And then see which PID is higher to find the PID 100% CPU


PID USER PR NI VIRT RES SHR S%cpu%MEM time+ COMMAND

16539 Root 0 1673m 525m 10m R 98.9 13.3 6:36.83 java

16462 Root 0 1673m 525m 10m S 1.0 13.3 0:04.07 java

16463 Root 0 1673m 525m 10m S 1.0 13.3 0:04.06 java


It's 16539 from here.


# jstack-f 16539 >/root/cpu_100.txt


View Cpu_100.txt This line of Thread 16539: (state = In_java) can see the problem.


Workaround for Java program that causes CPU utilization 100%

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.