Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Use the vm.uvmexp2 sysctl.
details: https://anonhg.NetBSD.org/src/rev/6e82eccb321f
branches: trunk
changeset: 499786:6e82eccb321f
user: simonb <simonb%NetBSD.org@localhost>
date: Wed Nov 29 11:18:33 2000 +0000
description:
Use the vm.uvmexp2 sysctl.
diffstat:
libexec/rpc.rstatd/rstat_proc.c | 10 +++++-----
usr.bin/systat/vmstat.c | 8 ++++----
usr.bin/top/machine/m_netbsd15.c | 10 +++++-----
3 files changed, 14 insertions(+), 14 deletions(-)
diffs (116 lines):
diff -r d2e72ab0b0b8 -r 6e82eccb321f libexec/rpc.rstatd/rstat_proc.c
--- a/libexec/rpc.rstatd/rstat_proc.c Wed Nov 29 09:56:02 2000 +0000
+++ b/libexec/rpc.rstatd/rstat_proc.c Wed Nov 29 11:18:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rstat_proc.c,v 1.35 2000/06/29 06:26:33 mrg Exp $ */
+/* $NetBSD: rstat_proc.c,v 1.36 2000/11/29 11:18:34 simonb Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,7 @@
static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro";
static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC";
#else
-__RCSID("$NetBSD: rstat_proc.c,v 1.35 2000/06/29 06:26:33 mrg Exp $");
+__RCSID("$NetBSD: rstat_proc.c,v 1.36 2000/11/29 11:18:34 simonb Exp $");
#endif
#endif
@@ -206,7 +206,7 @@
int i;
size_t len;
int mib[2];
- struct uvmexp uvmexp;
+ struct uvmexp_sysctl uvmexp;
struct ifnet ifnet;
double avrun[3];
struct timeval tm, btm;
@@ -272,10 +272,10 @@
#endif
mib[0] = CTL_VM;
- mib[1] = VM_UVMEXP;
+ mib[1] = VM_UVMEXP2;
len = sizeof(uvmexp);
if (sysctl(mib, 2, &uvmexp, &len, NULL, 0) < 0) {
- syslog(LOG_ERR, "can't sysctl vm.uvmexp");
+ syslog(LOG_ERR, "can't sysctl vm.uvmexp2");
exit(1);
}
stats_all.s3.v_pgpgin = uvmexp.fltanget;
diff -r d2e72ab0b0b8 -r 6e82eccb321f usr.bin/systat/vmstat.c
--- a/usr.bin/systat/vmstat.c Wed Nov 29 09:56:02 2000 +0000
+++ b/usr.bin/systat/vmstat.c Wed Nov 29 11:18:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.33 2000/07/05 11:03:23 ad Exp $ */
+/* $NetBSD: vmstat.c,v 1.34 2000/11/29 11:18:33 simonb Exp $ */
/*-
* Copyright (c) 1983, 1989, 1992, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94";
#endif
-__RCSID("$NetBSD: vmstat.c,v 1.33 2000/07/05 11:03:23 ad Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.34 2000/11/29 11:18:33 simonb Exp $");
#endif /* not lint */
/*
@@ -73,7 +73,7 @@
static struct Info {
u_int64_t time[CPUSTATES];
- struct uvmexp uvmexp;
+ struct uvmexp_sysctl uvmexp;
struct vmtotal Total;
struct nchstats nchstats;
long nchcount;
@@ -594,7 +594,7 @@
NREAD(X_INTRCNT, s->intrcnt, nintr * LONG);
size = sizeof(s->uvmexp);
mib[0] = CTL_VM;
- mib[1] = VM_UVMEXP;
+ mib[1] = VM_UVMEXP2;
if (sysctl(mib, 2, &s->uvmexp, &size, NULL, 0) < 0) {
error("can't get uvmexp: %s\n", strerror(errno));
memset(&s->uvmexp, 0, sizeof(s->uvmexp));
diff -r d2e72ab0b0b8 -r 6e82eccb321f usr.bin/top/machine/m_netbsd15.c
--- a/usr.bin/top/machine/m_netbsd15.c Wed Nov 29 09:56:02 2000 +0000
+++ b/usr.bin/top/machine/m_netbsd15.c Wed Nov 29 11:18:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: m_netbsd15.c,v 1.10 2000/11/19 01:49:29 sommerfeld Exp $ */
+/* $NetBSD: m_netbsd15.c,v 1.11 2000/11/29 11:18:33 simonb Exp $ */
/*
* top - a top users display for Unix
@@ -34,7 +34,7 @@
* Simon Burge <simonb%netbsd.org@localhost>
*
*
- * $Id: m_netbsd15.c,v 1.10 2000/11/19 01:49:29 sommerfeld Exp $
+ * $Id: m_netbsd15.c,v 1.11 2000/11/29 11:18:33 simonb Exp $
*/
#include <sys/param.h>
@@ -266,7 +266,7 @@
{
size_t ssize;
int mib[2];
- struct uvmexp uvmexp;
+ struct uvmexp_sysctl uvmexp;
struct swapent *sep, *seporig;
u_int64_t totalsize, totalinuse;
int size, inuse, ncounted;
@@ -293,10 +293,10 @@
percentages64(CPUSTATES, cpu_states, cp_time, cp_old, cp_diff);
mib[0] = CTL_VM;
- mib[1] = VM_UVMEXP;
+ mib[1] = VM_UVMEXP2;
ssize = sizeof(uvmexp);
if (sysctl(mib, 2, &uvmexp, &ssize, NULL, 0) < 0) {
- fprintf(stderr, "top: sysctl vm.uvmexp failed: %s\n",
+ fprintf(stderr, "top: sysctl vm.uvmexp2 failed: %s\n",
strerror(errno));
quit(23);
}
Home |
Main Index |
Thread Index |
Old Index