Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uwm.edu!lll-winken!hpuplca!jeff From: jeff@hpuplca.nsr.hp.com ( Jeff Gruszynski ) Newsgroups: comp.unix.internals Subject: Re: PROCESS INFO Message-ID: <13330001@hpuplca.nsr.hp.com> Date: 15 Apr 91 20:27:59 GMT References: <7317@bgsuvax.bgsu.edu> Organization: Hewlett-Packard Pleasanton Ca. Sales Lines: 26 / hpuplca:comp.unix.internals / pthonda@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