summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2019-08-12 11:54:33 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2019-08-12 11:54:33 +0000
commit25a1f7d48f965424bc81c290fea250b8fc9c3a67 (patch)
treeff5edbe64432a204ab184791fd6834f999e658d6
parent812478e1b5f157ec9d86b09bbb509d31d43b22d0 (diff)
Add the CP_SPIN time to the sum of system time reported.
OK kettenis@
-rw-r--r--usr.bin/vmstat/vmstat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index 703818a920f..c010c599cbd 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -1,5 +1,5 @@
/* $NetBSD: vmstat.c,v 1.29.4.1 1996/06/05 00:21:05 cgd Exp $ */
-/* $OpenBSD: vmstat.c,v 1.146 2019/06/28 13:35:05 deraadt Exp $ */
+/* $OpenBSD: vmstat.c,v 1.147 2019/08/12 11:54:32 claudio Exp $ */
/*
* Copyright (c) 1980, 1986, 1991, 1993
@@ -653,7 +653,7 @@ cpustats(void)
else
percent = 0;
(void)printf("%2.0f ", (cur.cp_time[CP_USER] + cur.cp_time[CP_NICE]) * percent);
- (void)printf("%2.0f ", (cur.cp_time[CP_SYS] + cur.cp_time[CP_INTR]) * percent);
+ (void)printf("%2.0f ", (cur.cp_time[CP_SYS] + cur.cp_time[CP_SPIN] + cur.cp_time[CP_INTR]) * percent);
(void)printf("%2.0f", cur.cp_time[CP_IDLE] * percent);
}