summaryrefslogtreecommitdiffstats
path: root/usr.bin/vmstat/vmstat.c
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2010-11-19 18:35:16 +0000
committermikeb <mikeb@openbsd.org>2010-11-19 18:35:16 +0000
commit6dfb0ca93bf7f3b016787f81e551441d5bbd5575 (patch)
tree21431a3724e45e2a9d014c08c6ae647ad36cb213 /usr.bin/vmstat/vmstat.c
parentgapz@dud-t . org noted that sparc64 installboot crashes if the bootblock is (diff)
downloadwireguard-openbsd-6dfb0ca93bf7f3b016787f81e551441d5bbd5575.tar.xz
wireguard-openbsd-6dfb0ca93bf7f3b016787f81e551441d5bbd5575.zip
Make KERN_CPTIME return an avarage number of ticks across all CPUs
tedu agreed with an idea, tested by Luis Useche and me; ok deraadt
Diffstat (limited to 'usr.bin/vmstat/vmstat.c')
-rw-r--r--usr.bin/vmstat/vmstat.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index beb62411da4..5d4951b4998 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.117 2010/08/01 02:51:03 chl Exp $ */
+/* $OpenBSD: vmstat.c,v 1.118 2010/11/19 18:35:16 mikeb Exp $ */
/*
* Copyright (c) 1980, 1986, 1991, 1993
@@ -128,8 +128,6 @@ extern char *__progname;
int verbose = 0;
int zflag = 0;
-int ncpu;
-
int
main(int argc, char *argv[])
{
@@ -211,11 +209,6 @@ main(int argc, char *argv[])
}
}
- mib[0] = CTL_HW;
- mib[1] = HW_NCPU;
- size = sizeof(ncpu);
- (void) sysctl(mib, 2, &ncpu, &size, NULL, 0);
-
if (todo & VMSTAT) {
struct winsize winsize;
@@ -649,7 +642,6 @@ dkstats(void)
if (etime == 0)
etime = 1;
etime /= hz;
- etime /= ncpu;
for (dn = 0; dn < dk_ndrive; ++dn) {
if (!dk_select[dn])
continue;