使用py-spy查看python程序调用堆栈

  1. 安装py-spy
pip install py-spy
  1. top查看python pid
top
  1. 查看代码堆栈
py-spy top --pid 1780 
时间会记录下一切。
原文地址:https://www.cnblogs.com/bincoding/p/14889321.html