# Frequency error

**URL:** <https://community.ntppool.org/t/frequency-error/1872>\
**Category:** Client Configuration and Development\
**Created:** [December 17, 2020, 7:20am UTC](https://community.ntppool.org/t/frequency-error/1872 "2020-12-17T07:20:53Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![kishan.kava](https://avatars.discourse-cdn.com/v4/letter/k/e9bcb4/32.png) [@kishan.kava](https://community.ntppool.org/u/kishan.kava)\
**Post date:** [December 17, 2020, 7:20am UTC](https://community.ntppool.org/t/frequency-error/1872/1 "2020-12-17T07:20:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![elljay](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@elljay](https://community.ntppool.org/u/elljay)\
**Post date:** [December 17, 2020, 9:19am UTC](https://community.ntppool.org/t/frequency-error/1872/2 "2020-12-17T09:19:14Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![kishan.kava](https://avatars.discourse-cdn.com/v4/letter/k/e9bcb4/32.png) [@kishan.kava](https://community.ntppool.org/u/kishan.kava)\
**Post date:** [December 17, 2020, 1:54pm UTC](https://community.ntppool.org/t/frequency-error/1872/3 "2020-12-17T13:54:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![elljay](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@elljay](https://community.ntppool.org/u/elljay)\
**Post date:** [December 17, 2020, 3:23pm UTC](https://community.ntppool.org/t/frequency-error/1872/4 "2020-12-17T15:23:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kishan.kava](https://avatars.discourse-cdn.com/v4/letter/k/e9bcb4/32.png) [@kishan.kava](https://community.ntppool.org/u/kishan.kava)\
**Post date:** [December 17, 2020, 5:56pm UTC](https://community.ntppool.org/t/frequency-error/1872/5 "2020-12-17T17:56:49Z")

</div>

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

![image](https://us1.discourse-cdn.com/flex016/uploads/ntppool/original/1X/037948a2e44fa27d2fdfdb39b23b91da3e72dc59.png)

---

<div class="post-metadata">

**Author:** ![gunnar](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/gunnar/32/689_2.png) [@gunnar](https://community.ntppool.org/u/gunnar)\
**Post date:** [December 17, 2020, 6:39pm UTC](https://community.ntppool.org/t/frequency-error/1872/6 "2020-12-17T18:39:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kishan.kava](https://avatars.discourse-cdn.com/v4/letter/k/e9bcb4/32.png) [@kishan.kava](https://community.ntppool.org/u/kishan.kava)\
**Post date:** [December 18, 2020, 7:32am UTC](https://community.ntppool.org/t/frequency-error/1872/7 "2020-12-18T07:32:24Z")

</div>

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](http://0.in.pool.ntp.org) -\> 13.126.27.131  
18 Dec 12:32:02 ntpd[2812]: DNS [1.in.pool.ntp.org](http://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](https://us1.discourse-cdn.com/flex016/uploads/ntppool/original/1X/a4b2207ed65981758affde23e2261d413f528754.png)

---

<div class="post-metadata">

**Author:** ![NTPman](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/ntpman/32/450_2.png) [@NTPman](https://community.ntppool.org/u/NTPman)\
**Post date:** [December 18, 2020, 8:36am UTC](https://community.ntppool.org/t/frequency-error/1872/8 "2020-12-18T08:36:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![elljay](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@elljay](https://community.ntppool.org/u/elljay)\
**Post date:** [December 18, 2020, 8:50am UTC](https://community.ntppool.org/t/frequency-error/1872/9 "2020-12-18T08:50:55Z")

</div>

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](http://www.eecis.udel.edu/~mills/ntp/html/decode.html#sys)

---

<div class="post-metadata">

**Author:** ![kishan.kava](https://avatars.discourse-cdn.com/v4/letter/k/e9bcb4/32.png) [@kishan.kava](https://community.ntppool.org/u/kishan.kava)\
**Post date:** [December 18, 2020, 11:12am UTC](https://community.ntppool.org/t/frequency-error/1872/10 "2020-12-18T11:12:00Z")

</div>

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](http://0.in.pool.ntp.org) -\> 13.126.27.131  
18 Dec 12:32:02 ntpd[2812]: DNS [1.in.pool.ntp.org](http://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

---

<div class="post-metadata">

**Author:** ![NTPman](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/ntpman/32/450_2.png) [@NTPman](https://community.ntppool.org/u/NTPman)\
**Post date:** [December 18, 2020, 2:05pm UTC](https://community.ntppool.org/t/frequency-error/1872/11 "2020-12-18T14:05:59Z")

</div>

> [@kishan.kava](#):
>
> in first 10 minute only.

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.

> [@kishan.kava](#):
>
> then get error of drift file.

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

---

<div class="post-metadata">

**Author:** ![kishan.kava](https://avatars.discourse-cdn.com/v4/letter/k/e9bcb4/32.png) [@kishan.kava](https://community.ntppool.org/u/kishan.kava)\
**Post date:** [December 23, 2020, 5:25am UTC](https://community.ntppool.org/t/frequency-error/1872/12 "2020-12-23T05:25:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![elljay](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@elljay](https://community.ntppool.org/u/elljay)\
**Post date:** [December 23, 2020, 8:32am UTC](https://community.ntppool.org/t/frequency-error/1872/13 "2020-12-23T08:32:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![NTPman](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/ntpman/32/450_2.png) [@NTPman](https://community.ntppool.org/u/NTPman)\
**Post date:** [December 23, 2020, 11:04am UTC](https://community.ntppool.org/t/frequency-error/1872/14 "2020-12-23T11:04:18Z")

</div>

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?)

---

<div class="post-metadata">

**Author:** ![kishan.kava](https://avatars.discourse-cdn.com/v4/letter/k/e9bcb4/32.png) [@kishan.kava](https://community.ntppool.org/u/kishan.kava)\
**Post date:** [December 28, 2020, 9:33am UTC](https://community.ntppool.org/t/frequency-error/1872/15 "2020-12-28T09:33:31Z")

</div>

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