NTP服务器和客户端的设置及使用(EN版)
or it can be controlled using command line arguments. Requests to
read and write arbitrary variables can be assembled, with raw and
pretty-printed output options available. By sending multiple queries
to the server, ntpq can also obtain and print a list of peers in a
common format.
To query an NTP server for a list of its peers:
# ntpq -p jedi remote refid st t when poll reach delay
offset disp ====================================================================
========== *eastpager1.East dollar.East.Sun 3 u 97 64 376 2.03
4.564 2.33 LOCAL(0) LOCAL(0) 5 l 19 64 377 0.00
0.000 10.01 NTP.MCAST.NET 0.0.0.0 16 - - 64 0 0.00
0.000 16000.0 255.255.255.255 0.0.0.0 16 - - 64 0 0.00
0.000 16000.0 +sunswe.Sweden.S carbon.UK.Sun.C 3 u 48 64 377 156.80
6.367 0.41 +canadamail1.Can franc.East.Sun. 3 u 12 64 377 29.48
13.528 29.65 -cosmo.Eng.Sun.C rolex.East.Sun. 2 u 98 128 377 84.08 -
1.069 0.87 -centralpager1.C venus.EBay.Sun. 3 u 41 128 377 68.73 -
19.219 6.70
remote - is the remote peer
refid - is the host that the peer is synchronizing to
st - stratum number
t - type i.e. unicast, mulitcast, or local (a "-" equals don't know)
poll - polling interval in secs
reach - reachability register
* in remote indicates currently selected peer
+ means that the host is an acceptable peer for synchronization but
not accepted
- not acceptable
[size=2]6. Some useful debugging[/size]
When using "server" mode (association) it is advisable to have at
least 3 different servers listed in the ntp.conf file. If the
servers that you are configuring are out on the Internet and you
have a firewall set up, you will want to make sure that there is a
rule on the firewall that allows port 123 NTP traffic in and out
from your NTP server. It will normally take about 5 minutes or more
for your NTP server to become synchronized with the time servers
listed in the ntp.conf. Until you become synchronized you will not
start sending out broadcast/multicast NTP packets to other NTP |