Re: [opensuse] How to query time with ntpd?

2010. február 8. 12:52 napon Roger Oberholtzer <roger@xxxxxx> írta:

On Mon, 2010-02-08 at 12:27 +0100, Istvan Gabor wrote:

I used to use ntpdate to query the time of a given time server occasionally.
'ntpdate -q ' showed the difference between the system and server time.
Now in openSUSE 11.2 ntpdate is not available anymore, it is replaced by ntpd.
How can I use ntpd on command line to check the difference between server and system time without adjusting the latter one (ie. imitate -q option of ntpdate)? I have read the ntpd man page but could not find out myself how to do it.

My 11.2 system has /usr/sbin/ntpdate. Perhaps you were not root when
trying to run it?

But it is not the ntpdate program:

~> /usr/sbin/ntpdate -q
!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!

The ntpdate program is deprecated and should not be used any more. To
quote the upstream ntp developers:

"The functionality ntpdate offered is now provided by the ntpd daemon
itself. If you call ntpd with the command line option -q it will
retrieve the current time and set it accordingly."

If I run the above as root it invokes "ntpd -q", and sets the system time which I don't want yet. I just would like to see the offset.


To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

Relevant Pages

  • Re: time acuracy
    ... external ntp server. ... In my opinion it's about exactly as easy or simple to use ntpdate in a cron ... Nor is there any cpu/ram penalty by having ntpd running. ... server that is geographically close to you, ...
  • Re: [SLE] Atom clock synching tool
    ... Remember it needs a permanent network connection. ... Perhaps as a last comment - ntpd does't actually need a permanent ... server you have specified, and when it doesn't have a connection, you ... to call than ntpdate. ...
  • RE: rh-l] NTP Problems Redux
    ... I have been stopping/starting ntpd as needed to run ntpdate, ... server ... I wait a few days to see if the clocks will drift out of sync. ...
  • Re: Time to set it up on FC1?
    ... They're in essence the same daemon and when ntpdate starts it sees ... >ntpd and shuts itself down. ... from the server, regardless of what that result was and with no sanity ... If the server is 10 years off from the local system time, ...
  • Re: "ntpd -q" is slow compared to ntpdate
    ... Mohit> continue to use ntpdate or sntp to set the time in a one-shot way ... Mohit> before actually running ntpd. ... replacement for 'ntpdate'. ...