PROCESS INFO
Jeff Gruszynski
jeff at hpuplca.nsr.hp.com
Tue Apr 16 06:27:59 AEST 1991
/ hpuplca:comp.unix.internals / pthonda at bgsuvax.bgsu.edu (Killer B) / 8:53 pm Apr 12, 1991 /
>
>
> int disPinfo(ps)
> struct proc *ps ;
> {
> struct rusage *ru ;
>
> ru = ps->p_ru ;
>
> /* ps->p_ru is pointing to location 0 , and I dont know why */
>
> /* Print process info and then the resource usage */
> printf("Process Information of process: %d\n" ,ps->p_pid) ;
> printf("----------------------------------------------------------\n") ;
I would guess the process is swapped out, so the structure is
unavailable. (I've only "hacked kernal" once, but my code had to test
for this and skip the detailed display routines for swapped out
processes. N.B. I'm not a kernal [wl]izard).
Jeff Gruszynski
Santa Clara Sales
Hewlett-Packard
More information about the Comp.unix.internals
mailing list