0

I am investigating a CPU creep that happens on my machine. Below it the htop output screenshot.

htop output]

The htop output shows multiple entries for each application. I am assuming that it is one for each thread. Is my assumption correct ?

One of the threads in the ZonesManager has a very high CPU utilization. How do I know which thread that is ?

Can someone please guide me.

liv2hak
  • 14,472
  • 53
  • 157
  • 270
  • 1
    Attach the debugger and check it? or use some tool (gperf/vtune) to analyze it – Louis Go Jun 27 '22 at 06:33
  • If you see in htop which thread has high CPU utilization, you can take the pid from the first column and check for it in your code. E.g with [this function](https://man7.org/linux/man-pages/man2/getpid.2.html) – Jakob Stark Jun 27 '22 at 06:33
  • @JakobStark - I just started working on this project. I can't figure out where the threads are getting started. Are the multiple entries in htop indeed threads inside that process ? – liv2hak Jun 27 '22 at 09:21
  • @liv2hak yes those are threads. The one you selected (the one with process id 58499) uses (and used) a big percentage of the overall CPU utilization of that process. I fear I do not understand your problem. You asked, how to find that high CPU usage thread, which you can clearly see in the picture. However I have no clue what you mean with "CPU creep issue". Do you mean something like [this](https://en.wikipedia.org/wiki/Chip_creep)? Anyway, can you please elaborate your exact problem and give a little more of the overall picture of what you are trying to achieve? – Jakob Stark Jun 27 '22 at 19:36

0 Answers0