Re: ntpd -qg VS ntpd in Linux client ?



On 2007-04-28, Riccardo Castellani <castellani.riccardo@xxxxxxxxxx> wrote:

I'm interesting to align time in my four DB servers (HP-UX o.s.) of my
company. But I'm not just sure to use ntpd -qg or ntpd as service.

ntpq -gq only slews/steps the clock once. After that the clock will
drift.

ntpd (as a daemon) continuously disciplines the clock to steer in in to
synchronization with UTC (or some other timebase).

if I use "ntpd -qg":

1 - if server time is backward real time, does "ntpd -qg" slew time
immediately ?

2 - if server time is forward real time (< 128 ms), does "ntpd -qg"
slew time immediately ?

3 - if server time is forward real time (> 128 ms), does "ntpd -qg"
sleps time ? but Does it complete its job before exit ( also if it
occurs several days ) For example if offset = 120s, "ntpd -qg" exits
after local time is ok that is after several days ?

The default behavior of ntpd is to slew the clock if the offset is 128ms
or less and step the clock if the offset is more than 128ms. There is no
difference between single-setting (w/ -gq) and daemon mode.

4- If I have offset = 120s what's difference in using "ntpd" and "ntpd -qg".

ntpq -gq only slews/steps the clock once. After that the clock will
drift.

ntpd (as a daemon) continuously disciplines the clock to steer in in to
synchronization with UTC (or some other timebase).

5- what traffic bandwith does ntpd use ?

Minimal.

ntpd uses 2 packets per remote time server at each poll. The poll
interval starts at 64 seconds and usually increases to 1024 seconds (~17
minutes).

For my opinion "ntpd -qg" is better for client, while ntpd as service
it should be run in time server machines.

ntpq -gq sets the clock _once_ so you have use a regular cronjob if you
want to keep the clock from drifting. So you might as well just let ntpd
run all of the time.

--
Steve Kostecke <kostecke@xxxxxxxxxxx>
NTP Public Services Project - http://ntp.isc.org/
.



Relevant Pages

  • Re: clock problem
    ... and the clock is "only" 3 seconds late now... ... The delay, offset and jitter values are in milliseconds, ... ntpd running, the offset should be reduced slowly. ... clock using the recorded drift. ...
    (freebsd-stable)
  • RE: ntpdc sysinfo output inconsistent with ntpq-poutput
    ... In the latest NTPd the leap bits and stratum will get updated at the ... any discrepancy between ntpdc and ntpq outputs? ... At cold start the daemon sets the clock at the first ... the billboards on both ntpq and ntpdc should be ...
    (comp.protocols.time.ntp)
  • Re: [SLE] Updating the system clock
    ... I don't understand why the default is to not run ntpd. ... > In any event, I've turned it on now, so I'll see if my clock keeps better ... servers running ntpd, and these servers having each access to a very ... keep its own drift files. ...
    (SuSE)
  • Re: Strange NTP problem on AMD Geode LX cards.
    ... drift file to -28, results in the drift going back to -400 over a ... This suggests that your local clock is defective! ... There is some sort of problem with ntpd startup ... starting chrony seems to give good results. ...
    (comp.protocols.time.ntp)
  • Re: Time Synchronizing Between Two Servers
    ... suspect that any quartz clock is overkill. ... drift data doesn't really solve the ... I was questioning the need for a low-drift system clock on a machine ... that *is* running ntpd, ...
    (freebsd-questions)