一、下载
https://www.ej-technologies.com/download/jprofiler/files
二、配置linux端的Jprofiler
1、下载好后把tar包上传的linux服务器,解压。我上传至 /usr/local/src
tar -zxvf jprofiler_linux_11_0_1.tar.gz
2、修改jboss的bin/standalone.sh文件(最后copy一份出来,命名standalone-jprofiler.sh,以便分情况启动)
在JAVA_OPTS后边追加如下语句, jprofiler的安装路径和端口,我配的端口是10001, 【netstat -ant | grep 10001】检查端口是否被使用了,另外,我是64位的, X86_64系统:
JAVA_OPTS="$PREPEND_JAVA_OPTS $JAVA_OPTS -agentpath:/usr/local/src/jprofiler11.0.1/bin/linux-x64/libjprofilerti.so=port=10001"
3. 重启jboss,ps -ef | grep jboss, kill -9 pid, nohup ./standalone.sh & (配合下图中(三、-最后一步 session startup)使用
三、配置Windows端的Jprofiler
1. 默认安装即可
2. 安装好后。弹出界面
“Cancel”后,开始配置了:
配置远程Linux jprofiler安装目录
端口
session startup
远程服务器:
nohup ./standalone.sh & 启动jboss,
tailf nohup.out
在log中,可以看到:
JProfiler> JVMTI version 1.1 detected.
JProfiler> Java 8 detected.
JProfiler> 64-bit library
JProfiler> Listening on port: 10001.
JProfiler> Enabling native methods instrumentation.
JProfiler> Can retransform classes.
JProfiler> Can retransform any class.
JProfiler> Native library initialized
JProfiler> VM initialized
JProfiler> Waiting for a connection from the JProfiler GUI ...
JProfiler> Using instrumentation
JProfiler> Time measurement: elapsed time
JProfiler> CPU profiling enabled
[0m12:10:14,088 INFO [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
[0m[0m12:10:14,366 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
“OK”后
来源:https://blog.csdn.net/yujianping_123/article/details/100972121