Are ntpd and ntpdate both being run on my system?

0

I have a computer running ubuntu 14.04. I am running a process that is sensitive to time jumps, and I have noticed some time jumps have happened, on the order of 100s of milliseconds both forwards and backwards. My understanding is that ntpd should only do a step correction if the time offset is greater than 128 ms for an extended period of time. However, when I look in my syslog, I see this:

Feb  1 06:57:11 alice ntpd[2252]: ntpd exiting on signal 15
Feb  1 06:57:22 alice ntpdate[2375]: step time server 71.210.146.228 offset 0.007476 sec
Feb  1 06:57:22 alice ntpd[2569]: ntpd 4.2.6p5@1.2349-o Wed Oct  5 12:35:47 UTC 2016 (1)
Feb  1 06:57:22 alice ntpd[2570]: proto: precision = 0.417 usec
Feb  1 06:57:22 alice ntpd[2570]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
Feb  1 06:57:22 alice ntpd[2570]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Feb  1 06:57:22 alice ntpd[2570]: Listen and drop on 1 v6wildcard :: UDP 123
Feb  1 06:57:22 alice ntpd[2570]: Listen normally on 2 lo 127.0.0.1 UDP 123
Feb  1 06:57:22 alice ntpd[2570]: Listen normally on 3 wlan0 10.2.21.26 UDP 123
Feb  1 06:57:22 alice ntpd[2570]: peers refreshed
Feb  1 06:57:22 alice ntpd[2570]: Listening on routing socket on fd #22 for interface updates
Feb  1 06:57:26 alice ntpd[2570]: ntpd exiting on signal 15
Feb  1 06:57:37 alice ntpdate[2941]: adjust time server 198.60.22.240 offset -0.008872 sec

The ntpdate step commands here appear to be stepping less than 128ms (in other sections of the syslog, there are bigger jumps). Does ntpd call ntpdate to issue a step correction, or is some other process running ntpdate? If it is the latter, how do I figure out what that service is? I would like to disable it so that I can call ntpdate only when it is safe to have a time jump.

Edit - More logs:

There are also larger jumps in the logs. Examples:

Jan 31 08:54:10 alice ntpdate[2426]: adjust time server 132.163.4.102 offset 0.432374 sec
Feb  1 06:57:07 alice ntpdate[935]: step time server 198.60.22.240 offset 1.492618 sec
Feb  1 06:57:22 alice ntpdate[2375]: step time server 71.210.146.228 offset 0.007476 sec
Feb  1 06:57:37 alice ntpdate[2941]: adjust time server 198.60.22.240 offset -0.008872 sec

grien

Posted 2017-02-07T15:00:44.840

Reputation: 1

The logs you provided us indicate you have a delta of only around +/- 8 ms. If you want an offset even smaller you will have to provide multiple redundant stable sources. – Ramhound – 2017-02-07T15:28:37.917

@Ramhound I added more log entries. +/- 8 ms isn't a big deal, but I'd like to avoid a 432 ms jump. – grien – 2017-02-07T16:01:06.007

If your source offset is so high on 132.x.x.x. Have you tried removing it? Something is causing your source to drift away from the NTP server in question – Ramhound – 2017-02-07T18:32:47.547

yes, it looks like you call ntpdate and ntpd which then shuts-down. Have a check in the cron or scheduler dirs and see if there is something there. You should only run ntpd constantly to keep your system in check with a minimum of 3 time servers – user3788685 – 2017-02-17T18:52:34.963

Answers

0

Both ntpd and ntpdate were being run. After greping my /etc directory, I discovered that there was a script to run ntpdate in my if-up.d/ directory. I removed this and am now managing time with just ntpd.

grien

Posted 2017-02-07T15:00:44.840

Reputation: 1