Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 87372 - procps-3.2.4-r3's top behaves weird when changing HZ values
Summary: procps-3.2.4-r3's top behaves weird when changing HZ values
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-30 23:33 UTC by barthek
Modified: 2005-09-27 06:19 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description barthek 2005-03-30 23:33:41 UTC
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,
Comment 1 SpanKY gentoo-dev 2005-04-01 06:03:52 UTC
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...
Comment 2 barthek 2005-04-01 06:10:42 UTC
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)
Comment 3 Albert Cahalan 2005-06-08 19:29:41 UTC
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.
Comment 4 SpanKY gentoo-dev 2005-09-27 06:19:57 UTC
upstream has spoken