Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a PC directly connected to a GPS clock with PPS signal that sets the clock to an accuracy of 5 µs (!) or less (shows in NTP as a normal server).

Now I want to measure how bad the internal software clock is. Therefore I am searching for an option to actually poll a server and don't set the time but actually let it go off.

I could mark the server as noselect in the ntp.conf file, but then ntpd won't write the loopstats file.

How to let the ntpd write the loopstats file with the offset to the server, but don't acutally set the time?

Thank you!

share|improve this question
    
You should really use ntpq instead of ntpdate. ntpdate is eventually not going to be there... –  VxJasonxV Apr 20 '11 at 17:21

2 Answers 2

up vote 1 down vote accepted

The ntpdate command line tool provides the -q (query) option for querying a remote NTP server and displaying the offset from your local clock. For example:

$ ntpdate -q us.pool.ntp.org
server 216.93.242.12, stratum 2, offset 0.004806, delay 0.04530
server 72.26.217.210, stratum 2, offset 0.003129, delay 0.13052
server 173.203.202.87, stratum 2, offset 0.006828, delay 0.08769
 2 Feb 06:32:54 ntpdate[61498]: adjust time server 216.93.242.12 offset 0.004806 sec

The interesting data here is that the very end: offset 0.004806 sec. If this is the metric you're most interested in then you should be all set. It doesn't provide the level of details of the loopstats file, but it should help out.

share|improve this answer
    
I think I will give this a try, thanks! –  hugh Feb 3 '11 at 8:55

You can use ntpq to query a timeserver without adjusting the clock. Schedule that with cron, and write output to a logfile.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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