Exclude kernel processes from check_procs without -k
Posted: Mon Jun 23, 2014 8:24 am
Dear All,
I've been looking for a solution to check the number of processes with the standard check_procs plugin (without -k option) as we have this installed everywhere.
By googlong I've found some tries to solve this with no luck.
Also here is a thread http://support.nagios.com/forum/viewtopic.php?t=21508 about the same issue, where I can not post, so here is my solution:
On a modern systems with many cpu cores there can be a few hundred kernel processes (watchdog, migration, events, ata, crypto, ksoftirqd, kintegrityd, kblockd, etc) 'by default', which leads to the following on my server:
If you want to exclude all of these kernel threads, just exclude all processes which name ends with ']'. This gives following on the same server:
I hope that it helps somebody.
Zsolt
I've been looking for a solution to check the number of processes with the standard check_procs plugin (without -k option) as we have this installed everywhere.
By googlong I've found some tries to solve this with no luck.
Also here is a thread http://support.nagios.com/forum/viewtopic.php?t=21508 about the same issue, where I can not post, so here is my solution:
On a modern systems with many cpu cores there can be a few hundred kernel processes (watchdog, migration, events, ata, crypto, ksoftirqd, kintegrityd, kblockd, etc) 'by default', which leads to the following on my server:
Code: Select all
./check_procs
PROCS OK: 607 processesCode: Select all
./check_procs --ereg-argument-array=[^]]$
PROCS OK: 75 processes with regex args '[^]]$'
Zsolt