summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/check_procs.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index 402daa5..3eefdb4 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -119,6 +119,15 @@ main (int argc, char **argv)
119 if (process_arguments (argc, argv) == ERROR) 119 if (process_arguments (argc, argv) == ERROR)
120 usage (_("Unable to parse command line\n")); 120 usage (_("Unable to parse command line\n"));
121 121
122
123 /* Set signal handling and alarm timeout */
124 if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) {
125 printf (_("Cannot catch SIGALRM"));
126 return STATE_UNKNOWN;
127 }
128 alarm (timeout_interval);
129
130
122 if (verbose >= 2) 131 if (verbose >= 2)
123 printf (_("CMD: %s\n"), PS_COMMAND); 132 printf (_("CMD: %s\n"), PS_COMMAND);
124 133
@@ -603,7 +612,11 @@ Optional Arguments:\n\
603 PROCS - number of processes (default)\n\ 612 PROCS - number of processes (default)\n\
604 VSZ - virtual memory size\n\ 613 VSZ - virtual memory size\n\
605 RSS - resident set memory size\n\ 614 RSS - resident set memory size\n\
606 CPU - percentage cpu\n\ 615 CPU - percentage cpu\n"));
616
617 printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
618
619 printf(_("\
607 -v, --verbose\n\ 620 -v, --verbose\n\
608 Extra information. Up to 3 verbosity levels\n")); 621 Extra information. Up to 3 verbosity levels\n"));
609 622
@@ -664,7 +677,7 @@ print_usage (void)
664 printf ("\ 677 printf ("\
665Usage: %s -w <range> -c <range> [-m metric] [-s state] [-p ppid]\n\ 678Usage: %s -w <range> -c <range> [-m metric] [-s state] [-p ppid]\n\
666 [-u user] [-r rss] [-z vsz] [-P %%cpu] [-a argument-array]\n\ 679 [-u user] [-r rss] [-z vsz] [-P %%cpu] [-a argument-array]\n\
667 [-C command] [-v]\n", progname); 680 [-C command] [-t timeout] [-v]\n", progname);
668 printf (_(UT_HLP_VRS), progname, progname); 681 printf (_(UT_HLP_VRS), progname, progname);
669} 682}
670 683