jprofiler安装和配置
转:http://www.cnblogs.com/adolfmc/archive/2013/06/09/3129358.html
JPROFILER_HOME=/opt/jprofiler7/bin/linux-x64
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JPROFILER_HOME
#Jprofiler Conf
JAVA_OPTS="$JAVA_OPTS -agentlib:jprofilerti=port=8849-Xbootclasspath/a:/opt/jprofiler7/bin/agent.jar"
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). 这里会列出需要在服务器端做的配置:
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 ,增加
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 ” 此内容由客户端软件生成
7.Reboot Linux and startup Tomcat using startup.sh;
The log of tomcat which is $CATALINA_HOME/logs/catalina.out will show:
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> 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> Listening on port: 8849.
jprofiler安装和配置的更多相关文章
- jprofiler安装图解
环境: 1.sun jdk1.6.0 2.jprofiler_windows_6_0_2.exe 安装 1. jdk, 安装略... 2. jprofiler安装 一路next 到Enter lice ...
- jprofiler安装图解及破解码
原文:http://blog.csdn.net/lifuxiangcaohui/article/details/38677889 环境: 1.sun jdk1.6.0 2.jprofiler_wind ...
- jprofiler安装图解 ( 7_1 )
环境: 1.sun jdk1.6.0 2.jprofiler_windows_6_0_2.exe 安装 1. jdk, 安装略... 2. jprofiler安装 一路next 到Enter lice ...
- JDK安装与配置
JDK安装与配置 一.下载 JDK是ORACLE提供免费下载使用的,官网地址:https://www.oracle.com/index.html 一般选择Java SE版本即可,企业版的选择Java ...
- Node.js 教程 01 - 简介、安装及配置
系列目录: Node.js 教程 01 - 简介.安装及配置 Node.js 教程 02 - 经典的Hello World Node.js 教程 03 - 创建HTTP服务器 Node.js 教程 0 ...
- 烂泥:redis3.2.3安装与配置
本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 前一段时间写过一篇codis集群的文章,写那篇文章主要是因为当时的项目不支持redis自 ...
- mysql源码包手动安装、配置以及测试(亲测可行)
笔记编者:小波/qq463431476博客首页:http://www.cnblogs.com/xiaobo-Linux/ 记下这篇mysql笔记,望日后有用! redhat6采用centos yum源 ...
- 环境搭建系列-系统安装之centos 6.5安装与配置
按照国际惯例,系列目录先奉上: 系列一:系统安装之centos 6.5安装与配置 系列二:准备工作之Java环境安装 系列三:数据为先之MySQL读写集群搭建 系列四:谈分布式之RabbitMQ集群搭 ...
- ZooKeeper安装与配置
一. 单机安装.配置: 1. 下载zookeeper二进制安装包下载地址:http://apache.dataguru.cn/zookeeper/zookeeper-3.4.3/zookeeper-3 ...
随机推荐
- 【转】vim文件编码和乱码处理
原文网址:http://edyfox.codecarver.org/html/vim_fileencodings_detection.html 在 Vim 中,有四个与编码有关的选项,它们是:file ...
- Linux服务器挂死案例分析
问题现象: 在linux服务器上运行一个指定的脚本时,就会出现无数个相同进程的,而且不停的产生,杀也杀不掉,最后系统就陷入死循环,无法登陆,只能人工去按机器的电源键才可以.这够崩溃的吧? 问题分析过程 ...
- Increasing/ Decreasing Stack
对于此类问题: 对于元素nums[i],找出往左/右走第一个比它小/大的数字 我们常常用递增栈/递减栈实现. 递增栈实现第一个比它小 递减栈实现第一个比它大 Example: 2 1 5 6 2 3 ...
- Java宝典(三)
--说说ArrayList,Vector,LinkedList的存储性能和特性. --ArrayList和Vector都是使用数组方式存储数据,此数组元素数大于实际存储的数据以便增加和插入元素,他们都 ...
- OpenStack术语名词及问题调试
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnoAAAEkCAIAAAA3pAtBAAAgAElEQVR4nOy953tUx7o9uCrt2EmtHB
- php用apc实现的临界区 解决并发,资源互斥同步访问
在面对线程或进程的互斥同步的控制问题时,常用的解决办法是:临界区,互斥锁,信号量 临界区保证在某一时刻只有一个线程能够访问到所需资源的方法. 任何时候,只能至多有一个线程处于临界区中.如果多个线程要求 ...
- 基础总结篇之四:Service完全解析
富貴必從勤苦得,男兒須讀五車書.唐.杜甫<柏學士茅屋> 作为程序员的我们,须知富贵是要通过勤苦努力才能得到的,要想在行业内有所建树,就必须刻苦学习和钻研. 今天我们来讲一下Android中 ...
- Android OpenGL库加载过程源码分析
Android系统采用OpenGL绘制3D图形,使用skia来绘制二维图形:OpenGL源码位于: frameworks/native/opengl frameworks/base/opengl 本文 ...
- 多线程程序 怎样查看每个线程的cpu占用
可以用下面的命令将 cpu 占用率高的线程找出来: ps H -eo user,pid,ppid,tid,time,%cpu,cmd --sort=%cpu 这个命令首先指定参数'H',显示线程相关的 ...
- 【算法】插入排序 insertion_sort
准备写个<STL 源代码剖析>的读书笔记,开个专栏.名为<STL 的实现>,将源代码整理一遍.非常喜欢侯捷先生写在封底的八个字:天下大事.必作于细.他在书中写到:"我 ...