[root@localhost etc]# cat 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).
#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
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
#server 127.127.1.0 # local clock
#fudge 127.127.1.0 stratum 10
# 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
##server 0.fedora.pool.ntp.orgx dynamic
##server 1.fedora.pool.ntp.orgx dynamic
##server 2.fedora.pool.ntp.orgx dynamic
server 0.ru.pool.ntp.org dynamic
[root@localhost etc]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
petrel.telecom. 192.36.143.150 2 u 22 64 77 24.895 191794. 124241.
Во первых не совсем понятно почему pertel.telecom когда выствлен совсем другой адрес...
А во вторых время стало отставать! Как же мне сделать чтобы оно с пом ntpd синхронизировалось каждую минуту?
$ host ru.pool.ntp.org
ru.pool.ntp.org has address 217.172.21.161
ru.pool.ntp.org has address 77.108.65.40
ru.pool.ntp.org has address 85.21.78.6
ru.pool.ntp.org has address 88.212.197.86
ru.pool.ntp.org has address 194.33.191.69
server europe.pool.ntp.org
server europe.pool.ntp.org
server europe.pool.ntp.org
server europe.pool.ntp.org
server europe.pool.ntp.org
driftfile /var/lib/ntp/drift
logfile /var/log/ntp.log
restrict 127.0.0.1
restrict 192.168.x.x mask 255.255.255.0 nomodify notrap
net stop w32time
net time /setsntp:192.168.0.1
net time /querysntp
regedit /s run.reg
net start w32time
sc config w32time start = auto
w32tm /resync
net start w32time
хорошо... Но как тогда задать переодичность синхронизации?
P.S. адрес все равно этого не вижу в выводе данной команды.
minpoll x
maxpoll x
где x значит:
4 - 16 sec
5 - 32 sec
6 - 64 sec (дефолтное minpool)
7 - 128 sec
8 - 256 sec
9 - 512 sec
10 - 1024 sec (дефолтное maxpool)
11 - 2048 sec
12 - 4096 sec
13 - 8192 sec
14 - 16384 sec
Зачем вам менять эти значения то?
NTP подстраивает скорость часов так чтоб они шли синхронно с сервером, чем синхронее время у клиента и сервера, тем больше время между запросами.
Если надо сразу засинхроинизровать время ("скачком", а не как ntpd - плавным регулированием скорости хода часов) то используйте команду ntpdate ru.pool.ntp.org (предварительно остановив ntpd)
попробуйте запускать команду ntpq с ключем -n (чтоб видеть адреса в числовом виде, и уже поискать сервера по адресам а не по именам)
P.S. адрес все равно этого не вижу в выводе данной команды.
Сервера переходят из пула в пул, так что адреса могут меняться каждый день(мб, чаще/реже)... Мой сервер, например, прямо сейчас обитает в 0.ru.pool.ntp.org, хотя раньше обитал в других...
К тому же -- ru.pool.ntp.org & 0.ru.pool.ntp.org -- разные адреса.