Find the answer to your Linux question:
Results 1 to 4 of 4
On Sun Solaris, I can use "ptree" to trace all parent and child processes for a given PID. Is there same command available on Linux? (I can't find ptree on ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2010
    Posts
    1

    Equivalent command as ptree in Linux


    On Sun Solaris, I can use "ptree" to trace all parent and child processes for a given PID. Is there same command available on Linux? (I can't find ptree on linux)

    Thanks!

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    There is a pstree command for Linux, but I don't know what package it might be in. I have used it before, though.

    You may also want to check the man page for "ps", which appears to have a --forest option that may do what you want.

  3. #3
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    In Arch at least, pstree is part of the psmisc package. Other distros may name the package differently.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    Quote Originally Posted by reed9 View Post
    In Arch at least, pstree is part of the psmisc package. Other distros may name the package differently.
    And the command it uses is pstree, not ptree. I think the package is found in the rpmforge repository, as least for RHEL/CentOS/Fedora.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •