1

What are the differences between [] and {} and [{}] used to enclose a process in the output of pstree? I guess [] is used for specifying more than one processes. For example,

init-+-NetworkManager-+-dhclient
     |                |-dnsmasq
     |                `-2*[{NetworkManager}]
     |-accounts-daemon---{accounts-daemon}
     |-acpid

...

     |-gnome-terminal-+-7*[bash---emacs]
     |                |-6*[bash]
     |                |-2*[bash---less]
     |                |-bash-+-2*[grep]
     |                |      |-less
     |                |      `-locate
     |                |-bash-+-less
     |                |      `-pstree
     |                |-bash-+-emacs
     |                |      `-okular---2*[{okular}]
     |                |-gnome-pty-helpe
     |                `-3*[{gnome-terminal}]

I only have one okular process run from a shell process with nohup and &. Why do I have okular---2*[{okular}]?

I don't understand the manpage about

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}]
5

From man pstree:

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}]
  • [] denote identical branches.
  • {} denote child thread.

So n[{process_name}] meaning you have n threads under parent process process_name.

  • thanks. why some single-copy child processes are not in {}, such as dhclient? What does [{}] mean? – Tim Jul 31 '14 at 6:03
  • I only have one okular process run from a shell process with nohup and &. Why do I have okular---2*[{okular}]? – Tim Jul 31 '14 at 6:05
  • Because it has two child thread. In your input, there an exmaple of one parent - one child thread accounts-daemon---{accounts-daemon}. – cuonglm Jul 31 '14 at 6:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.