Which thread is taking up my CPU?

Here is a quick way you can identify which thread is taking up all your CPU.

1) Look at top (or htop) sorted by CPU Usage and with threads toggled on -> hit capital 'H'
2) Get the native process ids of the threads taking up a lot of CPU
3) Convert that number to hex using a converter: http://www.mathsisfun.com/binary-decimal-hexadecimal-converter.html
4) Use the hex number to identify the problematic threads on the thread dump via the nid= value. So for example:
nid=0x549 would equate to the native thread id of 1353 on top.

Take a thread dump and identify any problematic threads so you can see the stack trace.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk