1. 使用 pstree -p PID
ps aux | grep firefox | grep -v grep
charles 26058 0.0 0.0 4908 1152 ? S 19:17 0:00 /bin/sh /usr/lib/firefox-3.5.4/run-mozilla.sh /usr/lib/firefox-3.5.4/firefox
charles 26073 7.6 3.4 284264 70164 ? Sl 19:17 4:36 /usr/lib/firefox-3.5.4/firefox
pstree -p 26058
	
2.使用 /proc
cd /proc/26073/task
ls
26073 26074 26075 26076 26085 26086 26087 26092 26403
3. 使用 top 命令:
top -p 26073
然后press shift + h:
	
4. 使用 ps -eLf
5. 檢查線程占用的內(nèi)存
cat /proc/statm
6. 使用命令:
ps -Lo pid,ppid,pgid,nlwp,lwp,stat,command -p PID
	
7.自己編寫一個腳本:
	
	
- 
                                Linux
                                +關(guān)注
關(guān)注
88文章
11585瀏覽量
217346 - 
                                多線程
                                +關(guān)注
關(guān)注
0文章
279瀏覽量
20854 - 
                                虛擬機
                                +關(guān)注
關(guān)注
1文章
966瀏覽量
30083 
發(fā)布評論請先 登錄
          
        
        
虛擬機:Linux查看線程信息的步驟
                
 
    
    
    
    
    
    
           
            
            
                
            
評論