Jprofiler Installation and Configuration

Source: Internet
Author: User
Tags jprofiler

Ext.: http://www.cnblogs.com/adolfmc/archive/2013/06/09/3129358.html

Note: Use Rpm-q Jprofiler to find out if Jprofiler 1 is installed on Linux before installing. Download the Linux installation package to the official website, such as: JPROFILER_LINUX_7_1_1.RPM2. Upload the installation package to the LINXU server/ Opt directory, rename: MV jprofiler_linux_7_1_1.rpm jprofiler7.rmp (The rename step is optional, is for installation to generate a simple file directory Jprofiler7) 3. Installation: RPM-IVH Jprofiler_linux_7_1_1.rpm4. After the installation is complete, add the following in the Etc/profile: #Jprofiler Conf
Jprofiler_home=/opt/jprofiler7/bin/linux-x64
Export ld_library_path= $LD _library_path: $JPROFILER _home5. In the case of the Tomcat service, add the following in catalina.sh:
#Jprofiler Conf
java_opts= "$JAVA _opts-agentlib:jprofilerti=port=8849-xbootclasspath/a:/opt/jprofiler7/bin/agent.jar" 6. Added in startup.sh: #Jprofiler Conf
Catalina_opts= "-agentpath:/opt/jprofiler7/bin/linux-x64/libjprofilerti.so=port=8849,nowait$catalina_opts"
Export catalina_opts

1. Test environment
Server: RedHat Linux 3.4.3-9.el4 (kernel version 2.6.9-5.el), Tomcat5.5.20,sun JDK 1.5.0_09,jprofiler 4.3.2 for Linux (installation package: Jprofiler_ linux_4_3_2.sh)
Client: Windows Xp,jprofiler 4.3.2 for Windows (Installation package: Jprofiler_windows_4_3_2.exe)

2.JProfiler Software http://www.ej-technologies.com/

3. Client Jprofiler installed slightly

4. Server-side Jprofiler installation:
Upload the jprofiler_linux_4.3.2.sh to the server, assuming the path is/opt/jprofiler

# Cd/opt/jprofiler
# chmod +x *.sh
#./jprofiler_linux_4.3.2.sh-c
Follow the prompts to install, the tips are very simple, not much to say. Installation path Selection/opt/jprofiler4

Note that the-C meaning here is installed in character mode, if there is no X on the machine add this parameter.

5. Client Connection Configuration
1). Run Jprofiler. The first time you open a wizard, ignore it.
2). Select Session->integration wizard->new Remote integratation
3). Select on a remote computer;platform of remote computer select Linux X86/AMD 64;next
4). Enter the server IP; Next
5). Enter the installation path for the Jprofiler on the server, such as/opt/jprofiler4; next
6). Select the server's JDK environment, this is: Sun,1.5.0,hotspot;next
7). Input port: Here is the default value 8849;next
8). Select the startup mode: Here is the first wait for a connection from the Jprofiler Gui;next
9). The configuration that needs to be done on the server side is listed here:

Integration type: [Generic application]
Selected Jvm:sun 1.5.0 (hotspot)
Startup mode:wait for Jprofiler GUI

(1) Please insert

-agentlib:jprofilerti=port=8849-xbootclasspath/a:/opt/jprofiler4/bin/agent.jar

Into the start command of your remotes application right after the Java command.

(2) Please add

/opt/jprofiler4/bin/linux-x86

To the environment variable Ld_library_path.

A remote session named remote application on 192.168.40.15 would be is created that connects to a running instance of the Remo TE application that's started with the modified Start command.


6. Server-side configuration
(1) Modify the system environment configuration file/etc/profile, increase

Jprofiler_home=/opt/jprofiler4/bin/linux-x86
Export ld_library_path= $LD _library_path: $JPROFILER _home


(2) Modify Tomcat boot file catalina.sh, add-agentlib:jprofilerti=port=8849-xbootclasspath/a:/opt/jprofiler4/bin/agent.jar Content into the catalina_opts;
"-agentlib:jprofilerti=port=8849-xbootclasspath/a:/opt/jprofiler4/bin/agent.jar" This content is generated by the client software

catalina_opts= "$CATALINA _opts-xms128m-xmx128m $JPDA _opts-agentlib:jprofilerti=port=8849-xbootclasspath/a:/opt/ Jprofiler4/bin/agent.jar "


7.Reboot Linux and startup Tomcat using Startup.sh;
The log of Tomcat which is $CATALINA _home/logs/catalina.out'll show:

jprofiler> Protocol Version 23
Jprofiler> Using JVMTI
Jprofiler> 32-bit Library
Jprofiler> Listening on port:8849.
Jprofiler> Native Library initialized
Jprofiler> waiting for a connection from the Jprofiler GUI

8. Start the Client software
Click Jprofiler Menu Session>start center>open session
Available session configurations is listed in the connection just configured, check the use of OK!!

9.The log of Tomcat which is $CATALINA _home/logs/catalina.out'll show:

jprofiler> Using Dynamic Instrumentation
Jprofiler> Time measurement:elapsed Time
Jprofiler> CPU Profiling Enabled
jprofiler> Hotspot Compiler enabled
Jprofiler> starting Org/apache/catalina/startup/bootstrap

10. When the Jprofiler connection is interrupted
The log of Tomcat which is $CATALINA _home/logs/catalina.out'll show:

Jprofiler> disconnected. Waiting for reconnection.
Jprofiler> Listening on port:8849.

Jprofiler Installation and Configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.