summaryrefslogtreecommitdiffstats
path: root/plugins/check_procs.c
diff options
context:
space:
mode:
authorBenoit Mortier <opensides@users.sourceforge.net>2004-12-01 23:54:51 +0000
committerBenoit Mortier <opensides@users.sourceforge.net>2004-12-01 23:54:51 +0000
commitd19edd4043c498626fe68308005947975ef0a697 (patch)
tree7a213ee16f9331e928b1c32aa6c521c05519db58 /plugins/check_procs.c
parent1d8128e328f714258b7fec0c62245e1d187e0439 (diff)
downloadmonitoring-plugins-d19edd4043c498626fe68308005947975ef0a697.tar.gz
standardize localization string
standardize unknow arguments git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@969 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_procs.c')
-rw-r--r--plugins/check_procs.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index d39bfa54..011661c1 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -14,6 +14,8 @@
14 along with this program; if not, write to the Free Software 14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 16
17 $Id$
18
17******************************************************************************/ 19******************************************************************************/
18 20
19const char *progname = "check_procs"; 21const char *progname = "check_procs";
@@ -73,9 +75,6 @@ char tmp[MAX_INPUT_BUFFER];
73 75
74 76
75 77
76
77
78
79int 78int
80main (int argc, char **argv) 79main (int argc, char **argv)
81{ 80{
@@ -117,8 +116,7 @@ main (int argc, char **argv)
117 metric = METRIC_PROCS; 116 metric = METRIC_PROCS;
118 117
119 if (process_arguments (argc, argv) == ERROR) 118 if (process_arguments (argc, argv) == ERROR)
120 usage (_("Unable to parse command line\n")); 119 usage (_("check_procs: could not parse arguments\n"));
121
122 120
123 /* Set signal handling and alarm timeout */ 121 /* Set signal handling and alarm timeout */
124 if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) { 122 if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) {
@@ -127,7 +125,6 @@ main (int argc, char **argv)
127 } 125 }
128 alarm (timeout_interval); 126 alarm (timeout_interval);
129 127
130
131 if (verbose >= 2) 128 if (verbose >= 2)
132 printf (_("CMD: %s\n"), PS_COMMAND); 129 printf (_("CMD: %s\n"), PS_COMMAND);
133 130
@@ -296,9 +293,6 @@ main (int argc, char **argv)
296 293
297 294
298 295
299
300
301
302/* process command-line arguments */ 296/* process command-line arguments */
303int 297int
304process_arguments (int argc, char **argv) 298process_arguments (int argc, char **argv)
@@ -338,6 +332,7 @@ process_arguments (int argc, char **argv)
338 332
339 switch (c) { 333 switch (c) {
340 case '?': /* help */ 334 case '?': /* help */
335 printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
341 print_usage (); 336 print_usage ();
342 exit (STATE_UNKNOWN); 337 exit (STATE_UNKNOWN);
343 case 'h': /* help */ 338 case 'h': /* help */
@@ -495,7 +490,6 @@ process_arguments (int argc, char **argv)
495 490
496 491
497 492
498
499int 493int
500validate_arguments () 494validate_arguments ()
501{ 495{
@@ -543,9 +537,6 @@ validate_arguments ()
543 537
544 538
545 539
546
547
548
549/* Check thresholds against value */ 540/* Check thresholds against value */
550int 541int
551check_thresholds (int value) 542check_thresholds (int value)
@@ -580,9 +571,6 @@ check_thresholds (int value)
580 571
581 572
582 573
583
584
585
586void 574void
587print_help (void) 575print_help (void)
588{ 576{
@@ -671,6 +659,8 @@ Examples:\n\
671 printf (_(UT_SUPPORT)); 659 printf (_(UT_SUPPORT));
672} 660}
673 661
662
663
674void 664void
675print_usage (void) 665print_usage (void)
676{ 666{
@@ -681,3 +671,4 @@ Usage: %s -w <range> -c <range> [-m metric] [-s state] [-p ppid]\n\
681 printf (_(UT_HLP_VRS), progname, progname); 671 printf (_(UT_HLP_VRS), progname, progname);
682} 672}
683 673
674