在pstree的输出中,[]和{}与[{}]之间有什么区别?我猜[]用于指定多个进程。例如,
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}]我只有一个okular进程从带有nohup和&的shell进程中运行。为什么我有okular---2*[{okular}]?
我不明白关于
进程的子线程在父进程下找到,并以大括号显示进程名。
icecast2---13*[{icecast2}]发布于 2014-07-31 05:59:43
来自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}][]表示相同的分支。{}表示子线程。因此,n[{process_name}]意味着父进程process_name下有n个线程。
https://unix.stackexchange.com/questions/147592
复制相似问题