28 ms·
It's not on a machine I have access to right now, but I'm fairly certain it went something like: while [ "true" ] do printf 'google_ping %f %s'
by falcolas 12y ago
It's not on a machine I have access to right now, but I'm fairly certain it went something like:
while [ "true" ]
do
printf 'google_ping %f %s' $(ping -c1 www.google.com | awk '/ms/ {print $7};' | awk -F '=' '{print $2};') $(date +%s) | nc graphite_host 2003
sleep 10
done
- tokenizerrr 12y agofwiw I use ping -n www.google.com | awk '/ms/ {split($7,p,"="); print "ping.google " p[2] " " strftime("%s")}; fflush()' | nc -q0 127.0.0.1 2003 &
- falcolas 12y agoI bow before your awk-fu. :)
- ajsharma 12y agoAwesome, thanks :)