aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_procs.c
diff options
context:
space:
mode:
authorGravatar Benoit Mortier <opensides@users.sourceforge.net> 2004-12-01 23:54:51 +0000
committerGravatar Benoit 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 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ $Id$
+
******************************************************************************/
const char *progname = "check_procs";
@@ -73,9 +75,6 @@ char tmp[MAX_INPUT_BUFFER];
-
-
-
int
main (int argc, char **argv)
{
@@ -117,8 +116,7 @@ main (int argc, char **argv)
metric = METRIC_PROCS;
if (process_arguments (argc, argv) == ERROR)
- usage (_("Unable to parse command line\n"));
-
+ usage (_("check_procs: could not parse arguments\n"));
/* Set signal handling and alarm timeout */
if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) {
@@ -127,7 +125,6 @@ main (int argc, char **argv)
}
alarm (timeout_interval);
-
if (verbose >= 2)
printf (_("CMD: %s\n"), PS_COMMAND);
@@ -296,9 +293,6 @@ main (int argc, char **argv)
-
-
-
/* process command-line arguments */
int
process_arguments (int argc, char **argv)
@@ -338,6 +332,7 @@ process_arguments (int argc, char **argv)
switch (c) {
case '?': /* help */
+ printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
print_usage ();
exit (STATE_UNKNOWN);
case 'h': /* help */
@@ -495,7 +490,6 @@ process_arguments (int argc, char **argv)
-
int
validate_arguments ()
{
@@ -543,9 +537,6 @@ validate_arguments ()
-
-
-
/* Check thresholds against value */
int
check_thresholds (int value)
@@ -580,9 +571,6 @@ check_thresholds (int value)
-
-
-
void
print_help (void)
{
@@ -671,6 +659,8 @@ Examples:\n\
printf (_(UT_SUPPORT));
}
+
+
void
print_usage (void)
{
@@ -681,3 +671,4 @@ Usage: %s -w <range> -c <range> [-m metric] [-s state] [-p ppid]\n\
printf (_(UT_HLP_VRS), progname, progname);
}
+