查看linux启动的线程信息

1、某一进程所有的线程个数、启动时间

ps max -o lstart,lwp,pid,nlwp,cmd|more

lstart: STARTED time the command started.

nlwp: NLWP number of lwps (threads) in the process. (alias thcount).

lwp: LWP lwp (light weight process, or thread) ID of the lwp being reported.

2、Java进程信息查看

jstack <pid>|grep <desc>|cut -c<startindex>-<endindex>|sort |uniq -c

例如:jstack 12041|grep job|cut -c0-43|sort |uniq -c

3、查看进程创建的线程信息

top -p <pid> -H