• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

JBoss 4.2.2: find out which thread is consuming 100% of the CPU  RSS feed

 
Ranch Hand
Posts: 157
Java Netbeans IDE Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello:

In my company, I've been asked to find out why an application of the intranet, from time to time, consumes 100% of the CPU time and gets stuck there. The server is a legacy system, which uses CentOS 6.7, JBoss 4.2.2 GA and JDK 1.5.0 Update 22. The application is an ERP running in JBoss.

The first thing that I've done is to use the command top -H -p <pid> to find out which thread was the one exhausting the CPU and see what . Then, I've run jstack <pid> to get a thread dump and associate the PID of the thread at the OS level, with the thread ID or name at the JVM level. However, this version of Java is old and doesn't show the PID at the OS level (in hexadecimal), as newer versions do. It even doesn't show the actual thread name, just a generic name of the form "Thread XXXXX". Is there a way to do this association in this version of Java? If so, How?

I've also accessed the JMX Console provided by JBoss, using a web browser. I hadn't used this version for years, but I've found something interesting under jboss.system:type=ServerInfo. This MBean provides a method called listThreadCpuUtilization() which is close to what I need. But it doesn't show the CPU usage in a given time interval, but the total usage since each thread was created. So I've created a shell script that queries this MBean every X seconds and calculates the usage in such interval. What's the problem now? That the JMX Console remains inaccessible when the ERP exhausts the CPU. So it's not much helpful.

Since the machine has a X server running in it, I've also tried to run JConsole and VisualVM. JConsole says that the JBoss process is not a managed VM. VisualVM lists the process, but gets stuck when I want to see the details.

Can you help me, please?

Thank you!
 
Why should I lose weight? They make bigger overalls. And they sure don't make overalls for tiny ads:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!