Hi all, I have noticed the "unknown HZ value" message still appears at boot time and under some unpredictable circumstances when running the ps command, even after applying the procps-3.2.8-fix_HZ_errors-1.patch (I currently use a SMP, 2.6.38.4 tickless kernel). So after looking inside the procps code and patch, I deduced the linux_version_code variable was not correctly valued. After starting to make my own patch, I came across a similar issue when looking over the net (seen on http://www.linuxquestions.org/questions/slackware-14/slackware-13-37-rc-unknown-hz-value-after-procps-upgrade-871679/). It seems the constructor functions don't run as the package expect on recent libgcc.
After applying it, the message definitively disappeared. The patch is attached (another solution is to prioritize the constructor functions). It works well since quite a while for me now, so may it be taken into account for those who have encountered the same inconvenience. Have a look ? Thanks for reading, Bertrand.
Initial Package Version: 3.2.8 Description: Fixes "Unknown HZ value! (##)" errors in procps utils. --- procps-3.2.8/proc/sysinfo.c 2008-03-24 05:33:43.000000000 +0100 +++ procps-3.2.8/proc/sysinfo.c 2011-04-05 15:52:36.000000000 +0200 @@ -212,6 +212,7 @@ static int check_for_privs(void){ static void init_libproc(void) __attribute__((constructor)); static void init_libproc(void){ have_privs = check_for_privs(); + init_Linux_version(); // ought to count CPUs in /proc/stat instead of relying // on glibc, which foolishly tries to parse /proc/cpuinfo // --- procps-3.2.8/proc/version.c 2003-01-29 02:11:43.000000000 +0100 +++ procps-3.2.8/proc/version.c 2011-04-05 15:52:36.000000000 +0200 @@ -33,8 +33,7 @@ void display_version(void) { int linux_version_code; -static void init_Linux_version(void) __attribute__((constructor)); -static void init_Linux_version(void) { +void init_Linux_version(void) { static struct utsname uts; int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */ --- procps-3.2.8/proc/version.h 2002-12-15 01:08:32.000000000 +0100 +++ procps-3.2.8/proc/version.h 2011-04-05 15:52:36.000000000 +0200 @@ -14,6 +14,7 @@ EXTERN_C_BEGIN +extern void init_Linux_version(void); extern void display_version(void); /* display suite version */ extern const char procps_version[]; /* global buf for suite version */
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page