hi, i am running kernel 2.4.28 and have it recompiled with #define HZ 1000. now my top shows weird cpu usage - lots of processess take 99% CPU which is simply not true. ps shows everything correctly. i have recompiled procps but the issue still remains. is there a way that top uses correct HZ definition ? regards,
you show me some way to dynamically obtain the value of HZ and i'll fix this properly ... until then, you'll have to edit your /usr/include/asm/param.h, change the value of HZ to your new one, and rebuild procps/etc...
you didnt understand me then :) i have recompiled procps with this new value of HZ and it still shows bogus information. am i doing something wrong here?: vmwarelx root # grep HZ /usr/include/asm/param.h #ifndef HZ #define HZ 1000 vmwarelx root # grep HZ /usr/src/linux-2.4.28-gentoo-r8/include/asm-i386/param.h #ifndef HZ #define HZ 1000 recompile kernel, reboot... vmwarelx root # emerge -v procps ... and ps shows valid (i guess) cpu usage and top does not (lots of 99% CPU processes)
At this point, in June 2005, it really doesn't make sense to be playing around with an obsolete kernel to such an extent. I could see leaving an old already-working system on the 2.4.xx kernels, but hacking up such a kernel (and many apps) really doesn't make sense. The 2.6.xx kernel is a much better choice at this point. That said... on a 2.4.xx kernel the procps tools get HZ via ELF notes which are placed on the stack. There should not be any need to recompile the procps tools. For most other apps, you'll need to hack up glibc. Perhaps you missed a spot in the kernel. I recall the the ELF note value was a separate #define that you'd need to change.
upstream has spoken