time/ntp[d]
Todd Denniston
Todd.Denniston at ssa.crane.navy.mil
Wed Aug 6 19:40:06 UTC 2008
michael wrote, On 08/06/2008 11:42 AM:
> On Wed, 2008-08-06 at 09:20 -0400, Todd Denniston wrote:
>> michael wrote, On 08/06/2008 03:56 AM:
>>> It seems my clock is losing time but yet I have 'enable Network Time
>>> Protocol' enabled and set to a local time machine. If I
>> by "a local time machine" do you mean:
>> server 127.127.1.0
>> ???
>>
>> or
>> server 130.88.200.6 burst
>> restrict 130.88.200.6 mask 255.255.255.255 nomodify notrap noquery
>> ???
>
>
> I didn't mean 127.127.1.0 (no idea what that means...) and yes I did
127.127.1.0 = local _system_ clock ... not a real accurate time source...
please don't use it until you understand it. :)
> mean 130.88.200.6 although I've no idea what those server/restrict cmds
> are about
From the data you got from ntpq below, you don't need to change what you
have right now.
>
>> 127.127.1.0 is only *sort of* reliable once it has been disciplined, i.e., a
>> drift file built up for a few days.
>>
>>> sudo /etc/init.d/ntpd stop
>>> sudo /usr/sbin/ntpdate 130.88.200.6
>>>
>>> then it resets it to the correct time, so how come it's losing time?
>>>
>> start ntpd, wait ~15 minutes, then run
>> /usr/sbin/ntpq -p
>> and send us the results.
>> i.e., to little information so far.
>
> okay, restarted ntpd from cmd line, waiting 15 mins and here's ntpq =p
> gives:
> mkb at veri:/var/log$ sudo /usr/sbin/ntpq -p
I don't think you have to be super user to do ntpq -p.
> Password:
> remote refid st t when poll reach delay offset
> jitter
> ==============================================================================
> utserv.mcc.ac.u 193.62.22.98 2 u 14 64 377 0.303 369608.
> 3831.40
>
> but it's still out:
>
> mkb at veri:/var/log$ date
> Wed Aug 6 16:41:41 BST 2008
>
> mkb at veri:/var/log$ ssh michael at ratty date
> Wed Aug 6 16:47:57 BST 2008
>
16:41:41 + 0:6:9 =~ 16:47:50 so it took you ~7 seconds to type the ssh over to
ratty? :)
i.e., matches roughly with what ntpd is indicating.
try doing the as root (i.e., `su -` and then run the) following:
service ntpd stop
ntpdate && hwclock --systohc
service ntpd start
sleep 128 && /usr/sbin/ntpq -p
sleep 10
exit
BTW the && sets above tell bash, only execute the command after them if the
command before them was successful.
>
>
> and ntpd reports in /var/log/messages:
>
> Aug 6 16:14:35 veri ntpd[13480]: ntpd 4.2.4p2 at 1.1495-o Tue Aug 21
> 13:58:55 UTC 2007 (1)
> Aug 6 16:14:35 veri ntpd[13481]: precision = 1.000 usec
> Aug 6 16:14:35 veri ntpd[13481]: Listening on interface #0 wildcard,
> 0.0.0.0#123 Disabled
> Aug 6 16:14:35 veri ntpd[13481]: Listening on interface #1
> wildcard, ::#123 Disabled
> Aug 6 16:14:35 veri ntpd[13481]: Listening on interface #2 vmnet8,
> fe80::250:56ff:fec0:8#123 Enabled
<SNIP>
> Aug 6 16:14:35 veri ntpd[13481]: Listening on interface #10 vmnet8,
> 172.16.232.1#123 Enabled
> Aug 6 16:14:35 veri ntpd[13481]: kernel time sync status 0040
> Aug 6 16:14:35 veri ntpd[13481]: frequency initialized 197.849 PPM
> from /var/lib/ntp/drift
>
Wow that's a lot of interfaces.
>
>
>>> I was expecting to see stats in /var/log/ntpstats (as per my Debian box)
>>> but that dir doesn't exist on this Fed box...
>>>
>> You have to config ntpd (in /etc/ntp.conf) to keep the stats, which are most
>> times not needed, and I don't remember what config items have to be set to
>> keep those stats.
>
> arg, was looking at /etc/sysconfig/ntpd
>
you _might_ add the -s whereIwantStats in /etc/sysconfig/ntpd OPTIONS=
--
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter
More information about the fedora-list
mailing list