I have ntpd running on a box. I want to see how the time on the box compares to the time retrieved from ntp.ubuntu.com. Is there an easy way to do this?

link|improve this question

75% accept rate
I take it you just want to see the time there and not actually change your computer's time to match it? – DerfK Jan 10 '11 at 20:37
Yep, that's right. – John Jan 10 '11 at 20:50
feedback

3 Answers

up vote 3 down vote accepted

ntpq -p ntp.ubuntu.com

From man ntpq:

...
-p     Print  a list of the peers known to the server as well as a summary of their state. This is equivalent to the peers interactive command.
...

Edit: The host is timing out right now. ntpq -p pool.ntp.org will return a valid result.

link|improve this answer
2  
ntpdate is deprecated so it's best to get in habit of using ntpq instead. However I still use ntpdate all the time myself, old habits die hard. – Phil Hollenback Jan 10 '11 at 20:43
feedback

You can use ntpdate to query a time server

ntpdate -q ntp.ubuntu.com

link|improve this answer
Thanks! Maybe you can answer this question too serverfault.com/questions/220836/… – John Jan 10 '11 at 20:48
feedback

Actually, the command ntpq -c "rv 0 clock" ntp.ubuntu.com will return the time of the server in standard format : this is the result from ca.pool.ntp.org :

clock=d1b5aa9c.b8f9697a  Wed, Jun 29 2011  9:43:56.722
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.