summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b02afd9)
raw | patch | inline | side by side (parent: b02afd9)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Fri, 11 Apr 2003 23:47:39 +0000 (23:47 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Fri, 11 Apr 2003 23:47:39 +0000 (23:47 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@488 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_procs.c | patch | blob | history |
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index 3671559b1fcc03657ca5a844d70bb1b49747d403..737a87b1654b2fc3e320b0b45502f445f2870902 100644 (file)
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
-u, --user=USER\n\
Only scan for processes with user name or ID indicated.\n\
-a, --argument-array=STRING\n\
- Only scan for ARGS that match up to the length of the given STRING.\n\
+ Only scan for processes with args that contain STRING.\n\
-C, --command=COMMAND\n\
Only scan for exact matches to the named COMMAND.\n\
\n\
cols = 7;
}
if ( cols >= 7 ) {
- found++;
resultsum = 0;
asprintf (&procargs, "%s", input_buffer + pos);
strip (procargs);
if ((options & STAT) && (strstr (statopts, procstat)))
resultsum |= STAT;
- if ((options & ARGS) && procargs && (strstr (procargs, args) == procargs))
+ if ((options & ARGS) && procargs && (strstr (procargs, args) != NULL))
resultsum |= ARGS;
if ((options & PROG) && procprog && (strcmp (prog, procprog) == 0))
resultsum |= PROG;
procs, procuid, procvsz, procrss,
procppid, procpcpu, procstat, procprog, procargs);
+ /* Ignore self */
+ if (strcmp (procprog, progname) == 0)
+ continue;
+
+ found++;
+
/* Next line if filters not matched */
if (!(options == resultsum || options == ALL))
continue;