[Nagiosplug-checkins] CVS: nagiosplug/plugins check_procs.c,1.27,1.28
Matthew Kent
mattkent at users.sourceforge.net
Thu Nov 18 19:45:24 CET 2004
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4689
Modified Files:
check_procs.c
Log Message:
Enabling timeout flag (1010097, Jason Martin)
Index: check_procs.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_procs.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** check_procs.c 6 Apr 2004 16:02:13 -0000 1.27
--- check_procs.c 19 Nov 2004 03:44:13 -0000 1.28
***************
*** 120,123 ****
--- 120,132 ----
usage (_("Unable to parse command line\n"));
+
+ /* Set signal handling and alarm timeout */
+ if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) {
+ printf (_("Cannot catch SIGALRM"));
+ return STATE_UNKNOWN;
+ }
+ alarm (timeout_interval);
+
+
if (verbose >= 2)
printf (_("CMD: %s\n"), PS_COMMAND);
***************
*** 604,608 ****
VSZ - virtual memory size\n\
RSS - resident set memory size\n\
! CPU - percentage cpu\n\
-v, --verbose\n\
Extra information. Up to 3 verbosity levels\n"));
--- 613,621 ----
VSZ - virtual memory size\n\
RSS - resident set memory size\n\
! CPU - percentage cpu\n"));
!
! printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
!
! printf(_("\
-v, --verbose\n\
Extra information. Up to 3 verbosity levels\n"));
***************
*** 665,669 ****
Usage: %s -w <range> -c <range> [-m metric] [-s state] [-p ppid]\n\
[-u user] [-r rss] [-z vsz] [-P %%cpu] [-a argument-array]\n\
! [-C command] [-v]\n", progname);
printf (_(UT_HLP_VRS), progname, progname);
}
--- 678,682 ----
Usage: %s -w <range> -c <range> [-m metric] [-s state] [-p ppid]\n\
[-u user] [-r rss] [-z vsz] [-P %%cpu] [-a argument-array]\n\
! [-C command] [-t timeout] [-v]\n", progname);
printf (_(UT_HLP_VRS), progname, progname);
}
More information about the Commits
mailing list