summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>2000-06-18 17:59:57 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>2000-06-18 17:59:57 +0000
commit3e1b0c93cbfea793e98b3b3bf7551399ede91f93 (patch)
treeb3afe1b2bd5097be03d5846b827f206f8539ac5f /lib
parent69a21ea0afdd021cb62f457b1cf6f2a69856ee12 (diff)
Mark kernel threads as system processes. Make ps hide them by default,
show them with -k. Do not try to show RSS based values for them as they mess up column alignment. vmstat -f now shows kernel threads separately from rforks too.
Diffstat (limited to 'lib')
-rw-r--r--lib/libkvm/kvm_proc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c
index 4602f7c2430..3f2117d058f 100644
--- a/lib/libkvm/kvm_proc.c
+++ b/lib/libkvm/kvm_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kvm_proc.c,v 1.5 1999/06/22 12:54:45 art Exp $ */
+/* $OpenBSD: kvm_proc.c,v 1.6 2000/06/18 17:59:54 niklas Exp $ */
/* $NetBSD: kvm_proc.c,v 1.30 1999/03/24 05:50:50 mrg Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -77,7 +77,7 @@
#if 0
static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93";
#else
-static char *rcsid = "$OpenBSD: kvm_proc.c,v 1.5 1999/06/22 12:54:45 art Exp $";
+static char *rcsid = "$OpenBSD: kvm_proc.c,v 1.6 2000/06/18 17:59:54 niklas Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -466,6 +466,11 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
if (eproc.e_pcred.p_ruid != (uid_t)arg)
continue;
break;
+
+ case KERN_PROC_ALL:
+ if (proc.p_flag & P_SYSTEM)
+ continue;
+ break;
}
/*
* We're going to add another proc to the set. If this