当前位置:网站首页>Record the troubleshooting process of excessive CPU usage
Record the troubleshooting process of excessive CPU usage
2022-06-21 13:57:00 【The forest wind is at ease】
Today, the test feedback online test environment has almost no data in the warehouse , Recently, it happened that the new version was tested , It is estimated that what has affected , Start with the deployment environment troubleshooting .
top Command to view the operation of the server , It is found that a process has been occupying CPU,CPU Consumption basic 100%.

pwdx Check the process , It is found that the process is just the application of the module .

View the thread list of this process , Let's see what thread is taking up CPU Too high :ps -mp 5866 -o THREAD,tid,time.

You can see that there is a thread CPU The occupation is absurdly high , Logging thread id, The thread id Turn into 16 Base number ,jstack Print the stack of the process , Find the corresponding thread .

From the output, you can see the specific blocked threads , Go to the specific code , It is found that the processing of getting elements from a blocking queue is unreasonable , There's a dead cycle , Lead to CPU Idle .
Summarize the specific troubleshooting process :
# View process number pid
top
# Confirm the module application corresponding to the process number
pwdx pid
# Find the most time-consuming thread tid
ps -mp pid -o THREAD,tid,time
# Turn into 16 Base number
printf "%x\n" tid
# The stack finds the specified thread , View the specific running status of the thread
jstack pid | grep tid -A 30
边栏推荐
- Comprehensively analyze the key points of knowledge required for interface testing and interface testing
- C language elementary order (VI) function
- seaborn数据总体分布的可视化策略
- Postman testing websocket interface
- 技术分享 | MySQL中一个聚类增量统计 SQL 的需求
- 3. operator
- How to guarantee the test coverage
- Web3.js connection to metamask wallet transfer
- Comment utiliser un moteur de recherche?
- Visualization strategy of Seaborn data overall distribution
猜你喜欢

MySQL - data type

###数据库的高可用配置(mysql)

Comprehensively analyze the key points of knowledge required for interface testing and interface testing

map. Values() to copy list and ArrayList

MySQL - view properties
![[graduation project recommendation] - personnel management system](/img/b5/4235b54fa0da9e4637010a68bf848b.jpg)
[graduation project recommendation] - personnel management system

Iterm2 file transfer with remote server

Pyqt environment in pycharm

The new plan for national treasures - the exclusive digital collection of the four museums is coming!

Alibaba cloud log service is available in Net project
随机推荐
How does JMeter implement interface association?
Implementation principle and difference between C value type and reference type
Talk about the delay of public network
Postman reports error write eproto 93988952error10000f7ssl routinesopenssl_ internalWRONG_ VERSION_ NUM
Modification method of EKF extended Kalman filter for omnidirectional ground
Setting of Seaborn drawing style
[untitled]
Farewell to the endless summer
[deeply understand tcapulusdb technology] tmonitor system upgrade
Are you still using generator to generate crud code of XXX management system? Let's see what I wrote
【课程作业】浮点运算分析及精度改进
[deeply understand tcapulusdb technology] tmonitor background one click installation
Atguigu---- conditional rendering
[course assignment] floating point operation analysis and precision improvement
8. structure
In the autumn of 2022, from being rejected to sp+, talk about the experience and harvest of YK bacteria in 2021
Cvpr2022 | the action sequence verification task was first proposed by X xiaohongshu of Shanghai University of science and technology, which can be applied to multiple scenarios such as scoring of spo
Technology sharing | a clustering incremental statistical SQL requirement in MySQL
MySQL - data type
5. array