My 2 cents:

I am not an expert.

I easily found a way to find a way to get a list of all processes in the
parent tree of my existing task in Solaris, but even asking for help on
the local Linux user group, could not find a way in Linux, short of
writing a program with a loop containing tests..  This was several years
ago, so if it has changed, please ignore this, except that it may
indicate Solaris is "ahead" of Linux.  At the time I was trying to move
my tools to Linux, there were other ways I felt Linux had glitz but not
nitty gritty ease of use, but that my have only been my ignorance.  The
closest Linux equivalent to pstree is pretty with a full color display,
but can't be limited to one branch.

Here Solaris code:

mypid=`ps -opid`
mypid=`echo $mypid|cut -d" " -f2`
mycons=`/usr/proc/bin/ptree $mypid|grep console.|grep -v grep|wc -l`


My goal was to find if what I was doing was being recorded, so I would
not start a second console log if there already was one being created.
I worked for a bank and we needed to document everything.   Also, I if I
made a mistake, I wanted to be able to go back and figure out what I did
wrong.  I performed the above whenever I worked on a server, as part of
my profile.  There are other reasons one might want to see what tasks
were in one's parent tree, but not care if they were running under some
other person.

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to