1.下载软件
官网地址:http://www.ej-technologies.com/download/jprofiler/files ,一个linux服务端,一个windows客户端 GUI界面
2.安装
1、下载好后把tar包上传的linux服务器,解压。
tar -zxvf file.tar.gz
2、修改tomcat的bin/catalina.sh文件,在原有基础上加上-agentpath:/root/jprofiler9/bin/linux-x64/libjprofilerti.so=port=8849,nowait和export CATALINA_OPTS
我用的是xftp下载下来修改再覆盖,用命令修改的话,最后要使之生效才可以
CATALINA_OPTS="-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9090 -agentpath:/root/jprofiler9/bin/linux-x64/libjprofilerti.so=port=8849,nowait"
export CATALINA_OPTS
jprofiler的安装路径和端口,我配的端口是8849,这个是Jprofile默认端口
3、再重启tomcat ./startup.sh
查看8849端口是否启动成功了。
第三步、安装windows jprofiler客户端和建立远程连接
1、安装好windows jprofiler软件
2、连接linux监控运行状态
点击
选择远程连接
选择jdk的版本
连接的地址
jprofiler在Linux上安装的路径
后边就是再填端口,我的是8849,然后就点完成。
点击start center可以看到自己配的
然后选中,点击start的界面就是这样的
好,到此完成。