Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/sysctl Support vm.nkmempages.
details: https://anonhg.NetBSD.org/src/rev/2edafe8be633
branches: trunk
changeset: 482049:2edafe8be633
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Feb 12 18:00:58 2000 +0000
description:
Support vm.nkmempages.
diffstat:
sbin/sysctl/sysctl.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diffs (40 lines):
diff -r 6eb7eb58be38 -r 2edafe8be633 sbin/sysctl/sysctl.c
--- a/sbin/sysctl/sysctl.c Sat Feb 12 18:00:00 2000 +0000
+++ b/sbin/sysctl/sysctl.c Sat Feb 12 18:00:58 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysctl.c,v 1.24 2000/02/06 11:12:40 itojun Exp $ */
+/* $NetBSD: sysctl.c,v 1.25 2000/02/12 18:00:58 thorpej Exp $ */
/*
* Copyright (c) 1993
@@ -44,7 +44,7 @@
#if 0
static char sccsid[] = "@(#)sysctl.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: sysctl.c,v 1.24 2000/02/06 11:12:40 itojun Exp $");
+__RCSID("$NetBSD: sysctl.c,v 1.25 2000/02/12 18:00:58 thorpej Exp $");
#endif
#endif /* not lint */
@@ -374,6 +374,21 @@
loads[0], loads[1], loads[2]);
return;
}
+ if (mib[1] == VM_NKMEMPAGES) {
+ size_t nkmempages_len;
+ int nkmempages;
+
+ nkmempages_len = sizeof(nkmempages);
+
+ if (sysctl(mib, 2, &nkmempages, &nkmempages_len,
+ NULL, 0)) {
+ warn("unable to get %s", string);
+ return;
+ }
+ if (!nflag)
+ fprintf(stdout, "%s: ", string);
+ fprintf(stdout, "%d\n", nkmempages);
+ }
if (flags == 0)
return;
warnx("Use vmstat or systat to view %s information", string);
Home |
Main Index |
Thread Index |
Old Index