Unix Shell - Re: what alternatives does a shell command have in determining its

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > May 2007 > Re: what alternatives does a shell command have in determining its





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: what alternatives does a shell command have in determining its
Jürgen Groß

2007-05-24, 1:18 pm

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.


ptree $$
should do the job. You even see the complete process history above your
script.

>
> 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


Perhaps dtrace on Solaris 10 would be an alternative.

Juergen

--
Juergen Gross Principal Developer
IP SW OS6 Telephone: +49 (0) 89 636 47950
Fujitsu Siemens Computers e-mail: juergen.gross@fujitsu-siemens.com
Otto-Hahn-Ring 6 Internet: www.fujitsu-siemens.com
D-81739 Muenchen Company details: www.fujitsu-siemens.com/imprint.html
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com