-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.sh
. Script.sh
프로세스 가 생성되어 java
15개의 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
.