Linux and Nagios‎ > ‎

Raspberry Pi Time Synch

posted 22 May 2017, 12:50 by Tristan Self   [ updated 21 Oct 2017, 12:15 ]
The Raspberry Pi lacks a real time clock, which means that the time can drift, so much so that NTP fails to update the software clock because its skewed so much.

To resolve this you can do the following:

Add this to /etc/ntp.conf:

tinker panic 0

That will cause ntpd to sync despite the large clock offset.

sudo service ntpd stop
sudo ntpd -gq
sudo service ntpd start

Now run a "date" and check the time has synched as expected.

You can also try to create a cron job to force the synch to a remote server if the above still does not keep it in synch, Setting this every 5 minutes or 15 minutes interval should do the trick.

/etc/init.d/ntp stop
/usr/sbin/ntpdate -s
/etc/init.d/ntp start