Significado da saída do pstree

2
-bash-3.2$ pstree 27108
Script.sh---java---15*[{java}]

O que isso significa 15* aqui e também quaisquer significados definidos para [] & {} no contexto do comando?

    
por Keyshov Borate 05.03.2015 / 13:23

2 respostas

6

Está bem ali na página 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}]

No seu caso, o processo 27108 foi iniciado pelo script Script.sh . O Script.sh criou um processo java que gerou outros 15 encadeamentos java.

Um ps -eLf | grep java | wc -l deve retornar uma contagem em torno do número 15.

    
por 05.03.2015 / 13:34
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}]

Então, 15 threads de java process.

    
por 05.03.2015 / 13:34

Tags