pstree出力の意味

pstree出力の意味
-bash-3.2$ pstree 27108
Script.sh---java---15*[{java}]

ここでこれは何を意味し、15*コマンドの文脈で&に対して定義された意味は何ですか?[]{}

答え1

manページに直接あります:

   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  pro-
   cesses 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}]

あなたの場合、プロセス27108はスクリプトによって開始されますScript.shScript.shプロセスが生成され、java15個のJavaスレッドが生成されます。

Aはps -eLf | grep java | wc -l約15個の数を返す必要があります。

答え2

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

したがって、プロセス15スレッドjava

関連情報