当前位置:网站首页>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......... "边栏推荐
- Problems encountered in the use of PgSQL
- Integration of sentinel series Nacos to realize rule synchronization and persistence
- Automatic database backup (using Navicat)
- Pychart encountered time zone problem when connecting to MySQL timezone
- Small project - household income and expenditure software (1)
- One of PowerShell optimizations: prompt beautification
- Qmessagebox in pyqt5
- Error: unmapped character encoding GBK
- Case - recursive factorial (recursive)
- Service fusing and degradation of Note Series
猜你喜欢

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

Small project - household income and expenditure software (1)

行情绘图课程大纲1-基础知识

How to Algorithm Evaluation Methods

17 servicetask of flowable task

MySQL built-in functions

Config server configuration center of Nacos series

19 calling subprocess (callactivity) of a flowable task

MySQL main query and sub query

NVIDIA Jetson Nano/Xavier NX 扩容教程
随机推荐
redis
float类型取值范围
Small project - household income and expenditure software (1)
【自动化测试】Cypress手册
Web site learning and sorting
Find out the missing numbers from the natural numbers arranged in order from 0 to 100, and the solution provides
The reason why the process cannot be shut down after a spark job is executed and the solution
Use of mongodb
Mysql database backup and restore:
MySQL transactions and foreign keys
Sentinel series hot spot current limiting
Comment procéder à l'évaluation des algorithmes
Sentinel series introduction to service flow restriction
MySQL performs an inner join on query. The query result is incorrect because the associated fields have different field types.
Float type value range
Mongodb multi field aggregation group by
NVIDIA Jetson Nano/Xavier NX 扩容教程
OpenGL馬賽克(八)
17 servicetask of flowable task
Windbos run command set