Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!chinacat!sequoia!rpp386!jfh From: jfh@rpp386.cactus.org (John F Haugh II) Newsgroups: comp.unix.internals Subject: Re: How do I find programs complete run-string ? Message-ID: <19087@rpp386.cactus.org> Date: 5 Mar 91 13:51:14 GMT References: <199@ezelmo.UUCP> Reply-To: jfh@rpp386.cactus.org (John F Haugh II) Organization: Lone Star Cafe and BBS Service Lines: 23 X-Clever-Slogan: Recycle or Die. In article <199@ezelmo.UUCP> kenc@ezelmo.UUCP (Ken Cornetet) writes: >Under system V, how does one find the complete runstring of another >process ? By snooping around in the proc and user tables, I can find >the process argv[0], but I don't see any way to get the rest of the >args. Also, if the proc table says a process is swapped, how do I map >the pointer to the user table to a disk address ? Inquiring minds want >to know! It depends somewhat on the exact version of System V that you are running since the memory management scam has a lot to do with how you track down your processes pieces parts. I posted a beta-test version of a kernel snooper a few weeks back in alt.sources. You might want to try dredging it up and using it as the basis for your own kernel snooper if you don't already have a "crash" utility. Otherwise, drag out the system-supplied crash and dig around the various kernel structures with a copy of "Bach" at hand. -- John F. Haugh II | Distribution to | UUCP: ...!cs.utexas.edu!rpp386!jfh Ma Bell: (512) 832-8832 | GEnie PROHIBITED :-) | Domain: jfh@rpp386.cactus.org "I've never written a device driver, but I have written a device driver manual" -- Robert Hartman, IDE Corp.