[ntp:questions] Re: Question about ntp log messages and logging interval

Ryan Moore rmoore at rmoore.dyndns.org
Wed Sep 13 00:12:12 UTC 2006


On Tue, 12 Sep 2006, David Woolley wrote:
> In article <R4adnZdGoqCNZpvYnZ2dnUVZ_q2dnZ2d at comcast.com>,
> Richard B. Gilbert <rgilbert88 at comcast.net> wrote:
>> Jeff Boyce wrote:
>>
>>> 1. I am wondering if this is an indication of a properly (or improperly)
>>> running ntp system?
>
> Time steps in the same direction are an indication of a failing system.
> Either, your crystal is out by more than 500ppm, or, more likely,
> especially for Red Hat, is that you are losing clock interrupts.  A
> contributory factor tends to be the use of HZ=1000 and IDE device
> drivers with interrupt latencies of more than 1ms.  It is strongly
> reccommended that HZ be no more than 100.

I can expand on this comment.  There are a couple ways to check what your 
HZ value is set to if you don't know it.

1.  The easy way: check /proc/config.gz

If you have the appropriate support in the kernel, this file will show 
what options were used to compile the kernel.  Check for HZ.  Here's an 
example on my Linux system:

~> gzip -dc /proc/config.gz | grep HZ
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250

So my HZ is 250.

2.  If you don't have that, check your timer interrupts.

This should always work, check the timing on your timer interrupts.

~> grep timer /proc/interrupts ; sleep 30; grep timer 
/proc/interrupts
   0:  146358116    IO-APIC-edge  timer
   0:  146365617    IO-APIC-edge  timer
~> bc
146365617-146358116
7501
./30
250

Both methods come up with 250.


Finally, I thought there was an issue where when ntp is compiled on Linux, 
it looks 
up the value of HZ in the kernel headers.  So if ntp was compiled on a 
machine with a different value of HZ than the machine you run it on, it 
won't work right.  I don't know this for a fact, it's something I thought 
I heard before.




More information about the questions mailing list