第一、linux系统先安装jprofiler服务端
下载地址:http://download.csdn.net/detail/fanjeff/8962879安装过程,回车或者按Y,一直下一步知道安装完成。vi /etc/profile在最后增加JPROFILER_HOME=/opt/jprofiler8/bin/linux-x64(注意32和64位)export LD_LIBRARY_PATH=$JPROFILER_HOME第二、jprofiler连接tomcat1). 运行 JProfiler 。第一次打开会有向导,忽略它。
2). 选择 Session->Integration Wizard->New Remote Integratation
3). 选择 On a remote computer;Platform of remote computer 选择 Linux x86/AMD 64;Next
4). 输入服务器 IP ;Next
5). 输入服务器上的 jprofiler 的安装路径,如 /opt/jprofiler4 ;next
6). 选择服务器的 JDK 环境,这里是:Sun,1.5.0,hotspot;next
7). 输入端口:这里是默认值 8849;next
8). 选择启动模式:这里选第一种 wait for a connection from the jprofiler GUI;next
9). 这里会列出需要在服务器端做的配置:(1) Please insert -agentlib:jprofilerti=port=8849 -Xbootclasspath/a:/opt/jprofiler4/bin/agent.jar into the start command of your remote application right after the java command. 把中间这句话复制下来。第三、修改tomcat下的catalina.sh把上一步复制的增加到变量JAVA_OPTS中JAVA_OPTS="$JAVA_OPTS -agentpath:/opt/jprofiler8/bin/linux-x64/libjprofilerti.so=port=8849"启动tomcat
Jconsole 监控linux下的tomcat
最新推荐文章于 2021-04-29 05:42:51 发布