已Nginx为例:
方法一:
1.pstree -p 14686(PID)
![](http://img.blog.itpub.net/blog/attachment/201505/27/29754888_1432717695RlBU.jpg?x-oss-process=style/bb)
获取到nginx的四个子进程(或 ps -ef |grep nginx)
2. cat /proc/15178(PID)/status
![](http://img.blog.itpub.net/blog/attachment/201505/27/29754888_1432717759lO9p.jpg?x-oss-process=style/bb)
threads即为线程数:
![](http://img.blog.itpub.net/blog/attachment/201505/27/29754888_143271779526wf.jpg?x-oss-process=style/bb)
方法二:
ps -eL -o pid,%cpu,lwp|grep -i pid
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29754888/viewspace-1674095/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29754888/viewspace-1674095/