summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 42050b4)
raw | patch | inline | side by side (parent: 42050b4)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Tue, 13 Sep 2005 15:48:15 +0000 (15:48 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Tue, 13 Sep 2005 15:48:15 +0000 (15:48 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1216 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_ping.c | patch | blob | history |
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index fc720144dd0b419a7b97368282b407306452e637..6b566608961059c90c8206a8ee94fdcdca347cf9 100644 (file)
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
int n_addresses;
int max_addr = 1;
int max_packets = -1;
-int verbose = FALSE;
+int verbose = 0;
float rta = UNKNOWN_TRIP_TIME;
int pl = UNKNOWN_PACKET_LOSS;
asprintf (&cmd, rawcmd, addresses[i], max_packets);
#endif
- if (verbose)
- printf ("%s ==> ", cmd);
+ if (verbose >= 2)
+ printf ("CMD: %s\n", cmd);
/* run the command */
this_result = run_ping (cmd, addresses[i]);
printf ("</A>");
printf ("\n");
- if (verbose)
+ if (verbose >= 2)
printf ("%f:%d%% %f:%d%%\n", wrta, wpl, crta, cpl);
result = max_state (result, this_result);
timeout_interval = atoi (optarg);
break;
case 'v': /* verbose mode */
- verbose = TRUE;
+ verbose++;
break;
case '4': /* IPv4 only */
address_family = AF_INET;
while (fgets (buf, MAX_INPUT_BUFFER - 1, child_process)) {
+ if (verbose >= 3)
+ printf("Output: %s", buf);
+
result = max_state (result, error_scan (buf, addr));
/* get the percent loss statistics */