Top processes / CPU usage

Hi there.
A short question this time.

Once i see a Windows server/Linux server with 100% CPU usage, i would like to see the top 3 processes with high cpu usage.

Well, i do a cmk -d Server and i get this:

<<ps:sep(9)>>
(\NT AUTHORITY\SYSTEM,1952,88,0,4,0,0,1945806875000,5895,77) System
(\NT AUTHORITY\SYSTEM,3816,524,0,244,200,781250,10156250,29,3) smss.exe
(\NT AUTHORITY\SYSTEM,34296,5520,0,292,2428,125921562500,116247812500,882,14) csrss.exe
(\NT AUTHORITY\SYSTEM,69152,7248,0,316,14856,8295937500,19300312500,701,24) winlogon.exe
(\NT AUTHORITY\SYSTEM,221652,205304,0,364,13148,1868336875000,1439310625000,480,18) services.exe
(\NT AUTHORITY\SYSTEM,1505220,1135848,0,376,1342112,34070604218750,5924600312500,273795,160) lsass.exe
(\NT AUTHORITY\SYSTEM,20492,14940,0,564,1164,4843750,21562500,145,5) svchost.exe
(\NT AUTHORITY\NETWORK SERVICE,24244,16996,0,704,2336,143125468750,166812812500,398,12) svchost.exe
(\NT AUTHORITY\NETWORK SERVICE,44968,32728,0,768,5296,34921562500,4619218750,177,10) svchost.exe
(\NT AUTHORITY\LOCAL SERVICE,31300,22108,0,804,6256,44733750000,57516406250,188,10) svchost.exe
(\NT AUTHORITY\SYSTEM,17404,12832,0,1380,13320,11406250,20625000,74,2) svchost.exe
(\NT AUTHORITY\SYSTEM,38860,3912,0,1404,1964,4687500,3281250,128,10) ismserv.exe
(\NT AUTHORITY\LOCAL SERVICE,12320,8572,0,1448,1344,2310000000,7634843750,65,3) svchost.exe
(\NT AUTHORITY\SYSTEM,43212,9264,0,1540,6808,781250,312500,75,2) VGAuthService.exe
(\NT AUTHORITY\SYSTEM,143912,56076,0,1564,52484,4914531250,2917968750,306,6) vmtoolsd.exe
(\NT AUTHORITY\SYSTEM,321156,28820,0,1960,234016,408125000,605312500,275,25) svchost.exe
…
…
…
ETC

Can you confirm any of those is “cpu usage” ? or is all about memory, threads, kerneltime, etc?
If not… how can i get the top ten processes with check_mk? do i have to create a local check? please, tell me that i dont need to do that. We have 3000 servers.

Thanks!!

With the buildin checks, the closest you can get is this:

Create a rule of type “Process discovery”. Select “Match all processes”, and “Enable per-process details in long output”. Give the check a name (here: “ALL”).

Then rediscover all affected hosts. You will get a “Process ALL” check. In the long output, there will appear a list of all running processes with Memory and CPU usage:

However, this presentation does not sort the process list by CPU usage, nor selects the top consumers.

For a check that fits your needs better, I think the easiest way is to write a local check that creates the desired output. It might also possible to write a server-side checkplugin which has access to the “ps” section of the agent output.

1 Like

Hi guys,

Take a look at this thread: Although for Linux, there are good ideas for an alternative approach to get e.g. the five most CPU intensive processes.

Regards,
Thomas

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.