一次tomcat CPU 爆满的排查

新接手的业务服务器,今天10点半公司业务平台服务器发来cpu报警邮件;

一、查看top查看CPU的占用比

shift+m 按内存排序,shift+p按cpu排序;

二、ps命令查看进程信息

ps  axu|grep  -i "tomcat" # 查看tomcat的进程信息;

ps aux|grep  4919   #查看进程信息(PID)

用ps -mp PID -o THREAD,tid,time命令打印出该进程下的线程占用cpu情况

三、用printf “%x\n” 4919(pid)命令将需要的线程ID转换为16进制格式

猜你喜欢

转载自blog.csdn.net/qq_16538827/article/details/82588424