当前位置:网站首页>Tongweb crawl performance log script
Tongweb crawl performance log script
2022-06-13 05:44:00 【t007321】
You can see from the previous article , In case of performance problems, in addition to opening TongWeb Monitoring function , You also need to manually execute a series of performance analysis commands to troubleshoot problems , because TongWeb The monitoring function of is not enough to analyze the problem . This manual operation is difficult for the project operation and maintenance personnel , Often eager to restore the system , restart TongWeb To solve . Here is a script , Try to crawl all logs once .
# This step is mainly aimed at performance problems , Not all log fetching commands are executed at one time , Even the problem of incomplete parameters .
# Put the script in TongWeb Of bin Under the table of contents , Execute the record once when slow occurs CPU,netstat, Handle ,jstack,kill -3,busy,jmap, If the execution error occurs, skip to continue the execution .
# If you do not have permission to execute under the classified aircraft , Through . ./slowlog.sh The way to carry out , Notice that there are spaces at two points .
# After the execution TongWeb Of logs The contents are packed and kept at the bottom .
# if JDK Incorrect environment variables , Remember to set PATH Variable . Want to have jstack、jmap、jstat Commands can't just be installed jre.
tongwebhome=`pwd`
export tongwebhome
tongpid=`ps -ef | grep java | grep $tongwebhome | awk '{print $2}'`
export tongpid
echo "execute top command"
top -H -b -d 3 -n 3 > ../logs/top`date +%Y%m%d%H%M`.log
echo "execute nestat command"
netstat -antlp > ../logs/netstat`date +%Y%m%d%H%M`.log
echo "execute lsof command"
lsof -p $tongpid > ../logs/lsof`date +%Y%m%d%H%M`.log
echo "execute jstat command"
jstat -gcutil $tongpid 1000 10 > ../logs/jstat`date +%Y%m%d%H%M`.log
echo "execute jstack command"
jstack $tongpid > ../logs/jstack`date +%Y%m%d%H%M`.log
echo "execute kill -3 command"
kill -3 $tongpid >/dev/null 2>&1
cp ../logs/jvm.log ../logs/jvm`date +%Y%m%d%H%M`.log
echo "execute thread-profiler.sh command"
./thread-profiler.sh -F -p $tongpid -c 500 -a ../logs/busy`date +%Y%m%d%H%M`.log 3 3 >/dev/null 2>&1
echo "execute jmap command"
jmap -histo $tongpid > ../logs/heap`date +%Y%m%d%H%M`.log
jmap -dump:live,format=b,file=../logs/heap`date +%Y%m%d%H%M`.bin $tongpid
echo "complete......... "边栏推荐
- Django uploads local binaries to the database filefield field
- MySQL table data modification
- 2021.9.29 learning log restful architecture
- ZABBIX wechat alarm
- Mysql database backup and restore:
- Course outline of market drawing 1- basic knowledge
- Case - traversing the directory (file class & recursive call)
- Dynamic programming - longest common substring
- 行情绘图课程大纲1-基础知识
- Celery understands
猜你喜欢

powershell优化之一:提示符美化

Case - traversing the directory (file class & recursive call)

Timeout thread log for tongweb

Automatic database backup (using Navicat)

MySQL performs an inner join on query. The query result is incorrect because the associated fields have different field types.

Case - count the number of occurrences of each string in the string

Quartz basic use

Customer information management system - C language

MySQL transactions and foreign keys

Getclassloader() returns null, getclassloader() gets null
随机推荐
Sentinel series hot spot current limiting
Working principle of sentinel series (concept)
设置自定义dialog的正确宽高
若依框架=》如何设置导入导出模板全局为文本格式(解决科学计数问题)
Windbos common CMD (DOS) command set
12 error end event and terminateendevent of end event
Unity游戏优化(第2版)学习记录7
Automatic database backup (using Navicat)
2020 personal annual summary
Difference between deviation and variance in deep learning
Some methods of string
Validation set: ‘flowable-executable-process‘ | Problem: ‘flowable-servicetask-missing-implementatio
Current limiting and fusing of gateway gateway in Spirng cloud
OpenGL mosaic (VIII)
Top slide immersive dialog
Sentinel series introduction to service flow restriction
Initial redis experience
Hump naming and underlining
9. Errorstartevent and errorboundaryevent of error events
MongoDB 多字段聚合Group by