Код: Выделить всё
cat /etc/rc.conf
cat /etc/ntp.conf
если делал по статье, откуда
Код: Выделить всё
/var/db/ntpd.drift
Код: Выделить всё
cat /etc/rc.conf
cat /etc/ntp.conf
Код: Выделить всё
/var/db/ntpd.drift
Код: Выделить всё
# cat ntp.conf
server time.yars.free.net
driftfile /var/db/ntp.drift
logfile /var/log/ntp.log
restrict default ignore
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
# cat rc.conf
ntpdate_enable="YES"
ntpdate_flags="-u time.yars.free.net"
ntpd_enable="YES"
ntpd_program="/usr/local/bin/ntpd"
# cat /var/log/messages
Dec 17 07:45:12 gate ntpd[926]: ntpd 4.2.4p4@1.1520-o Sun Dec 14 17:31:28 UTC 2008 (1)
может, если не описан рестрикт для локал-хоста. У себя специально попробовал.m0ps писал(а):не может ntpq не отвечать в ntpd быть запущеным... что-то ты намудрил......Код: Выделить всё
cat /etc/rc.conf cat /etc/ntp.conf
Код: Выделить всё
restrict 127.0.0.1
Код: Выделить всё
netstat -a | grep -i listen | grep ntp
Код: Выделить всё
#cat ntp.conf
server time.yars.free.net
driftfile /var/db/ntp.drift
logfile /var/log/ntp.log
restrict default ignore
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
restrict time.yars.free.net
Код: Выделить всё
# cat rc.conf
ntpd_enable="YES"
ntpd_program="/usr/local/bin/ntpd"
Код: Выделить всё
# cat /etc/ntp.conf
server time.yars.free.net
driftfile /var/db/ntp.drift
logfile /var/log/ntp.log
restrict default ignore
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
restrict server time.yars.free.net
Код: Выделить всё
17 Dec 20:21:45 ntpd[1511]: getaddrinfo: "server" invalid host address, ignored
Код: Выделить всё
# sockstat -4 | grep ntp
root ntpd 1511 20 udp4 *:123 *:*
root ntpd 1511 22 udp4 192.168.1.2:123 *:*
root ntpd 1511 25 udp4 127.0.0.1:123 *:*
Код: Выделить всё
# cat /etc/ntp.conf
server time.yars.free.net
driftfile /var/db/ntp.drift
logfile /var/log/ntp.log
restrict default ignore
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
restrict time.yars.free.net
Код: Выделить всё
# ntpq -p
localhost: timed out, nothing received
***Request timed out
Код: Выделить всё
# sockstat -4 | grep ntp
root ntpd 1580 20 udp4 *:123 *:*
root ntpd 1580 22 udp4 192.168.1.2:123 *:*
root ntpd 1580 25 udp4 127.0.0.1:123 *:*
Код: Выделить всё
# cat /var/log/ntp.log
17 Dec 20:29:27 ntpd[1511]: ntpd exiting on signal 15
Код: Выделить всё
# cat /var/log/debug.log
Dec 17 20:29:28 gate ntpd[1580]: ntp_io: estimated max descriptors: 7207, initial socket boundary: 20
Код: Выделить всё
#cat ntp.conf
server time.yars.free.net
driftfile /var/db/ntp.drift
logfile /var/log/ntp.log
restrict default ignore
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
restrict time.yars.free.net
restrict localhost
Ну я же написал тут в чем проблема:Горыч писал(а):Опять не внимателен. Поправил.
Код: Выделить всё
# cat /etc/ntp.conf server time.yars.free.net driftfile /var/db/ntp.drift logfile /var/log/ntp.log restrict default ignore restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap restrict time.yars.free.net
...Код: Выделить всё
# ntpq -p localhost: timed out, nothing received ***Request timed out
Код: Выделить всё
NTPQ(8) FreeBSD System Manager's Manual NTPQ(8)
NAME
ntpq -- standard NTP query program
SYNOPSIS
ntpq [-inp] [-c command] [host] [...]
DESCRIPTION
The ntpq utility is used to monitor NTP daemon ntpd(8) operations and
determine performance...
...
-p Print a list of the peers known to the server as well as a sum-
mary of their state. This is equivalent to the peers interactive
command.
Код: Выделить всё
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
fire.netis.ru .INIT. 16 u - 64 0 0.000 0.000 0.000
Код: Выделить всё
# ntpdate -q localhost
server 127.0.0.1, stratum 16, offset -0.000028, delay 0.02573
server ::1, stratum 16, offset -0.000031, delay 0.02580
18 Dec 19:00:29 ntpdate[5061]: no server suitable for synchronization found
Код: Выделить всё
# ee /etc/ntp.conf
#добавляем сервера, с которыми будет проводиться синхронизация
server 0.ua.pool.ntp.org iburst prefer
server 1.ua.pool.ntp.org iburst
server 2.ua.pool.ntp.org iburst
server 3.ua.pool.ntp.org iburst
#путь к дрифт файлу
driftfile /etc/ntp/drift
#лог
logfile /var/log/ntp.log
#разрешаем обновляться только локальной сети
restrict default ignore
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
Код: Выделить всё
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*shtucer.tstu.ed 193.190.230.65 2 u - 128 37 93.311 -1.769 0.844
+ns1.odessa.coms 198.123.30.132 2 u 65 64 17 55.824 -5.750 0.676
x212.111.205.110 62.149.0.30 2 u 91 256 7 1936.77 913.387 0.647
+shkvoren.tstu.e 147.231.19.43 2 u 1 64 37 93.840 -0.587 1.099
Код: Выделить всё
restrict localhost
Код: Выделить всё
restrict time.yars.free.net
Код: Выделить всё
# cat /etc/ntp.conf
server time.yars.free.net
driftfile /var/db/ntp.drift
logfile /var/log/ntp.log
restrict default ignore
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
restrict time.yars.free.net
restrict localhost[
Код: Выделить всё
# ntpdate -q localhost
server 127.0.0.1, stratum 16, offset -0.000028, delay 0.02573
server ::1, stratum 16, offset -0.000031, delay 0.02580
18 Dec 19:00:29 ntpdate[5061]: no server suitable for synchronization found
Код: Выделить всё
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
fire.netis.ru .INIT. 16 u - 64 0 0.000 0.000 0.000
Код: Выделить всё
/usr/local/bin/curl -o /tmp/ntp-servers.htm && grep OpenAccess /tmp/ntp-servers.htm | awk -F">" {'print $6'} | awk -F"<" {'print $1'} | grep -v "#" | awk -F";" {'print $1 $2'}
с этим как раз все понятно:m0ps писал(а):...
2Горыч
ну дык ты сам посуди... у тебя рестрикт для time.yars.free.net а сервер пытается синхронизироваться с fire.netis.ru. не на что не наталкивает? кстати, откуда он у тебя взялся если в ntp.conf - другой?
Код: Выделить всё
[root@sudosu /]# dig time.yars.free.net +short
fire.yars.free.net.
193.233.48.99
[root@sudosu /]# dig fire.yars.free.net +short
193.233.48.99
[root@sudosu /]# dig -x 193.233.48.99 +short
fire.netis.ru.
[root@sudosu /]# dig fire.netis.ru +short
213.187.127.144
193.233.48.99
[root@sudosu /]#
Код: Выделить всё
[root@sudosu /]# ntpdate -q fire.netis.ru
server 193.233.48.99, stratum 3, offset 0.675362, delay 0.04890
19 Dec 11:20:12 ntpdate[78871]: step time server 193.233.48.99 offset 0.675362 sec
[root@sudosu /]# ntpdate -q fire.netis.ru
server 213.187.127.144, stratum 3, offset 0.675662, delay 0.04822
19 Dec 11:20:13 ntpdate[78872]: step time server 213.187.127.144 offset 0.675662 sec
[root@sudosu /]# ntpdate -q fire.netis.ru
server 193.233.48.99, stratum 3, offset 0.675135, delay 0.04778
19 Dec 11:20:18 ntpdate[78873]: step time server 193.233.48.99 offset 0.675135 sec
[root@sudosu /]# ntpdate -q fire.netis.ru
server 213.187.127.144, stratum 3, offset 0.675332, delay 0.04712
19 Dec 11:20:19 ntpdate[78874]: step time server 213.187.127.144 offset 0.675332 sec
[root@sudosu /]#
Код: Выделить всё
[root@sudosu /]# dig time.yars.free.net +short
fire.yars.free.net.
193.233.48.99
[root@sudosu /]#
Код: Выделить всё
# ntpdate -q ntp.psn.ru
server 194.149.67.130, stratum 2, offset -4.267777, delay 0.04517
19 Dec 19:23:11 ntpdate[4519]: step time server 194.149.67.130 offset -4.267777 sec
Код: Выделить всё
# cat /etc/ntp.conf
server ntp.psn.ru
driftfile /var/db/ntp.drift
logfile /var/log/ntp.log
restrict default ignore
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
restrict ntp.psn.ru
restrict localhost
Код: Выделить всё
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
alpha.prao.psn. .INIT. 16 u - 64 0 0.000 0.000 0.000
Код: Выделить всё
# cat /etc/ntp.conf
server ticktock.net.ru iburst burst
server ntp.psn.ru iburst burst
server ntp.ru iburst burst
driftfile /var/db/ntp.drift
logfile /var/log/ntp.log
restrict default ignore
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
restrict localhost
restrict ticktock.net.ru
restrict ntp.psn.ru
restrict ntp.ru
Код: Выделить всё
09:30:08.273678 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:30:10.273328 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:30:12.273001 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:30:14.273668 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:30:16.277855 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:30:18.272961 IP 192.168.1.2.123 > 193.124.11.11.123: NTPv4, Client, length 48
09:30:20.273605 IP 192.168.1.2.123 > 193.124.11.11.123: NTPv4, Client, length 48
09:30:22.273257 IP 192.168.1.2.123 > 193.124.11.11.123: NTPv4, Client, length 48
09:30:24.272932 IP 192.168.1.2.123 > 193.124.11.11.123: NTPv4, Client, length 48
09:30:26.273566 IP 192.168.1.2.123 > 193.124.11.11.123: NTPv4, Client, length 48
09:30:28.273210 IP 192.168.1.2.123 > 193.124.11.11.123: NTPv4, Client, length 48
09:30:30.272881 IP 192.168.1.2.123 > 193.124.11.11.123: NTPv4, Client, length 48
09:30:32.273532 IP 192.168.1.2.123 > 193.124.11.11.123: NTPv4, Client, length 48
09:30:34.273185 IP 192.168.1.2.123 > 193.124.11.11.123: NTPv4, Client, length 48
09:30:54.272743 IP 192.168.1.2.123 > 194.149.67.130.123: NTPv4, Client, length 48
09:30:56.273389 IP 192.168.1.2.123 > 194.149.67.130.123: NTPv4, Client, length 48
09:30:58.273043 IP 192.168.1.2.123 > 194.149.67.130.123: NTPv4, Client, length 48
09:31:00.273697 IP 192.168.1.2.123 > 194.149.67.130.123: NTPv4, Client, length 48
09:31:02.273357 IP 192.168.1.2.123 > 194.149.67.130.123: NTPv4, Client, length 48
09:31:04.273016 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:31:04.273116 IP 192.168.1.2.123 > 194.149.67.130.123: NTPv4, Client, length 48
09:31:06.273661 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:31:06.273757 IP 192.168.1.2.123 > 194.149.67.130.123: NTPv4, Client, length 48
09:31:08.273318 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:31:08.273412 IP 192.168.1.2.123 > 194.149.67.130.123: NTPv4, Client, length 48
09:31:10.272975 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:31:10.273070 IP 192.168.1.2.123 > 194.149.67.130.123: NTPv4, Client, length 48
09:31:12.273631 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:31:14.273285 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:31:16.272945 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:31:18.273596 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:31:20.273253 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:31:23.272780 IP 192.168.1.2.123 > 193.124.11.11.123: NTPv4, Client, length 48
09:31:25.273394 IP 192.168.1.2.123 > 193.124.11.11.123: NTPv4, Client, length 48
Код: Выделить всё
# tcpdump -i re0 -n port 123
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on re0, link-type EN10MB (Ethernet), capture size 96 bytes
09:34:07.273578 IP 192.168.1.2.123 > 194.149.67.130.123: NTPv4, Client, length 48
09:34:19.272805 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:34:22.407024 IP 80.93.53.29.123 > 192.168.1.2.123: NTPv4, Server, length 48
09:34:35.273179 IP 192.168.1.2.123 > 193.124.11.11.123: NTPv4, Client, length 48
09:34:39.505431 IP 193.124.11.11.123 > 192.168.1.2.123: NTPv4, Server, length 48
09:35:12.272784 IP 192.168.1.2.123 > 194.149.67.130.123: NTPv4, Client, length 48
09:35:13.736901 IP 194.149.67.130.123 > 192.168.1.2.123: NTPv4, Server, length 48
09:35:25.272856 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:35:27.273403 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:35:29.272953 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:35:29.835777 IP 80.93.53.29.123 > 192.168.1.2.123: NTPv4, Server, length 48
09:35:30.507183 IP 80.93.53.29.123 > 192.168.1.2.123: NTPv4, Server, length 48
09:35:31.273507 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:35:31.849081 IP 80.93.53.29.123 > 192.168.1.2.123: NTPv4, Server, length 48
09:35:33.191598 IP 80.93.53.29.123 > 192.168.1.2.123: NTPv4, Server, length 48
09:35:33.273035 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
09:35:34.534293 IP 80.93.53.29.123 > 192.168.1.2.123: NTPv4, Server, length 48
09:35:35.273612 IP 192.168.1.2.123 > 80.93.53.29.123: NTPv4, Client, length 48
Код: Выделить всё
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*rebus.pae.spb.r 62.117.76.142 2 u 15 64 203 18.586 -119.47 339.553
alpha.prao.psn. 192.36.143.150 2 u 43 64 201 16.938 -70.369 0.288
ntp.ru 131.188.3.223 2 u 18 64 3 66.343 -105.39 151.096
Код: Выделить всё
# ntpdate -q 127.0.0.1
server 127.0.0.1, stratum 3, offset -0.000028, delay 0.02573
20 Dec 09:36:15 ntpdate[7564]: adjust time server 127.0.0.1 offset -0.000028 sec
Код: Выделить всё
25 Dec 01:35:05 ntpd[74634]: bind() fd 22, family 2, port 123, addr 91.204.56.10, in_classd=0 flags=0x19 fails: Address already in use
25 Dec 01:35:05 ntpd[74634]: unable to create socket on em0 (5) for 91.204.56.10#123
25 Dec 01:35:05 ntpd[74634]: failed to initialize interface for address 91.204.56.10
Порт уже чем-то используется.Belchik писал(а):У меня ntp в клетке выдаёт такоеКод: Выделить всё
25 Dec 01:35:05 ntpd[74634]: bind() fd 22, family 2, port 123, addr 91.204.56.10, in_classd=0 flags=0x19 fails: Address already in use
Код: Выделить всё
sockstat | grep 123
Код: Выделить всё
dchub# sockstat | grep 123
root ntpd 74634 20 udp4 91.204.56.10:123 *:*
Код: Выделить всё
dchub# /etc/rc.d/ntpd stop
Stopping ntpd.
dchub# sockstat | grep 123
dchub#
Код: Выделить всё
Jan 14 02:10:26 ntpd[819]: ntpd 4.2.4p6@1.1549-o Tue Jan 13 08:14:35 UTC 2009 (
Jan 14 02:10:28 ntpd[820]: Frequency format error in /etc/ntp/drift
Код: Выделить всё
14 Jan 02:10:37 ntpd[820]: synchronized to 193.34.155.4, stratum 2
14 Jan 02:10:37 ntpd[820]: time correction of 117775 seconds exceeds sanity limit (1000); s set clock manually to the correct UTC time.
Код: Выделить всё
-rw-r--r-- 1 root wheel 0 13 янв 08:36 drift
Код: Выделить всё
#добавляем сервера, с которыми будет проводиться синхронизация
server 0.ua.pool.ntp.org iburst burst prefer
server 1.ua.pool.ntp.org iburst burst
server 2.ua.pool.ntp.org iburst burst
server 3.ua.pool.ntp.org iburst burst
#путь к дрифт файлу
driftfile /etc/ntp/drift
#лог
logfile /var/log/ntp.log
#разрешаем обновляться только локальной сети и локалхосту
restrict default ignore
restrict 192.168.201.0 mask 255.255.255.0 nomodify notrap
restrict localhost
#разрешаем синхронизироваться с удаленными серверами
restrict 0.ua.pool.ntp.org
restrict 1.ua.pool.ntp.org
restrict 2.ua.pool.ntp.org
restrict 3.ua.pool.ntp.org
Код: Выделить всё
fsck_y_enable="YES"
ifconfig_rl0="DHCP"
ntpd_enable="YES"
ntpd_program="/usr/local/bin/ntpd"
font8x14="cp866-8x14"
font8x16="cp866b-8x16"
font8x8="cp866-8x8"
keymap="ru.koi8-r"
mousechar_start="3"
scrnmap="koi8-r2cp866"
sshd_enable="YES"
Код: Выделить всё
date
среда, 14 января 2009 г. 03:56:49 (KRAT)
Код: Выделить всё
tzsetup