Frequency error

hi
ntpd -d

driftfile /var/lib/ntp/ntp.drift
logfile /scandata/ntp.log
tinker panic 0
logconfig =all

Enable this if you want statistics to be logged.

more information.

server 10.100.130.72 prefer

By default, exchange time with everybody, but don’t allow configuration.

restrict -4 default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited

Local users may interrogate the ntp server more closely.

restrict 127.0.0.1
restrict ::1

Needed for adding pool entries

restrict source notrap nomodify noquery

cryptographically authenticated.

restrict 10.100.130.72 mask 255.255.255.0 notrust

If you want to listen to time broadcasts on your local subnet, de-comment the

next lines. Please do this only if you trust everybody on the network!

#disable auth
broadcastclient

    my conf file is as above and i trying to start ntp daemon and it show clock unsynchronized and i dig up bit more in that and found some frequency issue, for more clarification please look at below log.

17 Dec 06:24:07 ntpd[1954]: Listen and drop on 0 v6wildcard [::]:123
17 Dec 06:24:07 ntpd[1954]: Listen and drop on 1 v4wildcard 0.0.0.0:123
17 Dec 06:24:07 ntpd[1954]: Listen normally on 2 eth0 [fe80::821f:12ff:fef2:d15c%4]:123
17 Dec 06:24:07 ntpd[1954]: Listen normally on 3 dummy0 [fe80::1cb5:faff:fe55:42c0%3]:123
17 Dec 06:24:07 ntpd[1954]: Listen normally on 4 lo [::1]:123
17 Dec 06:24:07 ntpd[1954]: Listen normally on 5 eth0 10.100.130.50:123
17 Dec 06:24:07 ntpd[1954]: Listen normally on 6 lo 127.0.0.1:123
17 Dec 06:24:07 ntpd[1954]: Listening on routing socket on fd #27 for interface updates
17 Dec 06:24:07 ntpd[1954]: Listen for broadcasts to 10.100.131.255 on interface #5 eth0
17 Dec 06:24:07 ntpd[1954]: kernel reports TIME_ERROR: 0x6041: Clock Unsynchronized
17 Dec 06:24:07 ntpd[1954]: 0.0.0.0 c01d 0d kern kernel time sync enabled
17 Dec 06:24:07 ntpd[1954]: kernel reports TIME_ERROR: 0x6041: Clock Unsynchronized
17 Dec 06:24:07 ntpd[1954]: 0.0.0.0 c011 01 freq_not_set
17 Dec 06:24:07 ntpd[1954]: 0.0.0.0 c016 06 restart
17 Dec 06:27:22 ntpd[1954]: 0.0.0.0 c614 04 freq_mode
17 Dec 06:32:53 ntpd[1954]: kernel reports TIME_ERROR: 0x6041: Clock Unsynchronized
17 Dec 06:32:53 ntpd[1954]: 0.0.0.0 0615 05 clock_sync

best regards

Hi and welcome. It’s normal to see unsynchronized messages when ntpd starts up.

What does “ntpq -c peers” report after ntpd has been running for at least 10 minutes?

hi @elljay
after 10 min clock is in unsynchronized state, could you please suggest more specific to debug

Hi, please can you post the output of “ntpq -c peers” so we can see how many peers you have configured and whether they are reachable etc.

hello,
thank you for reply, i had configure with mine local machine as config file in above post.

image

Hi, just one remote server is too little for ntpd to adjust the clock and be confident that the time is right.
Ntpd needs at least 3 servers to be sure of the correct time, before setting and adjusting the clock and distributing time. With 3 servers ntpd can vote out a “false ticker”.
Segal’s Law: " A man with a watch knows what time it is. A man with two watches is never sure."

Configure 3 - 7 servers and then ntpd should stop the alert.

Hi,
added pool server as well as local server with prefer option, and the result is same, can you please tell more about freq. settings, as per my views it not set due to ntp_adjtime() and loop_config() then it set NSET state.

18 Dec 12:31:57 ntpd[2812]: Listen and drop on 0 v6wildcard [::]:123
18 Dec 12:31:57 ntpd[2812]: Listen and drop on 1 v4wildcard 0.0.0.0:123
18 Dec 12:31:57 ntpd[2812]: Listen normally on 2 eth0 [fe80::821f:12ff:fef2:d15c%4]:123
18 Dec 12:31:57 ntpd[2812]: Listen normally on 3 dummy0 [fe80::f0e1:9bff:fe52:7b37%3]:123
18 Dec 12:31:57 ntpd[2812]: Listen normally on 4 lo [::1]:123
18 Dec 12:31:57 ntpd[2812]: Listen normally on 5 eth0 10.100.130.50:123
18 Dec 12:31:57 ntpd[2812]: Listen normally on 6 lo 127.0.0.1:123
18 Dec 12:31:57 ntpd[2812]: Listening on routing socket on fd #27 for interface updates
18 Dec 12:31:57 ntpd[2812]: Listen for broadcasts to 10.100.131.255 on interface #5 eth0
18 Dec 12:31:57 ntpd[2812]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized
18 Dec 12:31:57 ntpd[2812]: 0.0.0.0 c01d 0d kern kernel time sync enabled
18 Dec 12:31:57 ntpd[2812]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized
18 Dec 12:31:57 ntpd[2812]: 0.0.0.0 c011 01 freq_not_set
18 Dec 12:31:57 ntpd[2812]: 0.0.0.0 c016 06 restart
18 Dec 12:32:02 ntpd[2812]: DNS 0.in.pool.ntp.org -> 13.126.27.131
18 Dec 12:32:02 ntpd[2812]: DNS 1.in.pool.ntp.org -> 162.159.200.123
18 Dec 12:35:16 ntpd[2812]: 0.0.0.0 c614 04 freq_mode
18 Dec 12:40:40 ntpd[2812]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized
18 Dec 12:40:40 ntpd[2812]: 0.0.0.0 0615 05 clock_sync

image

If you keep the ntpd running further, does it still report Clock Unsynchronized error time to time later on?

Or run “ntpq -c rv”. In the first line of the output, you should see clock_sync if the clock is synchronized. A full description of the first line of the output can be found here: http://www.eecis.udel.edu/~mills/ntp/html/decode.html#sys

in first 10 minute only. then get error of drift file.

18 Dec 12:31:57 ntpd[2812]: Listen and drop on 0 v6wildcard [::]:123
18 Dec 12:31:57 ntpd[2812]: Listen and drop on 1 v4wildcard 0.0.0.0:123
18 Dec 12:31:57 ntpd[2812]: Listen normally on 2 eth0 [fe80::821f:12ff:fef2:d15c%4]:123
18 Dec 12:31:57 ntpd[2812]: Listen normally on 3 dummy0 [fe80::f0e1:9bff:fe52:7b37%3]:123
18 Dec 12:31:57 ntpd[2812]: Listen normally on 4 lo [::1]:123
18 Dec 12:31:57 ntpd[2812]: Listen normally on 5 eth0 10.100.130.50:123
18 Dec 12:31:57 ntpd[2812]: Listen normally on 6 lo 127.0.0.1:123
18 Dec 12:31:57 ntpd[2812]: Listening on routing socket on fd #27 for interface updates
18 Dec 12:31:57 ntpd[2812]: Listen for broadcasts to 10.100.131.255 on interface #5 eth0
18 Dec 12:31:57 ntpd[2812]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized
18 Dec 12:31:57 ntpd[2812]: 0.0.0.0 c01d 0d kern kernel time sync enabled
18 Dec 12:31:57 ntpd[2812]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized
18 Dec 12:31:57 ntpd[2812]: 0.0.0.0 c011 01 freq_not_set
18 Dec 12:31:57 ntpd[2812]: 0.0.0.0 c016 06 restart
18 Dec 12:32:02 ntpd[2812]: DNS 0.in.pool.ntp.org -> 13.126.27.131
18 Dec 12:32:02 ntpd[2812]: DNS 1.in.pool.ntp.org -> 162.159.200.123
18 Dec 12:35:16 ntpd[2812]: 0.0.0.0 c614 04 freq_mode
18 Dec 12:40:40 ntpd[2812]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized
18 Dec 12:40:40 ntpd[2812]: 0.0.0.0 0615 05 clock_sync
18 Dec 13:31:57 ntpd[2812]: frequency file /var/lib/ntp/ntp.drift.TEMP: No such file or directory
18 Dec 14:31:57 ntpd[2812]: frequency file /var/lib/ntp/ntp.drift.TEMP: No such file or directory
18 Dec 15:31:57 ntpd[2812]: frequency file /var/lib/ntp/ntp.drift.TEMP: No such file or directory
18 Dec 16:31:57 ntpd[2812]: frequency file /var/lib/ntp/ntp.drift.TEMP: No such file or directory

So there seems to be no synchronization problem. At the start-up it is normal that the clock is not yet synchronized and that situation is reported.

The ntpd daemon may have lack of write permission to the directory /var/lib/ntp/ ?

hello
i had change directory path and permission and didn’t get directory error. but when i exit my time is roll over to hardware clock any view on this!

22 Dec 09:40:32 ntpd[2054]: Listen and drop on 0 v6wildcard [::]:123
22 Dec 09:40:32 ntpd[2054]: Listen and drop on 1 v4wildcard 0.0.0.0:123
22 Dec 09:40:32 ntpd[2054]: Listen normally on 2 eth0 [fe80::821f:12ff:fef2:d15c%4]:123
22 Dec 09:40:32 ntpd[2054]: Listen normally on 3 dummy0 [fe80::3cbe:57ff:fef1:933e%3]:123
22 Dec 09:40:32 ntpd[2054]: Listen normally on 4 lo [::1]:123
22 Dec 09:40:32 ntpd[2054]: Listen normally on 5 eth0 10.100.130.100:123
22 Dec 09:40:32 ntpd[2054]: Listen normally on 6 lo 127.0.0.1:123
22 Dec 09:40:32 ntpd[2054]: Listening on routing socket on fd #27 for interface updates
22 Dec 09:40:32 ntpd[2054]: Listen for broadcasts to 10.100.131.255 on interface #5 eth0
22 Dec 09:40:32 ntpd[2054]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized
22 Dec 09:40:32 ntpd[2054]: 0.0.0.0 c01d 0d kern kernel time sync enabled
22 Dec 09:40:32 ntpd[2054]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized
22 Dec 09:40:32 ntpd[2054]: 0.0.0.0 c012 02 freq_set kernel 0.000 PPM
22 Dec 09:40:32 ntpd[2054]: 0.0.0.0 c011 01 freq_not_set
22 Dec 09:40:32 ntpd[2054]: 0.0.0.0 c016 06 restart
22 Dec 09:43:51 ntpd[2054]: 0.0.0.0 c614 04 freq_mode
22 Dec 09:49:21 ntpd[2054]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized
22 Dec 09:49:21 ntpd[2054]: 0.0.0.0 0612 02 freq_set kernel 6.426 PPM
22 Dec 09:49:21 ntpd[2054]: 0.0.0.0 0615 05 clock_sync
22 Dec 14:25:00 ntpd[2054]: ntpd exiting on signal 2 (Interrupt)
22 Dec 14:25:00 ntpd[2054]: 10.100.130.72 local addr 10.100.130.100 ->
22 Dec 14:25:00 ntpd[2054]: 0.0.0.0 061d 0d kern kernel time sync disabled
1 Jan 00:00:14 ntpd[1678]: Listen and drop on 0 v6wildcard [::]:123
1 Jan 00:00:14 ntpd[1678]: Listen and drop on 1 v4wildcard 0.0.0.0:123
1 Jan 00:00:14 ntpd[1678]: Listen normally on 2 eth0 [fe80::821f:12ff:fef2:d15c%4]:123
1 Jan 00:00:14 ntpd[1678]: Listen normally on 3 dummy0 [fe80::50e0:67ff:feee:6799%3]:123
1 Jan 00:00:14 ntpd[1678]: Listen normally on 4 lo [::1]:123
1 Jan 00:00:14 ntpd[1678]: Listen normally on 5 eth0 10.100.130.100:123
1 Jan 00:00:14 ntpd[1678]: Listen normally on 6 lo 127.0.0.1:123
1 Jan 00:00:14 ntpd[1678]: Listening on routing socket on fd #27 for interface updates
1 Jan 00:00:14 ntpd[1678]: Listen for broadcasts to 10.100.131.255 on interface #5 eth0
1 Jan 00:00:14 ntpd[1678]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
1 Jan 00:00:14 ntpd[1678]: 0.0.0.0 c01d 0d kern kernel time sync enabled
1 Jan 00:00:14 ntpd[1678]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
1 Jan 00:00:14 ntpd[1678]: 0.0.0.0 c012 02 freq_set kernel 5.486 PPM
1 Jan 00:00:14 ntpd[1678]: 0.0.0.0 c016 06 restart

ntpd is a daemon - it’s meant to run in the background all the time.

Going back to the kitchen sink. What kind of hardware and OS do you have? What way do you start the ntpd and under which user id?

(1st January: Which year? 1970?)

i have android OS, ntpd -d -x -g command to start daemon and it set to 1st January 1970.