summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhdzhoujie <zhoujie133@huawei.com>2023-04-19 19:40:31 +0800
committerhdzhoujie <zhoujie133@huawei.com>2023-04-20 09:27:19 +0800
commit833cdc64f06989fc1949d056e8ec11d5cd99e4c0 (patch)
tree9cd02c4ce9b111d18d32bf1cabdeebeb3327e8f1
parent0e98e0677752272405652fd0cb1b73933236f873 (diff)
downloadprocps-ng-833cdc64f06989fc1949d056e8ec11d5cd99e4c0.tar.gz
top: added 'guest' tics when multiple cpus were merged
The 'guest' tics are added in the sum_tics function, but when multiple cpus are combined for display, the 'guest' tics are not added cumulatively in the sum_unify function. signed-off-by: zhoujie <zhoujie133@huawei.com>
-rw-r--r--src/top/top.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/top/top.c b/src/top/top.c
index 02ef8f6..abe6e66 100644
--- a/src/top/top.c
+++ b/src/top/top.c
@@ -6396,6 +6396,8 @@ static int sum_unify (struct stat_stack *this, int nobuf) {
stack[stat_IR].result.sl_int += rSv(stat_IR, sl_int);
stack[stat_SI].result.sl_int += rSv(stat_SI, sl_int);
stack[stat_ST].result.sl_int += rSv(stat_ST, sl_int);
+ stack[stat_GU].result.sl_int += rSv(stat_GU, sl_int);
+ stack[stat_GN].result.sl_int += rSv(stat_GN, sl_int);
stack[stat_SUM_USR].result.sl_int += rSv(stat_SUM_USR, sl_int);
stack[stat_SUM_SYS].result.sl_int += rSv(stat_SUM_SYS, sl_int);
stack[stat_SUM_TOT].result.sl_int += rSv(stat_SUM_TOT, sl_int);