当前位置:网站首页>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
边栏推荐
- Talking about part of data storage in C language
- [graphics] efficient target deformation animation based on OpenGL es 3.0
- Zzuli:1055 rabbit reproduction
- How to query the baby category of tmall on Taobao
- PHP GD image upload bypass
- Creation of data table of Doris' learning notes
- ConstraintLayout 的使用
- Zzuli:1044 failure rate
- Zhejiang University Edition "C language programming (4th Edition)" topic set reference ideas set
- My QT learning path -- how qdatetimeedit is empty
猜你喜欢
MySQL multi table query subquery
天谋科技 Timecho 完成近亿元人民币天使轮融资,打造工业物联网原生时序数据库
创业团队如何落地敏捷测试,提升质量效能?丨声网开发者创业讲堂 Vol.03
分布式事务(Seata) 四大模式详解
ConstraintLayout 的使用
表单文本框的使用(一) 选择文本
Tailing rushes to the scientific and Technological Innovation Board: it plans to raise 1.3 billion, and Xiaomi Changjiang is the shareholder
tonybot 人形機器人 紅外遙控玩法 0630
To improve efficiency or increase costs, how should developers understand pair programming?
retrofit
随机推荐
Joomla! CMS 3.0~3.4.6 RCE
Luogu p3065 [usaco12dec]first! G problem solution
Container of symfony
Zzuli:1040 sum of sequence 1
On MEM series functions of C language
C language dup2 function
puzzle(016.3)千丝万缕
Zzuli:1055 rabbit reproduction
China PETG market forecast and Strategic Research Report (2022 Edition)
牛客 BM83 字符串變形(大小寫轉換,字符串反轉,字符串替換)
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
Zhejiang University Edition "C language programming (4th Edition)" topic set reference ideas set
tonybot 人形机器人 查看端口并对应端口 0701
Four data flows and cases of grpc
Understand the application scenario and implementation mechanism of differential segment
Detailed explanation of four modes of distributed transaction (Seata)
7-1 positive integer a+b (15 points)
数学常数表 by q779
Time conversion ()
Frequently asked questions: PHP LDAP_ add(): Add: Undefined attribute type in