blob: 6b7390fdd5267b09378f02754dbe59ccbc31cf6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## 60_top_nohz.dpatch by <fabbione@sunfire.int.fabbione.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Handle idle time calculations correctly when running with NOHZ.
@DPATCH@
diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
--- procps-3.2.7~/top.c 2006-06-25 08:41:48.000000000 +0200
+++ procps-3.2.7/top.c 2007-07-20 12:50:00.000000000 +0200
@@ -2886,6 +2886,7 @@
s_frme = cpu->s - cpu->s_sav;
n_frme = cpu->n - cpu->n_sav;
i_frme = TRIMz(cpu->i - cpu->i_sav);
+ if ((u_frme == 0) && (i_frme == 0)) i_frme = 100.0;
w_frme = cpu->w - cpu->w_sav;
x_frme = cpu->x - cpu->x_sav;
y_frme = cpu->y - cpu->y_sav;
|