[Nagiosplug-checkins] CVS: nagiosplug/plugins check_ping.c,1.11,1.11.2.1
Karl DeBisschop
kdebisschop at users.sourceforge.net
Fri Sep 12 05:08:08 CEST 2003
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv29375/plugins
Modified Files:
Tag: r1_3_0
check_ping.c
Log Message:
*new output format reported by Patrick Allen <p.allen at brandblue.co.uk>, also move atrribution for Richard Brodie to thanks file
Index: check_ping.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ping.c,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -C2 -r1.11 -r1.11.2.1
*** check_ping.c 13 Jan 2003 12:15:16 -0000 1.11
--- check_ping.c 12 Sep 2003 11:51:48 -0000 1.11.2.1
***************
*** 384,422 ****
/* get the percent loss statistics */
! if (sscanf
! (input_buffer, "%*d packets transmitted, %*d packets received, +%*d errors, %d%% packet loss",
! &pl) == 1
! || sscanf
! (input_buffer, "%*d packets transmitted, %*d packets received, %d%% packet loss",
! &pl) == 1
! || sscanf
! (input_buffer, "%*d packets transmitted, %*d packets received, %d%% loss, time", &pl) == 1
! || sscanf
! (input_buffer, "%*d packets transmitted, %*d received, %d%% loss, time", &pl) == 1
! /* Suse 8.0 as reported by Richard * Brodie */
! )
continue;
/* get the round trip average */
else
! if (sscanf (input_buffer, "round-trip min/avg/max = %*f/%f/%*f", &rta)
! == 1
! || sscanf (input_buffer,
! "round-trip min/avg/max/mdev = %*f/%f/%*f/%*f",
! &rta) == 1
! || sscanf (input_buffer,
! "round-trip min/avg/max/sdev = %*f/%f/%*f/%*f",
! &rta) == 1
! || sscanf (input_buffer,
! "round-trip min/avg/max/stddev = %*f/%f/%*f/%*f",
! &rta) == 1
! || sscanf (input_buffer,
! "round-trip min/avg/max/std-dev = %*f/%f/%*f/%*f",
! &rta) == 1
! || sscanf (input_buffer, "round-trip (ms) min/avg/max = %*f/%f/%*f",
! &rta) == 1
! || sscanf (input_buffer, "rtt min/avg/max/mdev = %*f/%f/%*f/%*f ms",
! &rta) == 1
! )
continue;
}
--- 384,403 ----
/* get the percent loss statistics */
! if (sscanf(input_buffer,"%*d packets transmitted, %*d packets received, +%*d errors, %d%% packet loss",&pl)==1 ||
! sscanf(input_buffer,"%*d packets transmitted, %*d packets received, %d%% packet loss",&pl)==1 ||
! sscanf(input_buffer,"%*d packets transmitted, %*d packets received, %d%% loss, time",&pl)==1 ||
! sscanf(input_buffer,"%*d packets transmitted, %*d received, +%*d errors, %d%% packet loss",&pl)==1 ||
! sscanf(input_buffer,"%*d packets transmitted, %*d received, %d%% loss, time",&pl)==1)
continue;
/* get the round trip average */
else
! if (sscanf(input_buffer,"round-trip min/avg/max = %*f/%f/%*f",&rta)==1 ||
! sscanf(input_buffer,"round-trip min/avg/max/mdev = %*f/%f/%*f/%*f",&rta)==1 ||
! sscanf(input_buffer,"round-trip min/avg/max/sdev = %*f/%f/%*f/%*f",&rta)==1 ||
! sscanf(input_buffer,"round-trip min/avg/max/stddev = %*f/%f/%*f/%*f",&rta)==1 ||
! sscanf(input_buffer,"round-trip min/avg/max/std-dev = %*f/%f/%*f/%*f",&rta)==1 ||
! sscanf(input_buffer,"round-trip (ms) min/avg/max = %*f/%f/%*f",&rta)==1 ||
! sscanf(input_buffer,"rtt min/avg/max/mdev = %*f/%f/%*f/%*f ms",&rta)==1)
continue;
}
More information about the Commits
mailing list