Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/systat In vmstat display, add one more column to out...
details: https://anonhg.NetBSD.org/src/rev/2483173f588e
branches: trunk
changeset: 754441:2483173f588e
user: njoly <njoly%NetBSD.org@localhost>
date: Fri Apr 30 13:49:22 2010 +0000
description:
In vmstat display, add one more column to output memory values. Avoid
overflow with more than 100GB.
diffstat:
usr.bin/systat/vmstat.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diffs (52 lines):
diff -r f6fc9e693759 -r 2483173f588e usr.bin/systat/vmstat.c
--- a/usr.bin/systat/vmstat.c Fri Apr 30 13:48:55 2010 +0000
+++ b/usr.bin/systat/vmstat.c Fri Apr 30 13:49:22 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.75 2009/10/21 21:12:07 rmind Exp $ */
+/* $NetBSD: vmstat.c,v 1.76 2010/04/30 13:49:22 njoly Exp $ */
/*-
* Copyright (c) 1983, 1989, 1992, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94";
#endif
-__RCSID("$NetBSD: vmstat.c,v 1.75 2009/10/21 21:12:07 rmind Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.76 2010/04/30 13:49:22 njoly Exp $");
#endif /* not lint */
/*
@@ -350,8 +350,8 @@
/* Left hand column */
- mvprintw(MEMROW, MEMCOL, " memory totals (in kB)");
- mvprintw(MEMROW + 1, MEMCOL, " real virtual free");
+ mvprintw(MEMROW, MEMCOL, " memory totals (in kB)");
+ mvprintw(MEMROW + 1, MEMCOL, " real virtual free");
mvprintw(MEMROW + 2, MEMCOL, "Active");
mvprintw(MEMROW + 3, MEMCOL, "All");
@@ -514,15 +514,16 @@
/* Memory totals */
#define pgtokb(pg) ((pg) * (s.uvmexp.pagesize / 1024))
- putint(pgtokb(s.uvmexp.active), MEMROW + 2, MEMCOL + 6, 8);
+ putint(pgtokb(s.uvmexp.active), MEMROW + 2, MEMCOL + 6, 9);
putint(pgtokb(s.uvmexp.active + s.uvmexp.swpginuse), /* XXX */
- MEMROW + 2, MEMCOL + 15, 8);
- putint(pgtokb(s.uvmexp.npages - s.uvmexp.free), MEMROW + 3, MEMCOL + 6, 8);
+ MEMROW + 2, MEMCOL + 16, 9);
+ putint(pgtokb(s.uvmexp.npages - s.uvmexp.free),
+ MEMROW + 3, MEMCOL + 6, 9);
putint(pgtokb(s.uvmexp.npages - s.uvmexp.free + s.uvmexp.swpginuse),
- MEMROW + 3, MEMCOL + 15, 8);
- putint(pgtokb(s.uvmexp.free), MEMROW + 2, MEMCOL + 24, 8);
+ MEMROW + 3, MEMCOL + 16, 9);
+ putint(pgtokb(s.uvmexp.free), MEMROW + 2, MEMCOL + 26, 9);
putint(pgtokb(s.uvmexp.free + s.uvmexp.swpages - s.uvmexp.swpginuse),
- MEMROW + 3, MEMCOL + 24, 8);
+ MEMROW + 3, MEMCOL + 26, 9);
#undef pgtokb
/* Namei cache */
Home |
Main Index |
Thread Index |
Old Index