summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fa00288)
raw | patch | inline | side by side (parent: fa00288)
author | Benoit Mortier <opensides@users.sourceforge.net> | |
Fri, 3 Dec 2004 16:56:27 +0000 (16:56 +0000) | ||
committer | Benoit Mortier <opensides@users.sourceforge.net> | |
Fri, 3 Dec 2004 16:56:27 +0000 (16:56 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@990 f882894a-f735-0410-b71e-b25c423dba1c
17 files changed:
index adec06e2c7c1d59670c235e0aba47096c28a449a..59a33a58e2f7640a0d7b48551e9daa83e9cdbb7e 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
Arnaud Quette
Alen Salamun
Russell Miller
+John Sivak
\ No newline at end of file
diff --git a/plugins/check_load.c b/plugins/check_load.c
index 00bfc8a6c083aa6bddc07e49ca0a26ab6b9f569e..6d87237f5ce4aaa70772505769d2ab2077fabd38 100644 (file)
--- a/plugins/check_load.c
+++ b/plugins/check_load.c
{
printf ("Usage: %s -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15\n"),
progname);
+
printf (UT_HLP_VRS, progname, progname);
}
diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index 826a105706f1a8d252502cb44acef098a201f099..f97ef66ce17db2ceb95b4c52e38d377869d10039 100644 (file)
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
void
print_usage (void)
{
- printf (S_("\
-Usage:\n %s [-H <host>] [-P <port>] [-c <critical time>] [-w <warning time>]\n\
- [-t <timeout>]"), progname);
- printf (S_("[-d <database>] [-l <logname>] [-p <password>]\n"));
- printf (S_("\
- %s (-h | --help) for detailed help\n\
- %s (-V | --version) for version information\n"),
- progname, progname);
+ printf ("\
+Usage: %s [-H <host>] [-P <port>] [-c <critical time>] [-w <warning time>]\n\
+ [-t <timeout>] [-d <database>] [-l <logname>] [-p <password>]\n", progname);
+
+ printf (UT_HLP_VRS, progname, progname);
}
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index 132453d26ed64e2b778324a7387592b883aff51a..c04fb027287adfae2f04a0b281c186df99318f30 100644 (file)
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
-void
-print_usage (void)
-{
- printf (\
-"Usage: %s -H <host_address> -w <wrta>,<wpl>%% -c <crta>,<cpl>%%\n\
- [-p packets] [-t timeout] [-L] [-4|-6]\n", progname);
- printf (_(UT_HLP_VRS), progname, progname);
-}
-
-
-
void
print_help (void)
{
printf (_(UT_SUPPORT));
}
+
+void
+print_usage (void)
+{
+ printf ("Usage: %s -H <host_address> -w <wrta>,<wpl>%% -c <crta>,<cpl>%%\n\
+ [-p packets] [-t timeout] [-L] [-4|-6]\n", progname);
+
+ printf (UT_HLP_VRS, progname, progname);
+}
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index a8a7d5e8f5f155454f4400832ae650de166ed45f..ee168db2578fca66de697d677834d0660c419fb3 100644 (file)
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
+
+/* convert the elapsed time to seconds */
+int
+convert_to_seconds(char *etime) {
+
+ char *ptr;
+ int total;
+
+ int hyphcnt;
+ int coloncnt;
+ int days;
+ int hours;
+ int minutes;
+ int seconds;
+
+ hyphcnt = 0;
+ coloncnt = 0;
+ days = 0;
+ hours = 0;
+ minutes = 0;
+ seconds = 0;
+
+ for (ptr = etime; *ptr != '\0'; ptr++) {
+
+ if (*ptr == '-') {
+ hyphcnt++;
+ continue;
+ }
+ if (*ptr == ':') {
+ coloncnt++;
+ continue;
+ }
+ }
+
+ if (hyphcnt > 0) {
+ sscanf(etime, "%d-%d:%d:%d",
+ &days, &hours, &minutes, &seconds);
+ /* linux 2.6.5/2.6.6 reporting some processes with infinite
+ * elapsed times for some reason */
+ if (days == 49710) {
+ return 0;
+ }
+ } else {
+ if (coloncnt == 2) {
+ sscanf(etime, "%d:%d:%d",
+ &hours, &minutes, &seconds);
+ } else if (coloncnt == 1) {
+ sscanf(etime, "%d:%d",
+ &minutes, &seconds);
+ }
+ }
+
+ total = (days * 86400) +
+ (hours * 3600) +
+ (minutes * 60) +
+ seconds;
+
+ if (verbose >= 3) {
+ printf("seconds: %d\n", total);
+ }
+ return total;
+}
+
+
+
void
print_help (void)
{
printf (_(UT_SUPPORT));
}
-
-
-/* convert the elapsed time to seconds */
-int
-convert_to_seconds(char *etime) {
-
- char *ptr;
- int total;
-
- int hyphcnt;
- int coloncnt;
- int days;
- int hours;
- int minutes;
- int seconds;
-
- hyphcnt = 0;
- coloncnt = 0;
- days = 0;
- hours = 0;
- minutes = 0;
- seconds = 0;
-
- for (ptr = etime; *ptr != '\0'; ptr++) {
-
- if (*ptr == '-') {
- hyphcnt++;
- continue;
- }
- if (*ptr == ':') {
- coloncnt++;
- continue;
- }
- }
-
- if (hyphcnt > 0) {
- sscanf(etime, "%d-%d:%d:%d",
- &days, &hours, &minutes, &seconds);
- /* linux 2.6.5/2.6.6 reporting some processes with infinite
- * elapsed times for some reason */
- if (days == 49710) {
- return 0;
- }
- } else {
- if (coloncnt == 2) {
- sscanf(etime, "%d:%d:%d",
- &hours, &minutes, &seconds);
- } else if (coloncnt == 1) {
- sscanf(etime, "%d:%d",
- &minutes, &seconds);
- }
- }
-
- total = (days * 86400) +
- (hours * 3600) +
- (minutes * 60) +
- seconds;
-
- if (verbose >= 3) {
- printf("seconds: %d\n", total);
- }
- return total;
-}
-
void
print_usage (void)
{
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] [-t timeout] [-v]\n", progname);
- printf (_(UT_HLP_VRS), progname, progname);
+ [-C command] [-t timeout] [-v]\n", progname);
+
+ printf (UT_HLP_VRS, progname, progname);
}
-
-
diff --git a/plugins/check_radius.c b/plugins/check_radius.c
index 57a3e40761e360e6da0afa3a6f208371551a181d..54746144ee69fb8b6a0566bb6f26a53548baacb0 100644 (file)
--- a/plugins/check_radius.c
+++ b/plugins/check_radius.c
printf ("\
Usage: %s -H host -F config_file -u username -p password [-n nas-id] [-P port]\n\
[-t timeout] [-r retries] [-e expect]\n", progname);
- printf (_(UT_HLP_VRS), progname, progname);
+ printf (UT_HLP_VRS, progname, progname);
}
diff --git a/plugins/check_real.c b/plugins/check_real.c
index 8a12a3e5f097728a90283b3a4a709db92692569c..8df68d90c54ccc9cb73452082027ebd816347f7d 100644 (file)
--- a/plugins/check_real.c
+++ b/plugins/check_real.c
printf ("\
Usage: %s -H host [-e expect] [-p port] [-w warn] [-c crit]\n\
[-t timeout] [-v]\n", progname);
- printf (_(UT_HLP_VRS), progname, progname);
+
+ printf (UT_HLP_VRS, progname, progname);
}
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index c0ddc70326231fd23eb6b42207354b52b63ca7de..748edfcaf9f2e3db12ada36d4b1671260dfb2a78 100644 (file)
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
printf ("\
Usage: %s -H host [-p port] [-e expect] [-C command] [-f from addr]\n\
[-w warn] [-c crit] [-t timeout] [-n] [-v] [-4|-6]\n", progname);
- printf (_(UT_HLP_VRS), progname, progname);
+ printf (UT_HLP_VRS, progname, progname);
}
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 2e9ea63c96356d5315d24f43ad7f635e8bfc7403..ca6d7a37b592327bd214cf393953dd404bb5e7dd 100644 (file)
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -948,12 +948,13 @@ Check status of remote machines and obtain sustem information via SNMP\n\n"));
void
print_usage (void)
{
- printf (_("\
+ printf ("\
Usage: %s -H <ip_address> -o <OID> [-w warn_range] [-c crit_range] \n\
[-C community] [-s string] [-r regex] [-R regexi] [-t timeout]\n\
[-l label] [-u units] [-p port-number] [-d delimiter]\n\
[-D output-delimiter] [-m miblist] [-P snmp version]\n\
[-L seclevel] [-U secname] [-a authproto] [-A authpasswd]\n\
- [-X privpasswd]\n"), progname);
- printf (_(UT_HLP_VRS), progname, progname);
+ [-X privpasswd]\n", progname);
+
+ printf (UT_HLP_VRS, progname, progname);
}
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c
index a21d64a474366bc8e8f163b40365295f4fc320aa..a21e2f524cbbbb33c63d39f4cd75e96034a9857a 100644 (file)
--- a/plugins/check_ssh.c
+++ b/plugins/check_ssh.c
void
print_usage (void)
{
- printf (_("\
+ printf ("\
Usage: %s [-46] [-t <timeout>] [-r <remote version>] [-p <port>] <host>\n"), progname);
- printf (_(UT_HLP_VRS), progname, progname);
+
+ printf (UT_HLP_VRS, progname, progname);
}
-/* end of check_ssh.c */
diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index 6857a01b5e3ba42415a276ef7b69d99e5ab798e5..6a448e106b07a93a48b65b61d5b78a4dde87fb2d 100644 (file)
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
void
print_usage (void)
{
- printf (_("Usage:\n\
+ printf ("Usage:\n\
%s [-av] -w <percent_free>%% -c <percent_free>%%\n\
- %s [-av] -w <bytes_free> -c <bytes_free>\n\
- %s (-h | --help) for detailed help\n\
- %s (-V | --version) for version information\n"),
- progname, progname, progname, progname);
+ %s [-av] -w <bytes_free> -c <bytes_free>\n", progname, progname);
+
+ printf (UT_HLP_VRS, progname, progname);
}
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index 05737764027a8ea72334eacc3c7cb762c7c771d8..405a76296f60849beac990f8c849536fe66f90dc 100644 (file)
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
void
print_usage (void)
{
- printf (_("\
+ printf ("\
Usage: %s -H host -p port [-w <warning time>] [-c <critical time>]\n\
[-s <send string>] [-e <expect string>] [-q <quit string>]\n\
[-m <maximum bytes>] [-d <delay>] [-t <timeout seconds>]\n\
[-r <refuse state>] [-v] [-4|-6] [-j] [-D <days to cert expiry>]\n\
- [-S <use SSL>]\n"), progname);
- printf (" %s (-h|--help)\n", progname);
- printf (" %s (-V|--version)\n", progname);
+ [-S <use SSL>]\n", progname);
+
+ printf (UT_HLP_VRS, progname, progname);
}
diff --git a/plugins/check_time.c b/plugins/check_time.c
index 8381fb2feb380e2d273b09db578fd5b993f02744..94c33b6c9c24c6110312ba7bfd78159f7c998986 100644 (file)
--- a/plugins/check_time.c
+++ b/plugins/check_time.c
void
print_usage (void)
{
- printf (_("\
+ printf ("\
Usage: %s -H <host_address> [-p port] [-u] [-w variance] [-c variance]\n\
- [-W connect_time] [-C connect_time] [-t timeout]\n"), progname);
+ [-W connect_time] [-C connect_time] [-t timeout]\n", progname);
+
printf (_(UT_HLP_VRS), progname, progname);
}
diff --git a/plugins/check_udp.c b/plugins/check_udp.c
index 5adf23c414c6655dbaa9de5e58c6b285e050b7fe..6551ed409ce2c6e0fce13d57a351ab2e5626b09b 100644 (file)
--- a/plugins/check_udp.c
+++ b/plugins/check_udp.c
printf (COPYRIGHT, copyright, email);
printf (_("\
-This plugin tests an UDP connection with the specified host.\n\n"));
+ This plugin tests an UDP connection with the specified host.\n\n"));
print_usage ();
void
print_usage (void)
{
- printf (_("\
+ printf ("\
Usage: %s -H <host_address> [-p port] [-w warn_time] [-c crit_time]\n\
- [-e expect] [-s send] [-t to_sec] [-v]\n"), progname);
- printf (_(UT_HLP_VRS), progname, progname);
+ [-e expect] [-s send] [-t to_sec] [-v]\n", progname);
+
+ printf (UT_HLP_VRS, progname, progname);
}
diff --git a/plugins/check_ups.c b/plugins/check_ups.c
index 3e538bca036ddba67dca88b22f2b8c31ca9cde82..ee373cbdbac33216d6db504e6ce057dd0941d654 100644 (file)
--- a/plugins/check_ups.c
+++ b/plugins/check_ups.c
void
print_usage (void)
{
- printf (_("\
+ printf ("\
Usage: %s -H host -u ups [-p port] [-v variable]\n\
- [-wv warn_value] [-cv crit_value] [-to to_sec] [-T]\n"), progname);
- printf (_(UT_HLP_VRS), progname, progname);
+ [-wv warn_value] [-cv crit_value] [-to to_sec] [-T]\n", progname);
+ printf (UT_HLP_VRS, progname, progname);
}
diff --git a/plugins/check_users.c b/plugins/check_users.c
index d08932256958a28e3020902bd1aba52d0b28e6af..05ef86fdd8d6b8440f2faddc78dee593979d11b0 100644 (file)
--- a/plugins/check_users.c
+++ b/plugins/check_users.c
print_usage (void)
{
printf ("Usage: %s -w <users> -c <users>\n", progname);
- printf (_(UT_HLP_VRS), progname, progname);
+
+ printf (UT_HLP_VRS, progname, progname);
}
diff --git a/plugins/urlize.c b/plugins/urlize.c
index 65a7b3dd2ff7f0ec7ef20becfc26c317b942327c..e1d02ef867221515a4f6c92942d356b3f2e93b71 100644 (file)
--- a/plugins/urlize.c
+++ b/plugins/urlize.c
void
print_usage (void)
{
- printf (_("Usage:\n %s <url> <plugin> <arg1> ... <argN>\n"), progname);
+ printf ("Usage:\n %s <url> <plugin> <arg1> ... <argN>\n", progname);
+
+ printf (UT_HLP_VRS, progname, progname);
}