diff options
author | peter <peter@FreeBSD.org> | 1999-11-17 12:49:22 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-11-17 12:49:22 +0000 |
commit | fb47be8de1c47c06a27c77000d7d17a781e3b3a9 (patch) | |
tree | a71b2ca8ff4f5078b932e23daae002745739edc6 /sys/kern/kern_proc.c | |
parent | 322dc2c62fd4322126414fbf0f7e50f4c9419ff8 (diff) | |
download | FreeBSD-src-fb47be8de1c47c06a27c77000d7d17a781e3b3a9.zip FreeBSD-src-fb47be8de1c47c06a27c77000d7d17a781e3b3a9.tar.gz |
Add e_stats (p->p_stats, from struct user->u_stats) to eproc so it's
fetchable via sysctl. This saves ps having to read the u-area for stats.
Be sure to recompile libkvm, ps, w, top and the usual suspects.
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r-- | sys/kern/kern_proc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 4c3ee1c..124bf02 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -449,7 +449,7 @@ fill_eproc(p, ep) if (p->p_ucred) ep->e_ucred = *p->p_ucred; } - if (p->p_procsig){ + if (p->p_procsig) { ep->e_procsig = *p->p_procsig; } if (p->p_stat != SIDL && p->p_stat != SZOMB && p->p_vmspace != NULL) { @@ -457,6 +457,8 @@ fill_eproc(p, ep) ep->e_vm = *vm; ep->e_vm.vm_rssize = vmspace_resident_count(vm); /*XXX*/ } + if ((p->p_flag & P_INMEM) && p->p_stats) + ep->e_stats = *p->p_stats; if (p->p_pptr) ep->e_ppid = p->p_pptr->p_pid; if (p->p_pgrp) { |