summaryrefslogtreecommitdiffstats
path: root/plugins/check_nagios.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_nagios.c')
-rw-r--r--plugins/check_nagios.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c
index 083b5028..64a828b9 100644
--- a/plugins/check_nagios.c
+++ b/plugins/check_nagios.c
@@ -55,6 +55,9 @@ main (int argc, char **argv)
55 FILE *fp; 55 FILE *fp;
56 int procuid = 0; 56 int procuid = 0;
57 int procppid = 0; 57 int procppid = 0;
58 int procvsz = 0;
59 int procrss = 0;
60 float procpcpu = 0;
58 char procstat[8]; 61 char procstat[8];
59 char procprog[MAX_INPUT_BUFFER]; 62 char procprog[MAX_INPUT_BUFFER];
60 char *procargs; 63 char *procargs;
@@ -106,7 +109,7 @@ main (int argc, char **argv)
106 /* count the number of matching Nagios processes... */ 109 /* count the number of matching Nagios processes... */
107 while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_process)) { 110 while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_process)) {
108 cols = sscanf (input_buffer, PS_FORMAT, PS_VARLIST); 111 cols = sscanf (input_buffer, PS_FORMAT, PS_VARLIST);
109 if ( cols >= 4 ) { 112 if ( cols >= 6 ) {
110 asprintf (&procargs, "%s", input_buffer + pos); 113 asprintf (&procargs, "%s", input_buffer + pos);
111 strip (procargs); 114 strip (procargs);
112 115