Index: BOOK/final-system/common/procps.xml
===================================================================
--- BOOK/final-system/common/procps.xml (revision 054ff8c76156f0f4e4c6574b7b57be8a9f0d8d9b)
+++ BOOK/final-system/common/procps.xml (revision 6d1db7d24d91f671c539e905cbe95b395561913a)
@@ -31,4 +31,9 @@
patch -Np1 -i ../&procps-ps_cgroup-patch;
+ The following patch fixes an issue where some procps utils
+ print an error on the screen if the monitor isn't running at 60Hz:
+
+patch -Np1 -i ../&procps-fix_HZ_errors-patch;
+
The following fixes an issue with Make 3.82:
Index: BOOK/introduction/common/changelog.xml
===================================================================
--- BOOK/introduction/common/changelog.xml (revision 054ff8c76156f0f4e4c6574b7b57be8a9f0d8d9b)
+++ BOOK/introduction/common/changelog.xml (revision 6d1db7d24d91f671c539e905cbe95b395561913a)
@@ -36,4 +36,14 @@
-->
+
+
+ February 10, 2011
+
+
+ [jciccone] - Added patch to procps to fix an issue when the
+ screen refresh rate isn't 60Hz.
+
+
+
Index: BOOK/materials/common/patches.xml
===================================================================
--- BOOK/materials/common/patches.xml (revision 054ff8c76156f0f4e4c6574b7b57be8a9f0d8d9b)
+++ BOOK/materials/common/patches.xml (revision 6d1db7d24d91f671c539e905cbe95b395561913a)
@@ -119,4 +119,13 @@
+ Procps Fix HZ Errors Patch - &procps-fix_HZ_errors-patch-size;:
+
+ Download:
+ MD5 sum: &procps-fix_HZ_errors-patch-md5;
+
+
+
+
Procps ps cgroup Patch - &procps-ps_cgroup-patch-size;:
Index: BOOK/patches.ent
===================================================================
--- BOOK/patches.ent (revision 054ff8c76156f0f4e4c6574b7b57be8a9f0d8d9b)
+++ BOOK/patches.ent (revision 6d1db7d24d91f671c539e905cbe95b395561913a)
@@ -56,4 +56,8 @@
+
+
+
+
Index: patches/procps-3.2.8-fix_HZ_errors-1.patch
===================================================================
--- patches/procps-3.2.8-fix_HZ_errors-1.patch (revision 6d1db7d24d91f671c539e905cbe95b395561913a)
+++ patches/procps-3.2.8-fix_HZ_errors-1.patch (revision 6d1db7d24d91f671c539e905cbe95b395561913a)
@@ -0,0 +1,54 @@
+Submitted By: DJ Lucas
+Date: 2010-09-20
+Initial Package Version: 3.2.8
+Origin: Debian 30_sysinfo_7numbers.patch
+Upstream Status: Submitted
+Description: Fixes "unknown HZ value (##)" errors in procps utils.
+
+diff -Naurp procps-3.2.8-orig//proc/sysinfo.c procps-3.2.8//proc/sysinfo.c
+--- procps-3.2.8-orig//proc/sysinfo.c 2008-03-23 23:33:43.000000000 -0500
++++ procps-3.2.8//proc/sysinfo.c 2010-09-20 01:13:36.000000000 -0500
+@@ -124,24 +124,25 @@ int uptime(double *restrict uptime_secs,
+ unsigned long long Hertz;
+
+ static void old_Hertz_hack(void){
+- unsigned long long user_j, nice_j, sys_j, other_j; /* jiffies (clock ticks) */
++ unsigned long long user_j, nice_j, sys_j, other_j, wait_j, hirq_j, sirq_j, stol_j; /* jiffies (clock ticks) */
+ double up_1, up_2, seconds;
+ unsigned long long jiffies;
+ unsigned h;
+ char *restrict savelocale;
+
++ wait_j = hirq_j = sirq_j = stol_j = 0;
+ savelocale = setlocale(LC_NUMERIC, NULL);
+ setlocale(LC_NUMERIC, "C");
+ do{
+ FILE_TO_BUF(UPTIME_FILE,uptime_fd); sscanf(buf, "%lf", &up_1);
+ /* uptime(&up_1, NULL); */
+ FILE_TO_BUF(STAT_FILE,stat_fd);
+- sscanf(buf, "cpu %Lu %Lu %Lu %Lu", &user_j, &nice_j, &sys_j, &other_j);
++ sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu", &user_j, &nice_j, &sys_j, &other_j, &wait_j, &hirq_j, &sirq_j, &stol_j);
+ FILE_TO_BUF(UPTIME_FILE,uptime_fd); sscanf(buf, "%lf", &up_2);
+ /* uptime(&up_2, NULL); */
+ } while((long long)( (up_2-up_1)*1000.0/up_1 )); /* want under 0.1% error */
+ setlocale(LC_NUMERIC, savelocale);
+- jiffies = user_j + nice_j + sys_j + other_j;
++ jiffies = user_j + nice_j + sys_j + other_j + wait_j + hirq_j + sirq_j + stol_j ;
+ seconds = (up_1 + up_2) / 2;
+ h = (unsigned)( (double)jiffies/seconds/smp_num_cpus );
+ /* actual values used by 2.4 kernels: 32 64 100 128 1000 1024 1200 */
+@@ -221,12 +222,13 @@ static void init_libproc(void){
+ // _SC_NPROCESSORS_ONLN returns 1, which should work OK
+ smp_num_cpus = sysconf(_SC_NPROCESSORS_ONLN);
+ if(smp_num_cpus<1) smp_num_cpus=1; /* SPARC glibc is buggy */
+-
++#ifdef __linux__
+ if(linux_version_code > LINUX_VERSION(2, 4, 0)){
+ Hertz = find_elf_note(AT_CLKTCK);
+ if(Hertz!=NOTE_NOT_FOUND) return;
+ fputs("2.4+ kernel w/o ELF notes? -- report this\n", stderr);
+ }
++#endif
+ old_Hertz_hack();
+ }
+