| Henry Townsend 2007-05-25, 1:24 am |
| Larry W. Virden wrote:
> I certainly know there is a parent process id in the output of ps.
> However, in many cases, that info is less than useless (when the
> parent process is gone, for instance).
>
> What I need is some code I can put into ksh script abc so that it can
> output the name of the process which started it.
>
> Are there either existing tools, or techniques, by which this
> information could be derived?
>
> I'm currently in an environment where Solaris 8/9/10 are all in use,
> and the script is written in ksh88i
On Solaris, try ptree (and its relatives, collectively known as the
p-tools). On other systems you can download 'pstree', a free program.
Once you have the pid of a process you can use 'pargs' (another p-tool)
to get its command line.
HT
|