mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-05-28 04:35:40 -04:00
Merge pull request #1654 from wolfgangkarall/master
check_procs -- exchange needle and haystack in strstr() for proper st…
This commit is contained in:
commit
4549a95243
2 changed files with 2 additions and 2 deletions
|
|
@ -265,7 +265,7 @@ main (int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
if ((options & STAT) && (strstr (statopts, procstat)))
|
||||
if ((options & STAT) && (strstr (procstat, statopts)))
|
||||
resultsum |= STAT;
|
||||
if ((options & ARGS) && procargs && (strstr (procargs, args) != NULL))
|
||||
resultsum |= ARGS;
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ is( $result->output, 'PROCS OK: 3 processes with RSS >= 100000 | procs=3;;;0;',
|
|||
|
||||
$result = NPTest->testCmd( "$command -s S" );
|
||||
is( $result->return_code, 0, "Checking filter for sleeping processes" );
|
||||
like( $result->output, '/^PROCS OK: 44 processes with STATE = S/', "Output correct" );
|
||||
like( $result->output, '/^PROCS OK: 88 processes with STATE = S/', "Output correct" );
|
||||
|
||||
$result = NPTest->testCmd( "$command -s Z" );
|
||||
is( $result->return_code, 0, "Checking filter for zombies" );
|
||||
|
|
|
|||
Loading…
Reference in a new issue