[英]how to identify the thread which is causing JVM CPU utilization is reaching to 90 to 100% in Jboss java application?
Our java application(ear) was deployed in J Boss+Linux and We are using mod clusters and have total 8 JV M's or j Boss instances. 我们的Java应用程序(耳朵)已部署在J Boss + Linux中,并且我们正在使用mod集群,并且总共有8个JV M或j Boss实例。
We could see that daily one or two of JV M's CPU utilization is reaching to 100% and making application is very slow. 我们可以看到,合资公司每天的CPU利用率中的一两个达到100%,并且应用程序非常缓慢。
I have tried to get the thread dump by using the j stack and kill Linux commands to identify the causing thread.But unfortunately JV M is not responding if CPU utilization is reaches more than 60% for these commands. 我试图通过使用j堆栈来获取线程转储,并杀死Linux命令来确定引起线程。但是不幸的是,如果这些命令的CPU利用率达到60%以上,则JV M不会响应。
is there any easiest way to identify the thread/method/class name which is causing the issues to increase the CPU utilization? 有没有最简单的方法来识别导致问题增加CPU使用率的线程/方法/类名称?
Could anyone provide the solution asap please? 谁能尽快提供解决方案?
To get the stack from a hung process use jstack -F <PID>
, see oracle docs 要从挂起的进程获取堆栈,请使用
jstack -F <PID>
,请参见oracle docs
As you wrote the JVM is not responsive and thus there is no way to get details about executed classes/methods. 在您编写JVM时,它没有响应,因此无法获取有关已执行的类/方法的详细信息。 Thus the answer to "is there any easiest way" would be "NO".
因此,“是否有最简单的方法”的答案将是“否”。 ;-)
;-)
But maybe it can help you or anyone else (questions was asked 2.5 years ago) what I would do in this case: 但这可能会帮助您或其他任何人(2.5年前被问到的问题)在这种情况下我会做什么:
This could give you a hint which class/method is currently executed. 这可能会提示您当前正在执行哪个类/方法。 If you see eg many hundreds SQL queries only used in one single class then this could help you a lot.
如果您看到例如仅在一个类中使用的数百个SQL查询,那么这可能对您有很大帮助。
"threadcpu" can be downloaded from here: tuxad.com 可以从这里下载“ threadcpu”: tuxad.com
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.