summaryrefslogtreecommitdiffstats
path: root/usr.bin/top
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2001-03-20 16:02:16 +0000
committertmm <tmm@FreeBSD.org>2001-03-20 16:02:16 +0000
commit9bcd26813064f6ad798ad3a0be8d673b7ee02aed (patch)
tree4fce7502276c0e52d22964dfe1a6a08fda5effdc /usr.bin/top
parentd458a37885714323658f12d0da555473beca7c4c (diff)
downloadFreeBSD-src-9bcd26813064f6ad798ad3a0be8d673b7ee02aed.zip
FreeBSD-src-9bcd26813064f6ad798ad3a0be8d673b7ee02aed.tar.gz
Correct the top memory stats display: convert page counts to kB.
Submitted by: Andrea Campi <andrea@webcom.it> Approved by: rwatson Pointy hat to: myself
Diffstat (limited to 'usr.bin/top')
-rw-r--r--usr.bin/top/machine.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index 33c621e..5002498 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -332,7 +332,12 @@ struct system_info *si;
GETSYSCTL("vm.stats.vm.v_swappgsin", nspgsin);
GETSYSCTL("vm.stats.vm.v_swappgsout", nspgsout);
/* convert memory stats to Kbytes */
+ memory_stats[0] = pagetok(memory_stats[0]);
+ memory_stats[1] = pagetok(memory_stats[1]);
+ memory_stats[2] = pagetok(memory_stats[2]);
+ memory_stats[3] = pagetok(memory_stats[3]);
memory_stats[4] = bufspace / 1024;
+ memory_stats[5] = pagetok(memory_stats[5]);
memory_stats[6] = -1;
/* first interval */
OpenPOWER on IntegriCloud