Skip to content

Instantly share code, notes, and snippets.

@zxkletters
Last active June 8, 2016 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zxkletters/5054819 to your computer and use it in GitHub Desktop.
Save zxkletters/5054819 to your computer and use it in GitHub Desktop.
查看jvm进程中占用cpu时间高的线程方法
1. jps或top 获取java的进程id
2. top -H -p java进程id ,可以看到各个线程占用的CPU时间
3. 找出占用CPU时间最高的线程PID, python -c "print hex(线程PID)" ,获取线程ID的16进制表示
4. jstack java进程id | less 根据16进制的线程ID查找具体线程的执行情况
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment