"strace -p"非常有用,它减少了很多猜测工作,也不需要重新启动应用。lsof -p process_id +iostat + sar -n DEV 1

linux神器strace - youxin - 博客园
https://www.cnblogs.com/youxin/p/8837771.html

 

某个进程突然占用了很多CPU? 或者某个进程看起来像hanging了?

找到对应的pid,然后

 hang:

悬挂,挂起的意思

就是一个进程被暂时停止执行.

hang


[cpp] view plain copy
 
  1. root@dev:~# strace -p 15427  
  2. Process 15427 attached - interrupt to quit  
  3. futex(0x402f4900, FUTEX_WAIT, 2, NULL   
  4. Process 15427 detached  
posted @ 2018-06-06 00:26  littlevigra  阅读(256)  评论(4)    收藏  举报