Solaris ptree equivalent command in Linux

From: Michael Wang (mwang_at_unixlabplus.com)
Date: 07/30/03


Date: Wed, 30 Jul 2003 20:16:42 GMT

Solaris ptree command produces something like:

159 /usr/sbin/inetd -s
  26072 in.telnetd
    26074 -ksh
      4771 /usr/local/bin/ksh trap11.ksh
        4772 /usr/local/bin/ksh trap11.ksh
          4773 /usr/local/bin/ksh trap11.ksh
            4774 /bin/sleep 1

I need Linux equivalent. ps --forest -eaf works, but
I have to get ALL PIDs. Why ps --forest --pid does not work?

pstree -a -p works some what, but if you gives a child ID, it does
show the whole tree. -H would get the whole PIDs in the system.

What is the closest match to solaris simple ptree command output?

-- 
Michael Wang * http://www.unixlabplus.com/ * mwang@unixlabplus.com