summaryrefslogtreecommitdiffstats
path: root/plugins/check_procs.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_procs.c')
-rw-r--r--plugins/check_procs.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index 816da1b7..875f867f 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -143,6 +143,9 @@ main (int argc, char **argv)
143 asprintf (&metric_name, "PROCS"); 143 asprintf (&metric_name, "PROCS");
144 metric = METRIC_PROCS; 144 metric = METRIC_PROCS;
145 145
146 /* Parse extra opts if any */
147 argv=np_extra_opts (&argc, argv, progname);
148
146 if (process_arguments (argc, argv) == ERROR) 149 if (process_arguments (argc, argv) == ERROR)
147 usage4 (_("Could not parse arguments")); 150 usage4 (_("Could not parse arguments"));
148 151
@@ -715,13 +718,12 @@ print_help (void)
715 718
716 print_usage (); 719 print_usage ();
717 720
718 printf ("%s\n", _("Required Arguments:")); 721 printf (_(UT_HELP_VRSN));
722 printf (_(UT_EXTRA_OPTS));
719 printf (" %s\n", "-w, --warning=RANGE"); 723 printf (" %s\n", "-w, --warning=RANGE");
720 printf (" %s\n", _("Generate warning state if metric is outside this range")); 724 printf (" %s\n", _("Generate warning state if metric is outside this range"));
721 printf (" %s\n", "-c, --critical=RANGE"); 725 printf (" %s\n", "-c, --critical=RANGE");
722 printf (" %s\n", _("Generate critical state if metric is outside this range")); 726 printf (" %s\n", _("Generate critical state if metric is outside this range"));
723
724 printf ("%s\n", _("Optional Arguments:"));
725 printf (" %s\n", "-m, --metric=TYPE"); 727 printf (" %s\n", "-m, --metric=TYPE");
726 printf (" %s\n", _("Check thresholds against metric. Valid types:")); 728 printf (" %s\n", _("Check thresholds against metric. Valid types:"));
727 printf (" %s\n", _("PROCS - number of processes (default)")); 729 printf (" %s\n", _("PROCS - number of processes (default)"));
@@ -737,7 +739,8 @@ print_help (void)
737 printf (" %s\n", "-v, --verbose"); 739 printf (" %s\n", "-v, --verbose");
738 printf (" %s\n", _("Extra information. Up to 3 verbosity levels")); 740 printf (" %s\n", _("Extra information. Up to 3 verbosity levels"));
739 741
740 printf ("%s\n", "Optional Filters:"); 742 printf ("\n");
743 printf ("%s\n", "Filters:");
741 printf (" %s\n", "-s, --state=STATUSFLAGS"); 744 printf (" %s\n", "-s, --state=STATUSFLAGS");
742 printf (" %s\n", _("Only scan for processes that have, in the output of `ps`, one or")); 745 printf (" %s\n", _("Only scan for processes that have, in the output of `ps`, one or"));
743 printf (" %s\n", _("more of the status flags you specify (for example R, Z, S, RS,")); 746 printf (" %s\n", _("more of the status flags you specify (for example R, Z, S, RS,"));
@@ -771,6 +774,12 @@ the specified threshold ranges. The process count can be filtered by\n\
771process owner, parent process PID, current state (e.g., 'Z'), or may\n\ 774process owner, parent process PID, current state (e.g., 'Z'), or may\n\
772be the total number of running processes\n\n")); 775be the total number of running processes\n\n"));
773 776
777#ifdef NP_EXTRA_OPTS
778 printf ("%s\n", _("Notes:"));
779 printf (_(UT_EXTRA_OPTS_NOTES));
780 printf ("\n");
781#endif
782
774 printf ("%s\n", _("Examples:")); 783 printf ("%s\n", _("Examples:"));
775 printf (" %s\n", "check_procs -w 2:2 -c 2:1024 -C portsentry"); 784 printf (" %s\n", "check_procs -w 2:2 -c 2:1024 -C portsentry");
776 printf (" %s\n", _("Warning if not two processes with command name portsentry.")); 785 printf (" %s\n", _("Warning if not two processes with command name portsentry."));