Various Time Scripts

To see the offset for a range of system

for X in `cat YourList.txt`
do
Y=`ssh $X -l root 'ntpdate -q 10.168.XX.XX' | awk -F, '{print $3}'`
echo $X $Y
done


Your output

HOST1 offset 0.007304
HOST2 offset 0.044396
HOST3 offset 0.038323
HOST4 offset 274.636170
HOST5 offset 189.366374

To see how far your servers are from the NTP source

for X in `cat YourList.txt`
do
Y=`ssh $X -l root 'ntpdc -c loopinfo' | grep offset`
echo $X $Y
done

Output

HOST1 offset: 0.009959 s
HOST2 offset: 0.042295 s
HOST3 offset: 0.038320 s
HOST4 offset: 0.000000 s
HOST5 offset: 0.000000 s

0.000000 s means you haven’t picked up an authoritative time source yet.