'Twas brillig, and Colin Guthrie at 11/02/13 14:55 did gyre and gimble:
> 'Twas brillig, and Pierre Jarillon at 11/02/13 14:23 did gyre and gimble:
>> Le lundi 11 février 2013 13:18:23, Colin Guthrie a écrit :
>>> So ntpdate as a service is just a one-shot thing, it happens once at
>>> boot to ensure the clocks are properly set and then ntpd takes over for
>>> the rest of the time that machine stays up.
>>>
>>> As far as I'm aware, there is nothing integrated into crontab regarding
>>> ntpdate, but please feel free to correct me on that one.
>>
>> Yes, this was the old system. I am not an expert in ntp, but I have read 
>> carefully http://ntp.org few years ago and I return on it now and then.
>> I can miss something... I am not the truth!
>>
>> On the web site http://www.ntp.org/  ->Implementation Documentation
>> http://www.eecis.udel.edu/~mills/ntp/html/ntpdate.html said:
>> Disclaimer: The functionality of this program is now available in the ntpd 
>> program. See the -q command line option in the ntpd - Network Time Protocol 
>> (NTP) daemon page. After a suitable period of mourning, the ntpdate program 
>> is 
>> to be retired from this distribution
>>
>> And http://www.eecis.udel.edu/~mills/ntp/html/ntpd.html and the man tell us:
>>
>> -q
>> Exit the ntpd just after the first time the clock is set. This behavior 
>> mimics 
>> that of the ntpdate program, which is to be retired. The -g and -x options 
>> can 
>> be used with this option. Note: The kernel time discipline is disabled with 
>> this option.
>> -g
>> Normally, ntpd exits with a message to the system log if the offset exceeds 
>> the 
>> panic threshold, which is 1000 s by default. This option allows the time to 
>> be 
>> set to any value without restriction; however, this can happen only once. If 
>> the threshold is exceeded after that, ntpd will exit with a message to the 
>> system log. This option can be used with the -q and -x options. See the 
>> tinker 
>> command for other options.
>>
>> The same options are set in the man of ntp.
>>
>> IMO, ntpdate should be replaced with: ntpd -gq
> 
> Yup that would be fine.
> 
>> I don't understand why ntpdate is listed as an active daemon in 
>> drakxservices.
> 
> This is simply because of the fact that drakxservices doesn't really
> grok the kind of granularity you want here.
> 
> See the direct output from e.g. "systemctl status ntpdate.service" vs.
> "systemctl status ntpd.service" (hint: compare "active (exited)" vs
> "active (running)")
> 
> For the former, it's a "oneshot" and as it has been run and it ran
> successfully, it's is thus considered "active".
> 
> Really we should teach drakxservices to present that properly: e.g. show
> it as "Completed" or something, rather than "Active"
> 
>> In /etc/sysconfig/ntpd :
>> - Mageia 1 : OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid"
>> - Mageia 2 : OPTIONS="-g"
>> - Mageia 3 : OPTIONS="-g"
>>
>> Then it seems that ntpdate is no longer useful since Mageia 2.
> 
> Yes indeed. It seems the -g option passed there makes the separate
> ntpdate service obsolete. It basically gives ntpd a one-chance option to
> do a big jump, which is basically what we were achieving with that
> double unit setup.
> 
> I'll kill off the ntpdate stuff.
> 
> Many thanks for poking into this :)

Hmm, actually, I'm not sure the -g argument is sensible to pass to the
daemon process generally. It seems that if it cannot reach a server
(i.e. no networking) then the daemon exits.

Certainly that is what I've seen here.

Also, running ntpd -qg here with a large skew seems to not actually work
here :s


[root@jimmy ~]# systemctl stop ntpd.service
[root@jimmy ~]# date
Thu 21 Feb 18:02:19 GMT 2013
[root@jimmy ~]# date
Thu 21 Feb 18:02:23 GMT 2013
[root@jimmy ~]# ntpd -qg
ntpd: time slew +0.000000s
[root@jimmy ~]# ntpdate pool.ntp.org
21 Feb 23:02:53 ntpdate[7741]: step time server 149.5.113.103 offset
18004.588317 sec
[root@jimmy ~]# ntpd -qg
ntpd: time slew +0.000000s
[root@jimmy ~]# systemctl start ntpd.service


So perhaps we should restore the previous setup?

Col

-- 

Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/

Reply via email to