linux 怎么看进程的线程数
发布网友
发布时间:2022-04-22 23:01
我来回答
共1个回答
热心网友
时间:2022-05-03 23:55
root@localhost:~# pstree --help
pstree: unrecognized option '--help'
Usage: pstree [ -a ] [ -c ] [ -h | -H PID ] [ -l ] [ -n ] [ -p ] [ -g ] [ -u ]
[ -A | -G | -U ] [ PID | USER ]
pstree -V
Display a tree of processes.
-a, --arguments show command line arguments
-A, --ascii use ASCII line drawing characters
-c, --compact don't compact identical subtrees
-h, --highlight-all highlight current process and its ancestors
-H PID,
--highlight-pid=PID highlight this process and its ancestors
-g, --show-pgids show process group ids; implies -c
-G, --vt100 use VT100 line drawing characters
-l, --long don't truncate long lines
-n, --numeric-sort sort output by PID
-p, --show-pids show PIDs; implies -c
-s, --show-parents show parents of the selected process
-u, --uid-changes show uid transitions
-U, --unicode use UTF-8 (Unicode) line drawing characters
-V, --version display version information
PID start at this PID; default is 1 (init)
USER show only trees rooted at processes of this user
-p, --show-pids show PIDs; implies -c
-p 接进程pid,就可以显示子进程
root@localhost:~# pstree -p 1464
php5-fpm(1464)─┬─php5-fpm(1467)
├─php5-fpm(1468)
├─php5-fpm(1469)
├─php5-fpm(1470)
├─php5-fpm(1471)
├─php5-fpm(1472)
├─php5-fpm(1473)
├─php5-fpm(1474)
├─php5-fpm(1475)
├─php5-fpm(1476)
├─php5-fpm(4377)
├─php5-fpm(7805)
├─php5-fpm(8290)
└─php5-fpm(22279)