jprofiler安装和配置

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

注意:安装前先用rpm -q jprofiler查询linux上是否已安装jprofiler

1.到官网下载linux安装包,如:jprofiler_linux_7_1_1.rpm

2.上传该安装包到linxu服务器上/opt目录下,重命名: mv jprofiler_linux_7_1_1.rpm jprofiler7.rmp

(重命名步骤为可选操作,是为了安装时能生成简单的文件目录 jprofiler7)

3.安装: rpm -ivh jprofiler_linux_7_1_1.rpm

4.安装完毕后,在etc/profile中添加:

#Jprofiler Conf
  JPROFILER_HOME=/opt/jprofiler7/bin/linux-x64
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JPROFILER_HOME

5.以tomcat服务为例,在catalina.sh中添加:
  #Jprofiler Conf
  JAVA_OPTS="$JAVA_OPTS -agentlib:jprofilerti=port=8849-Xbootclasspath/a:/opt/jprofiler7/bin/agent.jar"

6.在startup.sh中添加:

#Jprofiler Conf
  CATALINA_OPTS="-agentpath:/opt/jprofiler7/bin/linux-x64/libjprofilerti.so=port=8849,nowait$CATALINA_OPTS"
export CATALINA_OPTS

1.测试环境
服务器:RedHat Linux 3.4.3-9.EL4(内核版本 2.6.9-5.EL),Tomcat5.5.20,Sun JDK 1.5.0_09,JProfiler 4.3.2 for linux(安装包:jprofiler_linux_4_3_2.sh) 
客户端:Windows XP,JProfiler 4.3.2 for windows(安装包:jprofiler_windows_4_3_2.exe)

2.JProfiler软件下载地址 http://www.ej-technologies.com/

3.客户端 JProfiler 安装 略

4.服务器端 JProfiler 安装: 
把 jprofiler_linux_4.3.2.sh 上传到到服务器,假设路径为 /opt/jprofiler

# cd /opt/jprofiler
# chmod +x *.sh 
# ./jprofiler_linux_4.3.2.sh -c
按照提示来安装,提示都很简单,不在多说。安装路径选择 /opt/jprofiler4

注意,这里的 -c 意思是用字符方式来安装,如果机器上没有 X 则加上该参数.

5.客户端连接配置
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 
9). 这里会列出需要在服务器端做的配置:

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 remote 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 will be created that connects to a running instance of the remote application that is started with the modified start command.


6.服务器端的配置
(1)修改系统环境配置文件 /etc/profile ,增加

JPROFILER_HOME=/opt/jprofiler4/bin/linux-x86
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JPROFILER_HOME

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

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 will 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.启动客户端软件
   点击jprofiler菜单 session>start center>Open Session
   Available session configurations中列出了刚才配置的连接,选中使用就OK了!!

9.The log of tomcat which is $CATALINA_HOME/logs/catalina.out will 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.当中断JProfiler连接时
   The log of tomcat which is $CATALINA_HOME/logs/catalina.out will show:

JProfiler> Disconnected. Waiting for reconnection.
 JProfiler> Listening on port: 8849.

时间: 2024-08-04 00:20:13

jprofiler安装和配置的相关文章

Windows下MySQL下载安装、配置与使用

用过MySQL之后,不论容量的话,发现比其他两个(sql server .oracle)好用的多,一下子就喜欢上了.下面给那些还不知道怎么弄的童鞋们写下具体的方法步骤. (我这个写得有点太详细了,甚至有些繁琐,有很多步骤在其他的教程文档里都是省略掉的,但我还是要写出来,因为我当时走了很多弯路,我希望你们能够避免我走的这些弯路.当然,知道同学的可以略过,选择你想知道的地方看) 第一大步:下载.(不需要注册也可以下载,直接点下面的no thanks) a.俗话说:“巧妇难为无米之炊”嘛!我这里用的是

Centos 7.3下 Linux For SQL Server安装及配置介绍

Centos 7.3下Linux For SQL Server安装及配置介绍 说到SQL Server服务,我们大家都知道是Microsoft公司的数据库服务,当然说到数据库,现在主要分为三大商:1:Oracle.2:Msql Server.3:Mysql:三种数据库在当下环境受到不了不同程度的关注:比如oracle主要应用到大型的商业比较多,比如银行:SQL Server主要在常见的互联网公司使用:mysql主要应用于小型的企业或者服务商使用:当然从费用上来说,Oracle是最贵的,也是最为稳

redis的单机安装与配置以及生产环境启动方案

简单介绍一下redis的单机安装与配置,方便自己记录安装步骤的同时方便他人获取知识. 首先,从官网下载最新版的(稳定版)的redis安装包.官网地址如下:https://redis.io/download 下载源码包后,redis需要编译安装.需要安装gcc和tcl,gcc用于编译tcl用于测试. 使用命令安装gcc,yum install gcc,一路选择yes,gcc就可以安装成功. 接下来安装tcl,首先获取tcl源码包(见百度云盘)或者使用命令:wget http://downloads

Tomcat安装与配置

进行Tomcat的安装与配置,得要jdk的支持,jdk的安装与配置就不说了,毕竟学Java第一步就是这个,所以以下步骤是已有jdk的情况下进行的 首先进入Tomcat的官网http://tomcat.apache.org/,会出现左侧Download一栏,选择自己需要的Tomcat版本,这里我选择的是Tomcat 7 点击进入后到达如下界面,选择自己所对应的系统下载对应的zip包(个人感觉下载zip包简介一点,当然也可以下载可执行文件) 注意下载到哪个地方,下载完成后得到压缩包 对此压缩包进行解

MongoDB 3.2 在CentOS 上的安装和配置

MongoDB 3.2 在CentOS 上的安装和配置 2016-01-06 14:41:41 发布 您的评价:       0.0   收藏     0收藏 一.安装 编辑/etc/yum.repos.d/mongodb-org-3.2.repo [mongodb-org-3.2] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/ gpg

Keepalived安装与配置

一.简介 Keepalived是一个免费开源的,用C编写的类似于layer3, 4 & 7交换机制软件,具备我们平时说的第3层.第4层和第7层交换机的功能.主要提供loadbalancing(负载均衡)和 high-availability(高可用)功能,负载均衡实现需要依赖Linux的虚拟服务内核模块(ipvs),而高可用是通过VRRP协议实现多台机器之间的故障转移服务. 上图是Keepalived的功能体系结构,大致分两层:用户空间(user space)和内核空间(kernel space

Linux下Nagios的安装与配置[转]

一.Nagios简介 Nagios是一款开源的电脑系统和网络监视工具,能有效监控Windows.Linux和Unix的主机状态,交换机路由器等网络设置,打印机等.在系统或服务状态异常时发出邮件或短信报警第一时间通知网站运维人员,在状态恢复后发出正常的邮件或短信通知. Nagios原名为NetSaint,由Ethan Galstad开发并维护至今.NAGIOS是一个缩写形式: "Nagios Ain't Gonna Insist On Sainthood" Sainthood 翻译为圣徒

烂泥:redis3.2.3安装与配置

本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 前一段时间写过一篇codis集群的文章,写那篇文章主要是因为当时的项目不支持redis自身集群的功能. 而现在最新的项目是需要redis集群的,这篇文章我们就来介绍下有关redis的安装与配置. 一.redis源码安装 截至到2016.8.11,redis最新稳定版本为3.2.3.本篇文章我们就以此版本为基础,进行相关的讲解. 下载redis源码,并进行相关操作,如下: wget ht

部署FIM 2010 R2——6安装和配置PCNS

部署FIM 2010 R2--6安装和配置PCNS 在所有域控安装安装PCNS 1. 如果第一次安装PSNS需要扩展构架,如果之前安装过PCNS,略过此步骤,扩展构建需要在CMD进入PCNS安装目录中运行"Password Change Notification Service.msi" SCHEMAONLY=TRUE 下载PCNS安装包,首先在每台DC上扩展架构, msiexec /i "C:\Users\Administrator\Desktop\Password Cha