当前位置:网站首页>cpu飙升排查方法
cpu飙升排查方法
2022-07-03 14:41:00 【一一可可】
1先来一段飙升代码
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 、将程序打成jar包 t1.jar
3 、放到linux服务器上运行jar包方法
java -cp t1.jar test1.FindJavaThreadInTaskManager
4、找到CPU利用率持续比较高的进程,获取进程号,此处PID为5735

5、top -Hp 5735

6、将pid转成16进制
printf %x 5747 =======》1673
7、查看当前线程的堆栈信息
./jstack 5735 |grep -A 200 1673

边栏推荐
- Paper sharing: generating playful palettes from images
- Time conversion ()
- 2021-10-16 initial programming
- Special research report on the market of lithium battery electrolyte industry in China (2022 Edition)
- [combinatorics] permutation and combination (set combination, one-to-one correspondence model analysis example)
- 7-10 stack of hats (25 points) (C language solution)
- Awvs batch operation script
- Luogu p5194 [usaco05dec]scales s solution
- Stop asking yourself if you are suitable for software testing
- Puzzle (016.3) is inextricably linked
猜你喜欢

How to color ordinary landscape photos, PS tutorial

分布式事务(Seata) 四大模式详解

分布式事务(Seata) 四大模式详解

Niuke: crossing the river

How to query the baby category of tmall on Taobao

Dllexport et dllimport

Tonybot humanoid robot infrared remote control play 0630

pyQt界面制作(登录+跳转页面)

提高效率 Or 增加成本,开发人员应如何理解结对编程?

dllexport和dllimport
随机推荐
Déformation de la chaîne bm83 de niuke (conversion de cas, inversion de chaîne, remplacement de chaîne)
[qingniaochangping campus of Peking University] in the Internet industry, which positions are more popular as they get older?
Zzuli:1044 failure rate
The picture quality has been improved! LR enhancement details_ Lightroom turns on AI photo detail enhancement: picture clarity increases by 30%
ConstraintLayout 的使用
Understand the application scenario and implementation mechanism of differential segment
Creation of data table of Doris' learning notes
DDK for XP
Special research report on the market of lithium battery electrolyte industry in China (2022 Edition)
adc128s022 ADC verilog设计实现
Detailed explanation of four modes of distributed transaction (Seata)
tonybot 人形机器人 首次开机 0630
Zzuli:1046 product of odd numbers
Code writing and playing method of tonybot humanoid robot at fixed distance
Adobe Premiere Pro 15.4 has been released. It natively supports Apple M1 and adds the function of speech to text
Showmebug entered Tencent conference, opening the era of professional technical interview
牛客 BM83 字符串变形(大小写转换,字符串反转,字符串替换)
天谋科技 Timecho 完成近亿元人民币天使轮融资,打造工业物联网原生时序数据库
Ultra simple mobile map development
[opengl] geometry shader