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一行顯示一個線程。否則,它一行顯示一個進程。
4、ps xH
手冊中說:H Show threads as if they were processes
這樣可以查看所有存在的線程。
5、ps -mp <PID>
手冊中說:m Show threads after processes
這樣可以查看一個進程起的線程數。