[Nagiosplug-checkins] CVS: nagiosplug/plugins check_procs.c,1.22,1.23
Ton Voon
tonvoon at users.sourceforge.net
Fri Nov 28 06:19:03 CET 2003
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv20445
Modified Files:
check_procs.c
Log Message:
Fixed listing of failed processes
Index: check_procs.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_procs.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** check_procs.c 16 Sep 2003 14:14:53 -0000 1.22
--- check_procs.c 28 Nov 2003 14:18:22 -0000 1.23
***************
*** 203,212 ****
if (i == STATE_WARNING) {
warn++;
}
if (i == STATE_CRITICAL) {
crit++;
}
- asprintf (&fails, "%s%s%s", fails, (strcmp(fails,"") ? ", " : ""), procprog);
- result = max_state (result, i);
}
}
--- 203,214 ----
if (i == STATE_WARNING) {
warn++;
+ asprintf (&fails, "%s%s%s", fails, (strcmp(fails,"") ? ", " : ""), procprog);
+ result = max_state (result, i);
}
if (i == STATE_CRITICAL) {
crit++;
+ asprintf (&fails, "%s%s%s", fails, (strcmp(fails,"") ? ", " : ""), procprog);
+ result = max_state (result, i);
}
}
}
***************
*** 342,346 ****
usage (_("Critical Process Count must be an integer!\n\n"));
break;
! case 'w': /* warning time threshold */
if (is_integer (optarg))
wmax = atoi (optarg);
--- 344,348 ----
usage (_("Critical Process Count must be an integer!\n\n"));
break;
! case 'w': /* warning threshold */
if (is_integer (optarg))
wmax = atoi (optarg);
***************
*** 352,356 ****
break;
else
! usage (_("%s: Warning Process Count must be an integer!\n\n"));
break;
case 'p': /* process id */
--- 354,358 ----
break;
else
! usage (_("Warning Process Count must be an integer!\n\n"));
break;
case 'p': /* process id */
***************
*** 656,660 ****
'/usr/local/bin/perl' and owned by root\n\n\
check_procs -w 50000 -c 100000 --metric=VSZ\n\
! Alert if vsz of any processes over 50K or 100K\n\n"));
printf (_(UT_SUPPORT));
--- 658,664 ----
'/usr/local/bin/perl' and owned by root\n\n\
check_procs -w 50000 -c 100000 --metric=VSZ\n\
! Alert if vsz of any processes over 50K or 100K\n\
! check_procs -w 10 -c 20 --metric=CPU\n\
! Alert if cpu of any processes over 10% or 20%\n\n"));
printf (_(UT_SUPPORT));
More information about the Commits
mailing list