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.
This commit is contained in:
Peter Wemm 1999-11-17 12:49:22 +00:00
parent b1915357ce
commit e29e202c41
2 changed files with 4 additions and 1 deletions

View File

@ -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) {

View File

@ -71,6 +71,7 @@ struct kinfo_proc {
struct ucred e_ucred; /* current credentials */
struct procsig e_procsig; /* shared signal structure */
struct vmspace e_vm; /* address space */
struct pstats e_stats; /* process stats */
pid_t e_ppid; /* parent process id */
pid_t e_pgid; /* process group id */
short e_jobc; /* job control counter */