当前位置:网站首页>Troubleshooting method of CPU surge
Troubleshooting method of CPU surge
2022-07-03 14:53:00 【-- cocoa】
1 Let's start with a soaring code
public class FindJavaThreadInTaskManager {
public static void main(String[] args) {
Thread thread = new Thread(new Worker());
thread.start();
}
static class Worker implements Runnable {
@Override
public void run() {
while (true) {
System.out.println("Thread Name:" + Thread.currentThread().getName());
}
}
}
}
2 、 Type the program as jar package t1.jar
3 、 Put it in linux Running on the server jar Package method
java -cp t1.jar test1.FindJavaThreadInTaskManager
4、 find CPU The process with high utilization rate , Get process number , here PID by 5735

5、top -Hp 5735

6、 take pid Turn into 16 Base number
printf %x 5747 =======》1673
7、 View the stack information of the current thread
./jstack 5735 |grep -A 200 1673

边栏推荐
- [engine development] rendering architecture and advanced graphics programming
- Dllexport et dllimport
- 【7.3】146. LRU caching mechanism
- 1017 a divided by B (20 points)
- Luogu p5018 [noip2018 popularization group] symmetric binary tree problem solution
- Bucket sorting in C language
- 4-33--4-35
- Tonybot Humanoïde Robot Infrared Remote play 0630
- Detailed explanation of four modes of distributed transaction (Seata)
- Piwigo 2.7.1 sqli learning
猜你喜欢

Byte practice surface longitude

链表有环,快慢指针走3步可以吗

Talking about part of data storage in C language

5.4-5.5

Code writing and playing method of tonybot humanoid robot at fixed distance

Rasterization: a practical implementation (2)

B2020 分糖果

Creation of data table of Doris' learning notes

Vs+qt application development, set software icon icon

ASTC texture compression (adaptive scalable texture compression)
随机推荐
Timecho of Tianmou technology completed an angel round financing of nearly 100 million yuan to create a native timing database of the industrial Internet of things
There are links in the linked list. Can you walk three steps faster or slower
Detailed explanation of four modes of distributed transaction (Seata)
QT program font becomes larger on computers with different resolutions, overflowing controls
[ue4] material and shader permutation
QT - draw something else
Simulation of LS -al command in C language
亚马逊、速卖通、Lazada、Shopee、eBay、wish、沃尔玛、阿里国际、美客多等跨境电商平台,测评自养号该如何利用产品上新期抓住流量?
链表有环,快慢指针走3步可以吗
零拷贝底层剖析
tonybot 人形机器人 首次开机 0630
My QT learning path -- how qdatetimeedit is empty
5.2-5.3
[ue4] geometry drawing pipeline
Vs+qt application development, set software icon icon
Zzuli:1040 sum of sequence 1
C language to realize mine sweeping
2022/02/14
Luogu p5018 [noip2018 popularization group] symmetric binary tree problem solution
7-1 positive integer a+b (15 points)