[ntp:questions] what's the matter with my ntp

※踏梦狼※ 121156191 at qq.com
Fri Aug 28 02:52:17 UTC 2015


hello,   I set up two ntp server in my network,my all ntp version:ntp-4.2.6p5-3.el6.centos.x86_64


1、my ntp servers ip are 10.2.3.30 and 10.2.4.30,it's configured like below:


[root at ntp1 ~]# cat /etc/ntp.conf 
# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).


driftfile /var/lib/ntp/drift
statsdir /var/log/ntp/
logfile /var/log/ntp/ntp.log 


# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery


# Permit all access over the loopback interface.  This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1 
restrict -6 ::1


# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
restrict 10.0.0.0 mask 255.0.0.0 nomodify


# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).


server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 3.pool.ntp.org
server 127.127.1.0
fudge  127.127.1.0 stratum 10


#broadcast 192.168.1.255 autokey        # broadcast server
#broadcastclient                        # broadcast client
#broadcast 224.0.1.1 autokey            # multicast server
#multicastclient 224.0.1.1              # multicast client
#manycastserver 239.255.254.254         # manycast server
#manycastclient 239.255.254.254 autokey # manycast client


# Enable public key cryptography.
#crypto


includefile /etc/ntp/crypto/pw


# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography. 
keys /etc/ntp/keys


# Specify the key identifiers which are trusted.
#trustedkey 4 8 42


# Specify the key identifier to use with the ntpdc utility.
#requestkey 8


# Specify the key identifier to use with the ntpq utility.
#controlkey 8


# Enable writing of statistics records.
#statistics clockstats cryptostats loopstats peerstats



2、Other client machines used above ntp is used /etc/ntp.conf,configure like below:
[root at S10-2-1-3 ~]# cat /etc/ntp.conf 
# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).


driftfile /var/lib/ntp/drift


# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery


# Permit all access over the loopback interface.  This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1 
restrict -6 ::1


# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap


# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server ntp1.husor.cn prefer
server ntp2.husor.cn


#broadcast 192.168.1.255 autokey        # broadcast server
#broadcastclient                        # broadcast client
#broadcast 224.0.1.1 autokey            # multicast server
#multicastclient 224.0.1.1              # multicast client
#manycastclient 239.255.254.254 autokey # manycast client


# Enable public key cryptography.
#crypto


includefile /etc/ntp/crypto/pw


# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography. 
keys /etc/ntp/keys


# Specify the key identifiers which are trusted.
#trustedkey 4 8 42


# Specify the key identifier to use with the ntpdc utility.
#requestkey 8


# Specify the key identifier to use with the ntpq utility.
#controlkey 8


# Enable writing of statistics records.
#statistics clockstats cryptostats loopstats peerstats



When client machines use i set up the server ntp,the time got wrong,i look up /var/log/message,it likes this:


Aug 13 19:15:44 V10-2-1-71 ntpd[16969]: 0.0.0.0 0613 03 spike_detect -0.155967 s
Aug 13 19:50:52 V10-2-1-71 ntpd[16969]: 0.0.0.0 061c 0c clock_step -0.193569 s
Aug 13 19:50:52 V10-2-1-71 ntpd[16969]: 0.0.0.0 0615 05 clock_sync
Aug 13 19:50:53 V10-2-1-71 ntpd[16969]: 0.0.0.0 c618 08 no_sys_peer
Aug 14 02:01:42 V10-2-1-71 ntpd[16969]: 0.0.0.0 0613 03 spike_detect +0.155451 s
Aug 14 02:37:38 V10-2-1-71 ntpd[16969]: 0.0.0.0 061c 0c clock_step +0.262107 s
Aug 14 02:37:38 V10-2-1-71 ntpd[16969]: 0.0.0.0 0615 05 clock_sync
Aug 14 02:37:39 V10-2-1-71 ntpd[16969]: 0.0.0.0 c618 08 no_sys_peer
Aug 14 03:49:19 V10-2-1-71 ntpd[16969]: 0.0.0.0 0613 03 spike_detect +0.128275 s
Aug 14 04:06:32 V10-2-1-71 ntpd[16969]: 0.0.0.0 061c 0c clock_step +0.150471 s
Aug 14 04:06:32 V10-2-1-71 ntpd[16969]: 0.0.0.0 0615 05 clock_sync
Aug 14 04:06:33 V10-2-1-71 ntpd[16969]: 0.0.0.0 c618 08 no_sys_peer
Aug 14 05:19:44 V10-2-1-71 ntpd[16969]: 0.0.0.0 0613 03 spike_detect +0.152597 s
Aug 14 05:37:47 V10-2-1-71 ntpd[16969]: 0.0.0.0 0615 05 clock_sync
Aug 14 07:24:28 V10-2-1-71 ntpd[16969]: 0.0.0.0 0613 03 spike_detect +0.218401 s
Aug 14 07:59:30 V10-2-1-71 ntpd[16969]: 0.0.0.0 061c 0c clock_step +0.197978 s
Aug 14 07:59:30 V10-2-1-71 ntpd[16969]: 0.0.0.0 0615 05 clock_sync
Aug 14 07:59:31 V10-2-1-71 ntpd[16969]: 0.0.0.0 c618 08 no_sys_peer
Aug 14 11:33:22 V10-2-1-71 ntpd[16969]: 0.0.0.0 0613 03 spike_detect -0.160123 s
Aug 14 12:08:39 V10-2-1-71 ntpd[16969]: 0.0.0.0 061c 0c clock_step -0.183142 s
Aug 14 12:08:39 V10-2-1-71 ntpd[16969]: 0.0.0.0 0615 05 clock_sync
Aug 14 12:08:40 V10-2-1-71 ntpd[16969]: 0.0.0.0 c618 08 no_sys_peer
Aug 14 21:58:12 V10-2-1-71 ntpd[16969]: 0.0.0.0 0613 03 spike_detect -0.139479 s
Aug 14 22:34:05 V10-2-1-71 ntpd[16969]: 0.0.0.0 061c 0c clock_step -0.202018 s
Aug 14 22:34:05 V10-2-1-71 ntpd[16969]: 0.0.0.0 0615 05 clock_sync
Aug 14 22:34:06 V10-2-1-71 ntpd[16969]: 0.0.0.0 c618 08 no_sys_peer
Aug 15 10:52:56 V10-2-1-71 ntpd[16969]: 0.0.0.0 0613 03 spike_detect +0.145345 s
Aug 15 11:10:55 V10-2-1-71 ntpd[16969]: 0.0.0.0 061c 0c clock_step +0.235000 s
Aug 15 11:10:55 V10-2-1-71 ntpd[16969]: 0.0.0.0 0615 05 clock_sync
Aug 15 11:10:56 V10-2-1-71 ntpd[16969]: 0.0.0.0 c618 08 no_sys_peer
Aug 15 20:37:36 V10-2-1-71 ntpd[16969]: 0.0.0.0 0613 03 spike_detect -0.131975 s
Aug 15 21:11:57 V10-2-1-71 ntpd[16969]: 0.0.0.0 061c 0c clock_step -0.159200 s
Aug 15 21:11:57 V10-2-1-71 ntpd[16969]: 0.0.0.0 0615 05 clock_sync
Aug 15 21:11:58 V10-2-1-71 ntpd[16969]: 0.0.0.0 c618 08 no_sys_peer
Aug 15 22:07:32 V10-2-1-71 ntpd[16969]: 0.0.0.0 0613 03 spike_detect -0.139116 s
Aug 15 22:25:38 V10-2-1-71 ntpd[16969]: 0.0.0.0 061c 0c clock_step -0.210902 s
Aug 15 22:25:38 V10-2-1-71 ntpd[16969]: 0.0.0.0 0615 05 clock_sync
Aug 15 22:25:39 V10-2-1-71 ntpd[16969]: 0.0.0.0 c618 08 no_sys_peer
Aug 15 23:38:16 V10-2-1-71 ntpd[16969]: 0.0.0.0 0613 03 spike_detect -0.134828 s
Aug 15 23:55:59 V10-2-1-71 ntpd[16969]: 0.0.0.0 061c 0c clock_step +0.161490 s
Aug 15 23:55:59 V10-2-1-71 ntpd[16969]: 0.0.0.0 0615 05 clock_sync
Aug 15 23:56:00 V10-2-1-71 ntpd[16969]: 0.0.0.0 c618 08 no_sys_peer



i look ntp log file like this:
[root at V10-2-1-71 ~]# cat /var/log/ntp/ntp.log 
20 Aug 12:19:55 ntpd[14554]: 0.0.0.0 c016 06 restart
20 Aug 12:19:55 ntpd[14554]: 0.0.0.0 c012 02 freq_set kernel -3.841 PPM
20 Aug 12:23:13 ntpd[14554]: 0.0.0.0 c615 05 clock_sync
20 Aug 12:32:01 ntpd[14554]: 0.0.0.0 0613 03 spike_detect -0.137249 s
20 Aug 12:37:29 ntpd[14554]: 0.0.0.0 0618 08 no_sys_peer
20 Aug 12:42:52 ntpd[14554]: 0.0.0.0 061c 0c clock_step -0.465698 s
20 Aug 12:42:51 ntpd[14554]: 0.0.0.0 0614 04 freq_mode
20 Aug 12:42:52 ntpd[14554]: 0.0.0.0 c618 08 no_sys_peer
20 Aug 12:58:17 ntpd[14554]: 0.0.0.0 c612 02 freq_set kernel -586.374 PPM
20 Aug 12:58:17 ntpd[14554]: 0.0.0.0 c61c 0c clock_step -0.522594 s
20 Aug 12:58:17 ntpd[14554]: 0.0.0.0 c615 05 clock_sync
20 Aug 12:58:18 ntpd[14554]: 0.0.0.0 c618 08 no_sys_peer
20 Aug 13:11:51 ntpd[14554]: 0.0.0.0 0613 03 spike_detect +0.247108 s
20 Aug 13:28:12 ntpd[14554]: 0.0.0.0 061c 0c clock_step +0.174737 s
20 Aug 13:28:12 ntpd[14554]: 0.0.0.0 0614 04 freq_mode
20 Aug 13:28:13 ntpd[14554]: 0.0.0.0 c618 08 no_sys_peer
20 Aug 13:43:52 ntpd[14554]: 0.0.0.0 c612 02 freq_set kernel -461.842 PPM
20 Aug 13:43:52 ntpd[14554]: 0.0.0.0 c615 05 clock_sync
20 Aug 19:48:08 ntpd[14554]: 0.0.0.0 0613 03 spike_detect +1.010504 s
20 Aug 20:05:14 ntpd[14554]: 0.0.0.0 061c 0c clock_step +1.491656 s
20 Aug 20:05:15 ntpd[14554]: 0.0.0.0 0615 05 clock_sync
20 Aug 20:05:16 ntpd[14554]: 0.0.0.0 c618 08 no_sys_peer
20 Aug 20:42:53 ntpd[14554]: 0.0.0.0 c613 03 spike_detect +0.949681 s
20 Aug 21:00:09 ntpd[14554]: 0.0.0.0 c618 08 no_sys_peer
21 Aug 14:24:50 ntpd[14554]: ntpd exiting on signal 15
28 Aug 10:25:48 ntpd[5937]: 0.0.0.0 c016 06 restart
28 Aug 10:25:48 ntpd[5937]: 0.0.0.0 c012 02 freq_set kernel -471.344 PPM
28 Aug 10:29:04 ntpd[5937]: 0.0.0.0 c61c 0c clock_step +0.233855 s
28 Aug 10:29:04 ntpd[5937]: 0.0.0.0 c614 04 freq_mode
28 Aug 10:29:05 ntpd[5937]: 0.0.0.0 c618 08 no_sys_peer
28 Aug 10:44:43 ntpd[5937]: 0.0.0.0 c612 02 freq_set kernel -25.526 PPM
28 Aug 10:44:43 ntpd[5937]: 0.0.0.0 c61c 0c clock_step +0.418623 s
28 Aug 10:44:44 ntpd[5937]: 0.0.0.0 c618 08 no_sys_peer



The word of "no_sys_peer" in log,it it irrcorrect ? what's the wrong with my ntp ?


I wait for your answer my question , thanks!


More information about the questions mailing list