iputils release ss020124 and check_ping
Karl DeBisschop
karl at debisschop.net
Fri Nov 15 14:01:43 CET 2002
On Fri, 2002-11-15 at 07:01, Freddy Frouin wrote:
> Hi all,
>
> Does someone have successfuly hack the check_ping.c source to
> make it work with the ping version of package provided with
> iputils release ss020124 ? The differences are in the return
> syntax of the ping binary.
>
> I notice 2 changes that impact configure.in for plugins and
> netsaint/nagios engine and check_ping.c:
>
> Old iputils version (ss001110)
> 5 packets transmitted, 5 packets received, 0% packet loss
> round-trip min/avg/max/mdev = 0.692/0.911/1.469/0.285 ms
>
> New one
> 5 packets transmitted, 5 received, 0% loss, time 3998ms
> rtt min/avg/max/mdev = 0.202/0.233/0.264/0.027 ms
>
> I modified the configure.in successfuly, preventing it to
> block when checking ping syntax, yet I did not get success
> with check_ping.c, even if I modified the following lines
> to allow good sscanf extraction:
>
> sscanf (input_buffer, "%*d packets transmitted, %*d received, %d%% loss", &pl) == 1
>
> instead of
> sscanf (input_buffer, "%*d packets transmitted, %*d packets received, %d%% packet loss", &pl) == 1
>
> AND
>
> sscanf (input_buffer, "rtt min/avg/max/mdev = %*f/%f/%*f/%*f", &rta) == 1
> instead of
> sscanf (input_buffer, "round-trip min/avg/max/mdev = %*f/%f/%*f/%*f", &rta) == 1
>
> Does someone understand why it does not work with this modifications ?
I don't see why your mods don't work. But the work has already been
done, I think. Have you tried the code form the current CVS tree?
It works for me on RH8.0, which uses the new iputils.
--
Karl DeBisschop <karl at debisschop.net>
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html
More information about the Users
mailing list