Hi,
I would like to get the clock on the rpi set so that it doesn’t drift. I’m using the rpi for a timing application over a wide temperature range and just having the clock updated once per day with a cron job is not going to cut it as the drift is significant.
So I would like to have ntp running all the time.
If I run nptd from the command line, it starts and runs.
I’ve edited the ntp.config file to allow for logs to be created
/etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
Enable this if you want statistics to be logged.
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
My rpi is headless and I’m using ssh.
So my problems and questions and remember that I am a beginner here:
- What is the best way to start ntp at boot and set the clock?
- Can I just remove the ntp lines in the daily cron job and not break anything else?
- When i run ntp from the command line the drift file does not get updated. ntp is running under root and the drift file is owned by ntp. I don’t know if that is the problem or not with my ignorance.
- Is there a place that errors (like file permissions) would show up? I have logging turned on, but there is little that I see in the /var/log area.
- loopstats and peerstats start to show in the /var/log/ntpstats dir, but they get deleted every few minutes by something so that I only have 0 to 5 last entries. I was expecting a full day per file of data that I could look at.
- There is no clockstats file - should there be in ntp client mode?
Any other pointers that I may be missing?
Thanks,
Gordon Williams