command question..

Martin McCann martin at orbweavers.co.uk
Thu Sep 8 14:59:30 PDT 2005


On Thursday 08 September 2005 22:12, Eric Murphy wrote:
> Hey guys heres a quick question for you...
>
> I am trying to ping a certain website with the following command .  ping
> yahoo.com
>
> I would like to log all requests that come back higher then 100 or any #
> i specify.
>
> I figured I could use the script command but im not sure how to go from
> there?
>
> Reason for this is to prove to my ISP that there is something wrong with
> my connection :)
>
> Would it also be possible to log the date and time of each requets?
>
> So inconclusion I'd like to log all icmp requests that come back higher
> then 100 by date and time into a log file.

date > pings.txt ; ping -c 10 www.yahoo.com | awk '{ print $7 ; }' | sort >> 
pings.txt  

this will give you a file with the date then the pings sorted from quickest to 
slowest. Plenty of scope to make it nicer, but it gets you the info you want. 
(You will probably want to increase the count, but I would also add a delay, 
-i, it will give you a better range and also it is not nice to fire a lot of 
pings to a public server). 


Martin 


>
> Thanks
>
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"


More information about the freebsd-questions mailing list