Re: How to know HZ from userspace?

From: Linus Torvalds (torvalds@transmeta.com)
Date: Wed Jun 06 2001 - 15:55:53 EST


In article <20010530203725.H27719@corellia.laforge.distro.conectiva>,
Harald Welte <laforge@gnumonks.org> wrote:
>
>Is there any way to read out the compile-time HZ value of the kernel?

In 2.4.x, you'll get it on the stack as one of the ELF auxilliary
entries (AT_CLKTCK).

Strictly speaking that's the "frequency at which 'times()' counts", ie
the kernel CLOCKS_PER_SEC, not HZ. But from a user perspective the two
should hopefully always be the same (if any of the /proc fields etc
should really use CLOCKS_PER_SEC, not HZ).

                Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 07 2001 - 21:00:53 EST