in reply to Re: MRTG script should be easy
in thread MRTG script should be easy

I'd have to disagree with using m// to grab data out of a system ping.

Using a regex to grab out the data would restrict the script to running on one OS and one version of ping - as has been pointed out already, ping outputs slightly different data between versions (from a "Host is Alive" on Solaris to timings, averages and losses on my linux system at home). Changes to either the OS or the version of ping could, and probably would, break the regex, and the script would fail.

Having said that, though, splitting as the OP is currently doing would restrict to an OS/version in a similar way, so I guess nothing would be lost by using a regexp from his PoV.

-- Foxcub
#include www.liquidfusion.org.uk