DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

用ps指令查看进程内的线程数量


[godu@goduserver ~]$ jps 24121 Jps 23854 PoolServer 22522 AppMain 22351 ResFreshAppMain 23898 PoolServer 22713 SimpleJettyServer

[godu@goduserver ~]$ ps -p 23854 -L -o tid,pcpu,state,nlwp TID %CPU S NLWP 23854 0.0 S 40 23855 0.0 S 40 23856 0.0 S 40

其中-L参数是列出进程内的线程(详见man ps的"THREAD DISPLAY"一节),-o是指定输出项(详见man ps的"STANDARD FORMAT SPECIFIERS"一节)。

参考:UNIX / Linux: 7 Practical PS Command Examples for Process Monitoring



Published

Sep 18, 2012

Last Updated

Sep 18, 2012

Category

Tech

Tags

  • process 2
  • ps 2
  • thread 3
  • Unix 15

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor