jconsole、java VisualVM、jprofiler

tomcat启动文件

vim /usr/local/TC7_A/bin/catalina.sh

while [ -h "$PRG" ]; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`/"$link"
fi
done

下面加入:

CATALINA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=192.168.1.101 -Dcom.sun.management.jmxremote.port=9526 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -agentpath:/opt/jprofiler7/bin/linux-x86/libjprofilerti.so=port=8849"

蓝色部分为 jprofiler配置,libjprofilerti.so路径为 opt/jprofiler7/bin/linux-x86/libjprofilerti.so

连接端口号为8849。

sh startup.sh && tail -f ../logs/catalina.out

1.jconsole使用

image image

image image

2.java VisualVM

image image

 

image image

image

2.jprofiler使用

linux和window安装jprofiler。

linux下解压。

[root@centos1 opt]# tar -zxvf jprofiler_linux_7_2_3.tar.gz

解压后文件夹为 jprofiler7

window下按照安装步骤安装,输入注册码后使用。

远程连接jvm

image  image

image image

image

打开远程连接

image image

image image

image

posted @ 2015-01-26 11:24  hotarubi  阅读(556)  评论(0编辑  收藏  举报