jprofiler安裝及配置

Jprofiler7官方下載地址: http://www.ej-technologies.com/download/jprofiler/version_72

1.服務器端安裝及配置
1)由於jprofiler工具是監控java服務的,所以服務器端需要有jdk環境。如果沒有,可參照文章:http://blog.csdn.net/rital/article/details/5486021 進行jdk的安裝。安裝後設置jdk的環境變量:
[root@localhost ~]# vi /etc/profile
文件尾部添加以下內容:
unset i
unset pathmunge
export TMOUT=300

export JAVA_HOME=/home/jdk6u22/jdk1.6.0_22
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

2)下載服務器端安裝包:jprofiler_linux_7_2_3.tar.gz ,解壓後會生成jprofiler7的文件夾, 安裝路徑爲:
 [lbs@zjxl-100 jprofiler7]$ pwd
/home/jprofiler/jprofiler7;

3)配置環境變量:
[root@localhost ~]# vi /etc/profile
文件末尾添加以下內容:
#jprofiler conf
export JPROFILER_HOME=/home/jprofiler/jprofiler7/bin/linux-x64
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JPROFILER_HOME

4)例如想監控tomcat,則在catalina.sh文件末尾增加如下內容:
#Jprofiler Conf
  JAVA_OPTS="$JAVA_OPTS -agentlib:jprofilerti=port=8849-Xbootclasspath/a:/home/jprofiler/jprofiler7/bin/agent.jar"
在startup.sh文件末尾增加如下內容:
 #Jprofiler Conf
  CATALINA_OPTS="-agentpath:/home/jprofiler/jprofiler7/bin/linux-x64/libjprofilerti.so=port=8849,nowait$CATALINA_OPTS"

2.客戶端安裝及設置
1). 運行 JProfiler 。第一次打開會有嚮導,忽略它。 
2). 選擇 Session->Integration Wizard->New Remote Integratation 
3). 選擇 On a remote computer;Platform of remote computer 選擇 Linux x86/AMD 64;Next 
4). 選擇服務器的 JDK 環境,這裏是:apple,1.6.0,hotspot;next

5)選擇startup immediately項,next;
6)輸入服務器 IP ;Next 
7). 輸入服務器上的 jprofiler 的安裝路徑,如/home/jprofiler/jprofiler7 ;next 
8).  輸入端口號,默認值 8849;next 
9). 選擇啓動模式:這裏選第一種 wait for a connection from the jprofiler GUI;next 






發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章