First understanding of JVM-thread running diagnosis-too much CPU usage

Signature: But do good deeds, don't ask about the future.

Article directory


foreword

Record the basic steps to learn the high CPU usage of the process in jvm.


  1. Use top to locate which process occupies too much CPU, and find the process number (PID)
  2. ps H -eo pid,tid,%cpu | grep process id (Use the ps command to further locate which thread caused the high CPU usage)
  3. The jstack process id can view the execution status of each thread under the process (find the thread number that really uses a higher CPU)
  4. Then convert the problematic thread number (decimal) into (hexadecimal), and further locate the source code line number of the problem code.

Summarize

The blog mainly records the basic steps of learning that the process in jvm occupies too much CPU. Please correct me if there are any mistakes or deficiencies. If it is helpful to you, please click three times.

おすすめ

転載: blog.csdn.net/YangCunle/article/details/129794946