日期:2014-05-16  浏览次数:20595 次

JProfiler 在linux下安装

1. 修改系统环境配置文件 /etc/profile ,增加
JPROFILE_HOME=/opt/jprofiler6/bin/jprofiler
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JPROFILE_HOME/bin/linux-x64
export JPROFILE_HOME
export LD_LIBRARY_PATH



运行source /etc/profile使之生效



2.修改TOMCAT启动文件catalina.sh,添加-agentlib:jprofilerti=port=8849? -Xbootclasspath/a:/opt/jprofiler4/bin/agent.jar 内容到CATALINA_OPTS中;
“-agentlib:jprofilerti=port=8849? -Xbootclasspath/a:/opt/jprofiler6/bin/agent.jar ” 此内容由客户端软件生成

CATALINA_OPTS="$CATALINA_OPTS -Xms128m -Xmx128m $JPDA_OPTS -agentlib:jprofilerti=port=8849? -Xbootclasspath/a:/opt/jprofiler6/bin/agent.jar"



客户端连接配置
1). 运行 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

?