summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-06-27 06:16:53 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-06-27 06:16:53 +0000
commit82d5fc3837a1eea29deb57619991f47be2290723 (patch)
tree51e70dd744afb94c3256dd97afb14ae3bdca3d6a /libexec
parent2dda233b203f5ed37ee4b69b290902b48059865d (diff)
UVM is no longer an option
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rpc.rstatd/Makefile6
-rw-r--r--libexec/rpc.rstatd/rstat_proc.c31
2 files changed, 3 insertions, 34 deletions
diff --git a/libexec/rpc.rstatd/Makefile b/libexec/rpc.rstatd/Makefile
index 8fd7dbd3ac8..3982bd9ce10 100644
--- a/libexec/rpc.rstatd/Makefile
+++ b/libexec/rpc.rstatd/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.5 2001/01/28 19:34:31 niklas Exp $
+# $OpenBSD: Makefile,v 1.6 2001/06/27 06:16:46 art Exp $
PROG = rpc.rstatd
.PATH: ${.CURDIR}/../../usr.bin/vmstat
@@ -13,7 +13,3 @@ LDADD= -lrpcsvc -lkvm
.include <bsd.prog.mk>
-.if (${UVM:L} == "yes")
-CFLAGS+=-DUVM
-.endif
-
diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c
index 39f5b8d3344..73c5776bb91 100644
--- a/libexec/rpc.rstatd/rstat_proc.c
+++ b/libexec/rpc.rstatd/rstat_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rstat_proc.c,v 1.13 2001/01/24 11:42:37 deraadt Exp $ */
+/* $OpenBSD: rstat_proc.c,v 1.14 2001/06/27 06:16:46 art Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -31,7 +31,7 @@
#ifndef lint
/*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";*/
-static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.13 2001/01/24 11:42:37 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.14 2001/06/27 06:16:46 art Exp $";
#endif
/*
@@ -62,11 +62,9 @@ static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.13 2001/01/24 11:42:37 deraadt
#endif
#include <net/if.h>
-#if defined(UVM)
#include <vm/vm.h>
#include <sys/sysctl.h>
#include <uvm/uvm_extern.h>
-#endif
#undef FSHIFT /* Use protocol's shift and scale values */
#undef FSCALE
@@ -99,10 +97,6 @@ struct nlist nl[] = {
#define X_CNT 5
{ "_cnt" },
#else
-#ifndef UVM
-#define X_CNT 2
- { "_cnt" },
-#endif
#endif
{ NULL },
};
@@ -214,13 +208,9 @@ updatestat()
{
long off;
int i, save_errno = errno;
-#ifdef UVM
struct uvmexp uvmexp;
int mib[2];
size_t len;
-#else
- struct vmmeter cnt;
-#endif
struct ifnet ifnet;
double avrun[3];
struct timeval tm, btm;
@@ -291,7 +281,6 @@ updatestat()
stats_all.s1.cp_time[3]);
#endif
-#ifdef UVM
mib[0] = CTL_VM;
mib[1] = VM_UVMEXP;
len = sizeof(uvmexp);
@@ -308,22 +297,6 @@ updatestat()
gettimeofday(&tm, (struct timezone *) 0);
stats_all.s1.v_intr -= hz*(tm.tv_sec - btm.tv_sec) +
hz*(tm.tv_usec - btm.tv_usec)/1000000;
-#else
- if (kvm_read(kfd, (long)nl[X_CNT].n_value, (char *)&cnt, sizeof cnt) !=
- sizeof cnt) {
- syslog(LOG_ERR, "can't read cnt from kmem");
- exit(1);
- }
- stats_all.s1.v_pgpgin = cnt.v_pgpgin;
- stats_all.s1.v_pgpgout = cnt.v_pgpgout;
- stats_all.s1.v_pswpin = cnt.v_pswpin;
- stats_all.s1.v_pswpout = cnt.v_pswpout;
- stats_all.s1.v_intr = cnt.v_intr;
- gettimeofday(&tm, (struct timezone *) 0);
- stats_all.s1.v_intr -= hz*(tm.tv_sec - btm.tv_sec) +
- hz*(tm.tv_usec - btm.tv_usec)/1000000;
- stats_all.s2.v_swtch = cnt.v_swtch;
-#endif
#ifndef BSD
if (kvm_read(kfd, (long)nl[X_DKXFER].n_value,