[ntp:questions] NTP + kernel frequency

Per Hedeland per at hedeland.org
Sat Nov 10 00:38:23 UTC 2007

In article <k7mdnaWnzZTu6q7anZ2dnUVZWhednZ2d at megapath.net>
hal-usenet at ip-64-139-1-69.sjc.megapath.net (Hal Murray) writes:
>>I known now, in the "recen"t kernel the internal frequency will be to 250
>>With my gentoo it's not a problem for me because i make myself my kernel ...
>>but if i take Mandriva or a another distribution how find this values ?
>I assume you mean the scheduling clock which would be 250 Hz rather than
>One way is to look in the kernel souces.
>Another way is to measure it.  Write a program that usleeps for
>a microsecond and see how long it really takes.  (Do it in a loop
>for 1000 tries and print out a histogram.)

On Linux, a simpler way can be to look at /proc/interrupts - e.g.
(probably Linux-version- and possibly config-specific):

$ (cat /proc/interrupts; sleep 10; cat /proc/interrupts) | \
  awk '/timer/{prev=now; now=$2} END{printf "%dHz\n", int((now-prev)/10)}'

Why there isn't a /proc entry or sysctl that gives the frequency
directly I don't know...

--Per Hedeland
per at hedeland.org

More information about the questions mailing list