zoukankan      html  css  js  c++  java
  • tomcat 利用jstack排查问题,找到问题代码

    1、使用top 命令找到cpu,内存使用率高得进程 ,得到进程id

    2、top -Hp 进程id ,获取当前进程的线程,比如:top -Hp 26937

    3、将得到线程号转换为16进制 printf ”%x “ 线程id   printf ”%x “ 27155

    4、利用jstack 获取信息  jstack 进程id | grep 转换的16进制线程 -A 30 ,通过错误信息的提示,找到问题的代码

    流程图如下:

    1、top

     2、top -Hp 26937

     3、printf "%x " 27155

     4、jstack 26937 | grep 6a13 -A 30

     

     
  • 相关阅读:
    导论
    Array
    Singleton
    Bridge
    Mediator
    interpreter
    Visitor
    Flyweight
    Command
    Chain Of Responsibility
  • 原文地址:https://www.cnblogs.com/dingbin/p/14550581.html
Copyright © 2011-2022 走看看