scripts/munin/ntp_server
Antoine Durand-Gasselin 4a68475e34 [wiki-lenny] suppression de static/
darcs-hash:20090314092631-bd074-b01256aeaf71e935851b3ecdbd623eaae8c9e8a1.gz
2009-03-14 10:26:31 +01:00

18 lines
466 B
Bash

#!/bin/sh
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
if [ "$1" = "config" ]; then
echo "graph_title NTP servers offset"
echo 'graph_args --base 1000 -l 0 '
echo 'graph_vlabel offset in µsec'
ntpq -p | grep -i '^[*+-]' | awk '{gsub("^.","",$1) ; gsub("[.-]", "_", $1); print $1 ".label " $1}'
exit 0
fi;
ntpq -p | grep -i '^[*+-]' | awk '{gsub("^.","",$1) ; gsub("[.-]", "_", $1); print $1 ".value " $9}'