Gentoo Archives: gentoo-user

From: Nick Rout <nick@×××××××.nz>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] System Clock Problems
Date: Mon, 13 Feb 2006 21:16:58
Message-Id: 20060214100805.CB57.NICK@rout.co.nz
In Reply to: [gentoo-user] System Clock Problems by Drew Tomlinson
1 If your system stopped suddenly the ntp.drfit file may have become corrupted. As I understand it this file has a value in it that tells the system how much drift there is in the system clock, and uses the figutre to compensate. If the figure is way out then the compensation will be way out.
2
3 Take a look at /var/lib/ntp/ntp.drift, if its seems like a large figure, then zero it and start again from scratch. ie stop ntpd, set the clock with ntpdate, then start the ntpd service again (preferably not while recording with mythtv LOL).
4
5
6 On Sun, 12 Feb 2006 12:10:20 -0800
7 Drew Tomlinson wrote:
8
9 > I have Gentoo 2.6.13-r5 kernel running and have used ntpd in
10 > broadcastclient mode to keep its time in sync on my home network. The
11 > other day, the system suffered and abrupt shutdown due to a power
12 > outage. Ever since then, the system clock gains about 10 seconds every
13 > 5 minutes. Also, I can't get ntpd to sync the clock. My command line
14 > is "ntpd -A -b -g -u ntp:ntp". I've included some output running the
15 > command with the debug switch below.
16 >
17 > I've also tried to gain more info with the ntpdc utility although I
18 > don't really know what I'm doing. However it appears that ntpd does see
19 > my FreeBSD time server even though it's not synced:
20 >
21 > ntpdc> peers
22 > remote local st poll reach delay offset disp
23 > =======================================================================
24 > =192.168.1.2 0.0.0.0 2 64 7 0.00038 -9.600170 1.98438
25 >
26 > The time server is a FreeBSD 6.0 box on my network. My other FreeBSD
27 > box and two Windows boxes get time from it just fine. Even the Gentoo
28 > box will set its clock with "ntpd -gq". I am currently using this brute
29 > force method via a cron job as a temporary workaround.
30 >
31 > Any ideas on what might have caused this recent change in behavior?
32 >
33 > Thanks for your help,
34 >
35 > Drew
36 >
37 >
38 > --- Begin debug output ---
39 > ntpd 4.2.0a@1.1191-r Sat Feb 11 19:19:56 PST 2006 (1)
40 > addto_syslog: ntpd 4.2.0a@1.1191-r Sat Feb 11 19:19:56 PST 2006 (1)
41 > addto_syslog: precision = 3.000 usec
42 > create_sockets(123)
43 > addto_syslog: no IPv6 interfaces found
44 > bind() fd 4, family 2, port 123, addr 0.0.0.0, flags=8
45 > addto_syslog: Listening on interface wildcard, 0.0.0.0#123
46 > bind() fd 5, family 2, port 123, addr 127.0.0.1, flags=0
47 > addto_syslog: Listening on interface lo, 127.0.0.1#123
48 > bind() fd 6, family 2, port 123, addr 192.168.1.6, flags=8
49 > addto_syslog: Listening on interface eth1, 192.168.1.6#123
50 > init_io: maxactivefd 6
51 > local_clock: time 0 clock 0.000000 offset 0.000000 freq 0.000 state 0
52 > bind() fd 8, family 2, port 123, addr 192.168.1.255, flags=8
53 > io_setbclient: Opened broadcast client on interface 2, socket: 8
54 > io_setbclient: Opened broadcast clients
55 > addto_syslog: frequency initialized -36.958 PPM from /etc/ntp/ntp.drift
56 > local_clock: time 0 clock 0.000000 offset 0.000000 freq -36.958 state 1
57 > report_event: system event 'event_restart' (0x01) status 'sync_alarm,
58 > sync_unspec, 1 event, event_unspec' (0xc010)
59 > auth_agekeys: at 1 keys 1 expired 0
60 > timer: refresh ts 0
61 > receive: at 15 192.168.1.6<-192.168.1.2 mode 5 code 5
62 > Finding addr 192.168.1.2 in list of addresses
63 > key_expire: at 15
64 > peer_clear: at 15 assoc ID 33252 refid INIT
65 > newpeer: 192.168.1.6->192.168.1.2 mode 3 vers 4 poll 6 10 flags 0x210
66 > 0x20 ttl 0 key 00000000
67 > receive: at 15 0.0.0.0<-192.168.1.2 mode 5 code 6
68 > peer 192.168.1.2 event 'event_reach' (0x84) status 'unreach, 1 event,
69 > event_reach' (0x14)
70 > auth_agekeys: at 60 keys 1 expired 0
71 > transmit: at 79 0.0.0.0->192.168.1.2 mode 3
72 > receive: at 79 192.168.1.6<-192.168.1.2 mode 4 code 1
73 > clock_filter: popcorn 7.896193 0.000960
74 > receive: at 82 192.168.1.6<-192.168.1.2 mode 5 code 6
75 > receive: at 82 0.0.0.0<-192.168.1.2 mode 5 code 6
76 > auth_agekeys: at 120 keys 1 expired 0
77 > transmit: at 143 0.0.0.0->192.168.1.2 mode 3
78 > receive: at 143 192.168.1.6<-192.168.1.2 mode 4 code 1
79 > clock_filter: n 2 off -9.600170 del 0.000386 dsp 3.937744 jit 1.703977,
80 > age 64
81 > receive: at 148 192.168.1.6<-192.168.1.2 mode 5 code 6
82 > receive: at 148 0.0.0.0<-192.168.1.2 mode 5 code 6
83 > auth_agekeys: at 180 keys 1 expired 0
84 > transmit: at 206 0.0.0.0->192.168.1.2 mode 3
85 > receive: at 206 192.168.1.6<-192.168.1.2 mode 4 code 1
86 > clock_filter: n 3 off -9.600170 del 0.000386 dsp 1.938216 jit 1.639332,
87 > age 127
88 > receive: at 215 192.168.1.6<-192.168.1.2 mode 5 code 6
89 > receive: at 215 0.0.0.0<-192.168.1.2 mode 5 code 6
90 > --- End debug output ---
91 >
92 >
93 > --
94 > gentoo-user@g.o mailing list
95
96 --
97 Nick Rout <nick@×××××××.nz>
98
99 --
100 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] System Clock Problems Drew Tomlinson <drew@××××××××××××××.net>