procps/procps-3.2.7-large_pcpu.patch
2011-08-24 10:15:33 +00:00

36 lines
1.1 KiB
Diff

Fix %CPU in Irix mode to support higher cpu counts.
Signed-off-by: Tony Ernst <tee@sgi.com>
---
--- procps-3.2.7/top.c 2011-08-19 10:24:11.000000000 -0500
+++ procps-3.2.7/top.c 2011-08-19 10:24:18.000000000 -0500
@@ -1836,8 +1836,9 @@
if(Rc.mode_irixps && smp_num_cpus()>1){
// good for 100 CPUs per process
- pcpu_max_value = 9999.0;
- Fieldstab[P_CPU].fmts = " %4.0f";
+ pcpu_max_value = 999999.0;
+ Fieldstab[P_CPU].fmts = " %6.0f";
+ Fieldstab[P_CPU].head = " %CPU";
}
// lastly, establish the true runtime secure mode and delay time
@@ -2682,11 +2683,13 @@
#endif
if(Rc.mode_irixps && smp_num_cpus()>1){
// good for 100 CPUs per process
- pcpu_max_value = 9999.0;
- Fieldstab[P_CPU].fmts = " %4.0f";
+ pcpu_max_value = 999999.0;
+ Fieldstab[P_CPU].fmts = " %6.0f";
+ Fieldstab[P_CPU].head = " %CPU";
} else {
pcpu_max_value = 99.9;
Fieldstab[P_CPU].fmts = " %#4.1f";
+ Fieldstab[P_CPU].head = " %CPU";
}
break;