[ntp:questions] Re: ntpdate changes local linux pc clock only from command line

Richard B. Gilbert rgilbert88 at comcast.net
Sat Nov 19 21:35:43 UTC 2005


r wrote:

>I have installed ntp 412 on my pc operating gnu linux mandrake 92
>(kernel 2422).
>During startup the ntpd service starts OK, however when automatic log
>in to gnome 24 is completed, the time clock is not updated (e.g. 12:05,
>01-Jan-97)
>I run gnome terminal and as root run the command
>
>.../ntpdate uk.pool.ntp.org
>
>A few seconds or so later, the local pc clock is successfully updated.
>Why is the clock not updated during the start up process? Below is the
>ntp.conf file, located in my /etc directory:
>
>driftfile /etc/ntp/ntp.drift
>
>server uk.pool.ntp.org
>server 0.pool.ntp.org
>server 1.pool.ntp.org
>
>Also, when I try to run the command
>
>.../ntpq -pn
>
>I receive the reply
>
>.../ntpq: read: Connection refused
>
>Why does this happen?
>
>Thanks
>
>  
>
There is probably an error in the startup process.   If the error of the 
local clock exceeds the "panic threshold" of 1024 seconds or about 17 
minutes, ntpd will exit without changing the clock.

Best practice for starting ntpd is to use the -g option to set the clock 
initially.  If your version of ntpd does not support the -g option then 
use ntpdate to set the clock.   Redhat uses /etc/ntp/step-tickers to 
provide a list of servers  for ntpdate to use to set the clock 
initially.   As long as /etc/ntp/step-tickers exists and contains the 
address of at least one reachable ntp server then ntpdate should run and 
set the clock.

BTW, gnome startup has nothing to do with ntpd or ntpdate setting the 
clock.   This is all done during system startup.  If it's not working 
you need to look at your system startup to find out why not.




More information about the questions mailing list