Search code examples
unixpstree

What do the curly braces around a process in pstree mean?


The man page does explain what the bracket-braces means (it refers to threads), but I'm wondering what just the braces means.

From this here I can see that auditd and node are like this.

❯ pstree
init─┬─agetty
     ├─atd
     ├─auditd───{auditd}
     ├─crond
     ├─dbus-daemon
     ├─dhclient
     ├─6*[mingetty]
     ├─ntpd
     ├─rsyslogd───3*[{rsyslogd}]
     ├─2*[sendmail]
     ├─sshd─┬─sshd───sshd───zsh───tmux
     │      └─sshd───sshd───zsh───man───sh───sh───less
     ├─tmux─┬─2*[zsh]
     │      ├─zsh───node───{node}
     │      └─zsh───pstree
     └─udevd───2*[udevd]

My current best guess is that it means they are blocked on input.


Solution

  • n*[{name}] means group of the n threads. If there is only one thread, pstree use {name}

    {auditd} <=> 1*[{auditd}]
    

    For group of threads, pstree use n*[{name}]:

    ├─rsyslogd───3*[{rsyslogd}]
    

    equipvalent to:

    ├─rsyslogd─┬─{rsyslogd}
               ├─{rsyslogd}
               └─{rsyslogd}
    

    use command "pstree -a" to see the different.