logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

nagiosplug/plugins check_ping.c,1.46,1.47: msg#00006

Subject: nagiosplug/plugins check_ping.c,1.46,1.47
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21106

Modified Files:
        check_ping.c 
Log Message:
More diagnostic messages from check_ping


Index: check_ping.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ping.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- check_ping.c        12 Sep 2005 11:20:51 -0000      1.46
+++ check_ping.c        13 Sep 2005 15:48:15 -0000      1.47
@@ -53,7 +53,7 @@
 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;
@@ -112,8 +112,8 @@
                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]);
@@ -146,7 +146,7 @@
                        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);
@@ -208,7 +208,7 @@
                        timeout_interval = atoi (optarg);
                        break;
                case 'v':       /* verbose mode */
-                       verbose = TRUE;
+                       verbose++;
                        break;
                case '4':       /* IPv4 only */
                        address_family = AF_INET;
@@ -412,6 +412,9 @@
 
        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 */



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf


<Prev in Thread] Current Thread [Next in Thread>