diff options
author | Paul Irofti <pirofti@cvs.openbsd.org> | 2012-04-12 14:59:20 +0000 |
---|---|---|
committer | Paul Irofti <pirofti@cvs.openbsd.org> | 2012-04-12 14:59:20 +0000 |
commit | f63ee3a6ce91574448645ed33a0b6a1364e3afc5 (patch) | |
tree | b8082a6a211be23de65284e8aa21285f859f73c3 /lib/libkvm/kvm_getprocs.3 | |
parent | 22c2bfb88e8c394dc20c81832688dd203d02dd8b (diff) |
Add per thread accounting, mainly for usage & friends.
This expands the already bloated FILL_KPROC macro to take an extra
parameter that indicates if the callee is a thread or a process.
The userland bits are adjusted accordingly and ps(1) and top(1) now
display per thread usage times when -H is used.
Also pkill(1) had to be adjusted so that duplicates don't pop up.
libkvm does basically the same thing as the kernel bits.
Okay guenther@.
Diffstat (limited to 'lib/libkvm/kvm_getprocs.3')
-rw-r--r-- | lib/libkvm/kvm_getprocs.3 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libkvm/kvm_getprocs.3 b/lib/libkvm/kvm_getprocs.3 index e2acf477b22..93a4a7b4381 100644 --- a/lib/libkvm/kvm_getprocs.3 +++ b/lib/libkvm/kvm_getprocs.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: kvm_getprocs.3,v 1.17 2012/01/07 05:38:12 guenther Exp $ +.\" $OpenBSD: kvm_getprocs.3,v 1.18 2012/04/12 14:59:19 pirofti Exp $ .\" $NetBSD: kvm_getprocs.3,v 1.13 2003/08/07 16:44:37 agc Exp $ .\" .\" Copyright (c) 1992, 1993 @@ -34,7 +34,7 @@ .\" .\" @(#)kvm_getprocs.3 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: January 7 2012 $ +.Dd $Mdocdate: April 12 2012 $ .Dt KVM_GETPROCS 3 .Os .Sh NAME @@ -114,6 +114,10 @@ and .Fn kvm_close will overwrite this storage. .Pp +.Fn kvm_getprocs +sets the thread ID field accordingly for each thread except for the +process (main thread) which has it set to \-1. +.Pp .Fn kvm_getargv returns a null-terminated argument vector that corresponds to the command line arguments passed to process indicated by |