Messages in this thread |  | | Date | Wed, 6 Jun 2001 20:59:51 +0200 | From | Tomas Telensky <> | Subject | Re: How to know HZ from userspace? |
| |
> On Wed, Jun 06, 2001 at 08:09:33PM +0200, Tomas Telensky wrote: > > > Hi! > > > > > > Is there any way to read out the compile-time HZ value of the kernel? > > > > Why simply #include <asm/param.h>? > > because the include file doesn't say anything about the HZ value of > the currently running kernel, but only about some kernel source somewhere > on your harddrive?
This _SHOULD_ correspond on each linux instalation. But if you would distribute a binary to other people it's a problem.
(note that I'm running an rc script, which sets the symlink /usr/src/linux properly at boottime ... this should be everywhere)
There is also one way how to guess HZ - calibrate :-))) Recently I've done more difficult thing - I not only guess the HZ value, I also guess the time when the tick comes. But it uses a bit of statistics and may be inaccurate on loaded systems. And you need TSC :-)
Tomas
- 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/
|  |