JStack分析cpu消耗過高問題

來源:互聯網
上載者:User

標籤:http   ar   strong   問題   on   ad   ef   程式   js   

Mark一下, 今天確實用這個方法找到了問題

http://www.iteye.com/topic/1114219

 

1. top找到目標進程,記下pid

2. top –p pid, 並用shift+h開啟線程模式
    這樣可以看到這個進程中,到底哪個線程佔用大量cpu
    記下threadid,tid

3. jstack查看該線程即時的stack情況
    jstack [進程]|grep -A 10 [線程的16進位]
    比如,jstack 21125|grep -A 10 52f1
    十六進位的轉換,用calc計算機的程式員模式

JStack分析cpu消耗過高問題

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.