[ntp:questions] ntpd -q and driftfile

prashant sherin pvsnmp at yahoo.com
Tue Mar 22 07:24:40 UTC 2011


On Mar 22, 12:18 pm, unruh <un... at wormhole.physics.ubc.ca> wrote:
> On 2011-03-22, prashant sherin <pvs... at yahoo.com> wrote:
>
>
>
> >> ntpd is intended to for continuous, not periodic running. ?You are not
> >> using it correctly.
>
> >> Cheers,
> >> David
>
> > Thanks for the quick reply.
> > ntpd does allow us to run this way. From the ntpd man page:
>
> >  -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.
>
> > The idea is to use it as ntp client.
>
> No idea what that is supposed to mean. ntpd run continuously is an ntp
> client as well. An ntp client is something that uses another time source
> to control the local clock. You can do that in a one shot fashion as you
> seem to want to do, or use it continuously so it disciplines the rate as
> well as the time. It is up to you. However, you may well be very
> confused about ntpd as well. Your posts do not rule that out.
> Maybe if you told us what you want to accomplish we can give you advice
> on how best to accomplish it.
>
>
>
> > Thanks and Regards,
> > Prashant

Thanks for the explanation.
Yes, I am no expert in ntp.
My understanding is that if I run ntpd in daemon mode, it will
also act like an NTP server listening on UDP port 123. I think running
ntpd with -q option
would prevent the server from running and also it would be a good
replacement for ntpdate command
as stated in the manual page.

Regards,
prashant




More information about the questions mailing list