summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ccca5e)
raw | patch | inline | side by side (parent: 7ccca5e)
author | Matthew Kent <mattkent@users.sourceforge.net> | |
Fri, 19 Nov 2004 03:44:13 +0000 (03:44 +0000) | ||
committer | Matthew Kent <mattkent@users.sourceforge.net> | |
Fri, 19 Nov 2004 03:44:13 +0000 (03:44 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@908 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 402daa53161e6b12c8051f58771b94167f6ecc88..3eefdb442ce75d3bc9c5af86a506cf6dd5811067 100644 (file)
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
if (process_arguments (argc, argv) == ERROR)
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);
PROCS - number of processes (default)\n\
VSZ - virtual memory size\n\
RSS - resident set memory size\n\
- CPU - percentage cpu\n\
+ CPU - percentage cpu\n"));
+
+ printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
+
+ printf(_("\
-v, --verbose\n\
Extra information. Up to 3 verbosity levels\n"));
printf ("\
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);
+ [-C command] [-t timeout] [-v]\n", progname);
printf (_(UT_HLP_VRS), progname, progname);
}