当前位置:网站首页>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

边栏推荐
- Analysis of gene family characteristics - chromosome location analysis
- Adobe Premiere Pro 15.4 has been released. It natively supports Apple M1 and adds the function of speech to text
- 【7.3】146. LRU缓存机制
- ConstraintLayout 的使用
- retrofit
- Zzuli:1048 factorial table
- puzzle(016.3)千丝万缕
- C language dup2 function
- Etcd cluster permission management and account password usage
- Paper sharing: generating playful palettes from images
猜你喜欢

Accelerating strategy learning using parallel differentiable simulation

Puzzle (016.3) is inextricably linked

Programming language: the essence of type system

The picture quality has been improved! LR enhancement details_ Lightroom turns on AI photo detail enhancement: picture clarity increases by 30%

How to color ordinary landscape photos, PS tutorial

Dllexport et dllimport

亚马逊、速卖通、Lazada、Shopee、eBay、wish、沃尔玛、阿里国际、美客多等跨境电商平台,测评自养号该如何利用产品上新期抓住流量?

天谋科技 Timecho 完成近亿元人民币天使轮融资,打造工业物联网原生时序数据库

Why is this error reported when modifying records in the database

Sub-GHz无线解决方案Z-Wave 800 系列ZG23 soc和ZGM230S模块
随机推荐
Puzzle (016.4) domino effect
Zzuli:1052 sum of sequence 4
Common commands for getting started with mongodb database
Zzuli:1057 prime number determination
洛谷P5018 [NOIP2018 普及组] 对称二叉树 题解
Optical cat super account password and broadband account password acquisition
Mongodb index
Bibit pharmaceutical rushed to the scientific innovation board: annual revenue of 970000, loss of 137million, proposed to raise 2billion
[combinatorics] permutation and combination (set combination, one-to-one correspondence model analysis example)
556. The next larger element III
How to color ordinary landscape photos, PS tutorial
Sendmail can't send mail and it's too slow to send. Solve it
Implement Gobang with C language
Zzuli: cumulative sum of 1050 factorials
论文分享:Generating Playful Palettes from Images
Zzuli:1041 sum of sequence 2
7-1 positive integer a+b (15 points)
Dllexport and dllimport
Tailing rushes to the scientific and Technological Innovation Board: it plans to raise 1.3 billion, and Xiaomi Changjiang is the shareholder
Add ZABBIX calculation type itemcalculated items