当前位置:网站首页>CPU surge problem location
CPU surge problem location
2022-06-09 03:43:00 【seven billion two hundred and fifty-eight million two hundred a】
Catalog
CPU Soaring problem positioning
happen CPU The situation of soaring can be jstack Command positioning problem ,jstack + pid Look for deadlocks .
Test code
package com.aword.demo.jvm;
public class CPUDemo {
public int compute() {
int a = 1;
int b = 2;
int c = (a + b) * 10;
return c;
}
public static void main(String[] args) {
CPUDemo cpuDemo = new CPUDemo();
while (true) {
cpuDemo.compute();
}
}
}
Compile the class to CPUDemo.class Put the file in the local virtual machine
Carry out orders java com.aword.demo.jvm.CPUDemo
Start to check the progress
top

Check the memory of the process
top -p pid

Press H , Get the details of each thread .
find CPU The highest thread occupied tid, To 16 Base number .
printf %x tid

perform jstack Get the thread stack information after the line 10 That's ok , You can see from the stack what causes cpu Skyrocketing call method .
jstack pid | grep -A 10 Hexadecimal tid

Check the corresponding stack information to find out the code that may have problems
This article is for study and exchange only , Deletion of infringement contact .
边栏推荐
- GC日志分析
- CPU飙升问题定位
- 一文搞懂Cookie+Session,Redis+Token,JWT三者的区别
- sql server统计今天和昨天数据量差异大于10的情况
- The El cascader code cancels the selection and manually deletes an item
- Laravel view access routes
- Five highlights of wwdc2022 lock screen, weather kit, swiftui, collaboration function, apple payment
- Common Android program functions clear cache
- Method of accessing LAN by external network and how virtual machines installed by VM access each other in LAN
- 85. (leaflet house) leaflet military plotting - line arrow drawing
猜你喜欢

opencv学习笔记一

Concurrent operation -- the difference between reentrantlock and synchronized

No cached version available for offline mode

Neural network learning (V) -- comparison of common network structures

Indonesia widya robotics and Huawei cloud make the safety of construction sites visible

How to use superset to seamlessly connect with MRS for self-service analysis

Free video format converter

Affichage de barres de couleur, de caractères et d'images VGA basé sur FPGA

Error 5 occurred in the console input command net start MySQL console output system. Access denied. MySQL service is starting MySQL service failed to start. The service did not report any errors. Plea

汇编:Debug的常用命令
随机推荐
Google Earth engine (GEE) - pure NDVI and NDWI extraction using updatemask (taking China as an example)
神经网络学习(六)----深度学习与机器学习的关系理解
分布式 | dble 读写分离场景下为什么普通的读 sql 发送到了 master 实例上
Redis6学习笔记-第一章-Redis的介绍与环境搭建
Introduction to related operations of Huawei cloud sandbox Lab
Please ask about the SQL injection problem
【5月考试】ORACLE OCP 19C 通过
Ideal使用小技巧
Error 1130- host XXX is not allowed to connect to this MariaDB server
2022年【电商】测试优惠券如何编写测试用例?
故障分析 | DDL 导致的 Xtrabackup 备份失败
Redis6 learning notes - Chapter 1 - Introduction and environment construction of redis
Why common read SQL is sent to the master instance in the distributed dble read / write separation scenario
Use of rich text boxes
汇编:jmp指令
Alook browser cookie acquisition tutorial
基于FPGA的VGA显示彩条、字符、图片
Zhongang Mining: fluorite resources listed in the strategic mineral catalogue
专家,如何快速转型管理者?
Two merged sequences (CF 1144 g) -dp