mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-26 08:37:11 -04:00
check_procs: ignore our own children
On systems with higher core counts check_procs will occasionally see its own "ps" child process with a high CPU percentage and raise a false alarm. Ignoring the child processes of check_procs prevents this from happening.
This commit is contained in:
parent
c2ddda30e0
commit
897e4a8409
1 changed files with 7 additions and 0 deletions
|
|
@ -255,6 +255,13 @@ main (int argc, char **argv)
|
|||
continue;
|
||||
}
|
||||
|
||||
/* Ignore our own children */
|
||||
if (procppid == mypid) {
|
||||
if (verbose >= 3)
|
||||
printf("not considering - is our child\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Ignore excluded processes by name */
|
||||
if(options & EXCLUDE_PROGS) {
|
||||
int found = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue