A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

How to fix ntpdate

# set 'server' value in config to the correct ntp date server on your network
$ sudo vim /etc/ntp.conf

# force update (1.2.3.4 is your ntp date server)
$ sudo /etc/init.d/ntpd stop
$ sudo /usr/sbin/ntpdate 1.2.3.4
$ sudo /etc/init.d/ntpd start


# check it worked (offset should be < 10)

$ ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 1.2.3.4            6.7.8.3      3 u    6   64    1    3.902   -0.216   0.001
 1.2.3.5            6.7.8.4      3 u    5   64    1    1.753    0.048   0.001