Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jun 2005 09:04:45 +0200
From:      Jeremie Le Hen <jeremie@le-hen.org>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        freebsd-current@freebsd.org, jeremie@le-hen.org
Subject:   Re: incorrect ping(8) interval with powerd(8)
Message-ID:  <20050616070445.GD2239@obiwan.tataz.chchile.org>
In-Reply-To: <20050615.212446.29494502.imp@bsdimp.com>
References:  <20050615231823.GB2239@obiwan.tataz.chchile.org> <20050615.212446.29494502.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Warner,

> : %%%
> :     jarjarbinks:root# sysctl hw.acpi.acline
> :     hw.acpi.acline: 1
> :     jarjarbinks:root# sysctl dev.cpu.0.freq
> :     dev.cpu.0.freq: 1735
> :     jarjarbinks:root# time ping -qc 2 192.168.1.1
> :     PING 192.168.1.1 (192.168.1.1): 56 data bytes
> :     
> :     --- 192.168.1.1 ping statistics ---
> :     2 packets transmitted, 2 packets received, 0% packet loss
> :     round-trip min/avg/max/stddev = 0.266/0.269/0.271/0.002 ms
> :     
> :     real    0m1.003s
> :     user    0m0.001s
> :     sys     0m0.001s
> : 
> :     jarjarbinks:root# sysctl hw.acpi.acline
> :     hw.acpi.acline: 0
> :     jarjarbinks:root# sysctl dev.cpu.0.freq
> :     dev.cpu.0.freq: 216
> :     jarjarbinks:root# time ping -qc 2 192.168.1.1
> :     PING 192.168.1.1 (192.168.1.1): 56 data bytes
> :     
> :     --- 192.168.1.1 ping statistics ---
> :     2 packets transmitted, 2 packets received, 0% packet loss
> :     round-trip min/avg/max/stddev = 0.637/0.814/0.991/0.177 ms
> :     
> :     real    0m2.252s
> :     user    0m0.004s
> :     sys     0m0.021s
> : %%%
> : 
> : I check ping(8) source code and it appears it uses select(8) to wait
> : the desired amount of time.  I don't think this is the intended
> : behaviour.  Where does this bug (feature?) come from ?
> 
> Those numbers look about right for a 200MHz CPU.

May you delve into this a little bit more please ?  The ping(8) manual
page states that the -i flags makes ping(8) to wait a given couple of
seconds.  If I use the flags "-i 1", I expect ECHO Requests to be sent
with one second between each, whatever the AC line status is.
(Note that I didn't explicitely specified "-i 1" in the above example,
but this doesn't change the behaviour.)

Thank you.

Regards,
-- 
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050616070445.GD2239>