
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)
1、 cat /proc/${pid}/status 2、pstree -p ${pid} 3、top -p ${pid} 再按H 或者直接输入 top -bH -d 3 -p ${pid} top -H 手册中说:-H : Threads toggle 加上这个选项启动top,top一行显示一个线程。
以上就是关于linux 怎么看进程的线程数全部的内容,包括:linux 怎么看进程的线程数、linux 如何看某个进程有多少线程、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)