RE: PATCH: /proc/sys/kernel/hz

From: Rolf Fokkens (
Date: Mon Jul 16 2001 - 13:00:19 EST

Ulrich Drepper <> writes:

>> Some software (like procps) needs the HZ constant in the kernel. It's
>> sometimes determined by counting jiffies during a second. The attached
>> just "publishes" the HZ constant in /proc/sys/kernel/hz.
>And what is wrong with
> getconf CLK_TCK
>or programmatically
> hz = sysconf (_SC_CLK_TCK);

In short: it doesn't work: it reads 100 while I changed it to 1024 in my

> Update your libc and this info will come from the kernel.

Neither RedHat 6.2 (glibc-2.1.3) nor SuSE 7.2 (glibc-2.2.2) works, so what
glibc version are you suggesting?

And suppose I have the right glibc, then the kernel may become a little

bash# cd linux-2.4.6
bash# find . -name "*.c" -exec grep -q CLK_TCK {} \; -print
#define _SC_CLK_TCK 3
#define _SC_CLK_TCK 3
bash# find . -name "*.h" -exec grep CLK_TCK {} \; -print
#define _SC_CLK_TCK 3

Seems OK for sparc and maybe for solaris, for others it's a mess.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jul 23 2001 - 21:00:07 EST