Identifying which Java thread is consuming most CPU

Submitted by Jochus on Thu, 05/09/2013 - 21:47 | Posted in: Java

I just found this very interesting article on identifying which Java thread is consuming the most CPU. It's working perfectly on a Linux environment. Unfortunately, top seems to be different on Mac OS X. There's no toggle to show threads. I even tried htop, which can be installed by MacPorts, but still no luck :-( ...

The only way to have this on Mac OS X is to use the top threads plugin in jconsole.

Add new comment

The content of this field is kept private and will not be shown publicly.


  • Lines and paragraphs break automatically.
  • You can caption images (data-caption="Text"), but also videos, blockquotes, and so on.
  • Web page addresses and email addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <cpp>, <css>, <html5>, <java>, <javascript>, <php>, <sql>, <xml>. The supported tag styles are: <foo>, [foo].
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.