当前位置:网站首页>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
边栏推荐
- NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
- PS tips - draw green earth with a brush
- 数学常数表 by q779
- tonybot 人形机器人 首次开机 0630
- Sword finger offer 28 Symmetric binary tree
- 分布式事务(Seata) 四大模式详解
- FPGA blocking assignment and non blocking assignment
- Tailing rushes to the scientific and Technological Innovation Board: it plans to raise 1.3 billion, and Xiaomi Changjiang is the shareholder
- Container of symfony
- Zhejiang University Edition "C language programming (4th Edition)" topic set reference ideas set
猜你喜欢
【北大青鸟昌平校区】互联网行业中,哪些岗位越老越吃香?
MySQL multi table query subquery
On MEM series functions of C language
Rasterization: a practical implementation (2)
Tonybot humanoid robot checks the port and corresponds to port 0701
Tonybot humanoid robot starts for the first time 0630
提高效率 Or 增加成本,开发人员应如何理解结对编程?
Code writing and playing method of tonybot humanoid robot at fixed distance
Qt development - scrolling digital selector commonly used in embedded system
556. The next larger element III
随机推荐
Stop asking yourself if you are suitable for software testing
牛客 BM83 字符串变形(大小写转换,字符串反转,字符串替换)
Zzuli:1055 rabbit reproduction
[opengl] pre bake using computational shaders
Dllexport and dllimport
Zhonggan micro sprint technology innovation board: annual revenue of 240million, net loss of 17.82 million, proposed to raise 600million
J-luggage lock of ICPC Shenyang station in 2021 regional games (simple code)
Zzuli:1047 logarithmic table
Solve the problem that PR cannot be installed on win10 system. Pr2021 version -premiere Pro 2021 official Chinese version installation tutorial
Understand the application scenario and implementation mechanism of differential segment
从书本《皮囊》摘录的几个句子
Qt—绘制其他东西
Zzuli:1048 factorial table
【7.3】146. LRU caching mechanism
Amazon, express, lazada, shopee, eBay, wish, Wal Mart, Alibaba international, meikeduo and other cross-border e-commerce platforms evaluate how Ziyang account can seize traffic by using products in th
Dllexport et dllimport
Code writing and playing method of tonybot humanoid robot at fixed distance
Rasterization: a practical implementation (2)
Tonybot humanoid robot infrared remote control play 0630
Accelerating strategy learning using parallel differentiable simulation