summaryrefslogtreecommitdiff
path: root/sys/vm/vm_meter.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-10-23 15:38:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-10-23 15:38:39 +0000
commit61c666c9333df533d3197a22ee2cc8d83ae0c298 (patch)
tree8ebb9e313d235cc991655f1effc7a035ddf7fab2 /sys/vm/vm_meter.c
parent28f64c37d06864b3cd81b57e0f80fe5e11694e71 (diff)
sysctl to locate psstrings
Diffstat (limited to 'sys/vm/vm_meter.c')
-rw-r--r--sys/vm/vm_meter.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c
index 100c65b88b8..217455c559b 100644
--- a/sys/vm/vm_meter.c
+++ b/sys/vm/vm_meter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_meter.c,v 1.2 1996/03/03 17:45:32 niklas Exp $ */
+/* $OpenBSD: vm_meter.c,v 1.3 1996/10/23 15:38:36 deraadt Exp $ */
/* $NetBSD: vm_meter.c,v 1.18 1996/02/05 01:53:59 christos Exp $ */
/*
@@ -42,6 +42,7 @@
#include <sys/kernel.h>
#include <vm/vm.h>
#include <sys/sysctl.h>
+#include <sys/exec.h>
struct loadavg averunnable; /* load average, of runnable procs */
@@ -111,6 +112,7 @@ vm_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
struct proc *p;
{
struct vmtotal vmtotals;
+ struct _ps_strings _ps = { PS_STRINGS };
/* all sysctl names at this level are terminal */
if (namelen != 1)
@@ -125,6 +127,9 @@ vm_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
vmtotal(&vmtotals);
return (sysctl_rdstruct(oldp, oldlenp, newp, &vmtotals,
sizeof(vmtotals)));
+ case VM_PSSTRINGS:
+ return (sysctl_rdstruct(oldp, oldlenp, newp, &_ps,
+ sizeof _ps));
default:
return (EOPNOTSUPP);
}