Category

Linux Command


Usage

pstree [-a] [-c] [-h|-Hpid] [-l] [-n] [-p] [-u] [-Z] [-A|-G|-U] [pid|user]


Manual

pstree shows running processes as a tree. The tree is rooted at either
pid or init if pid is omitted. If a user name is specified, all process
trees rooted at processes owned by that user are shown.

pstree visually merges identical branches by putting them in square
brackets and prefixing them with the repetition count, e.g.

init-+-getty
|-getty
|-getty
‘-getty

becomes

init---4*[getty]



Child threads of a process are found under the parent process and are
shown with the process name in curly braces, e.g.

icecast2---13*[{icecast2}]


If pstree is called as pstree.x11 then it will prompt the user at the
end of the line to press return and will not return until that has hap-
pened. This is useful for when pstree is run in a xterminal.

Certain kernel or mount parameters, such as the hidepid option for
procfs, will hide information for some processes. In these situations
pstree will attempt to build the tree without this information, showing
process names as question marks.



Share your experience or ask a question