`
isiqi
  • 浏览: 16028939 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

jprofiler监控远程服务器的安装配置

阅读更多

1) 客户端安装
客户端 xp,jprofiler 5.1.4
可采用两种方式安装

1.1)需要dll和注册码配合,仅适于windows
http://luanma.iteye.com/blog/183827

1.2)仅需注册码,适合windows和linux
http://serendipityspaces.spaces.live.com/blog/cns!71616649A887E6A!604.entry

我试过下面的注册码
L-Larry_Lau@163.com#83192-56yozpwn6v3n#174
这个Ok

2) 客户端配置远程session
按照安装界面的步骤就可以了,有一点需要注意
在配置“choose startup mode”的时候,
有两种
a) waiting for a connection from Jprofiler GUI
b) Don't wait, startup immediately

我起初选择a),但是在服务器端遇到问题,我不知道如何输入服务端的注册码,我也尝试在服务器通过界面输入,但无效,我认为刚提到的那种做法是把服务器当客户端来用
我觉得可能有两种类型的注册码,服务器端的注册码和客户端的注册码
我后来选择b),b提供了一种在服务器端输入注册码的方式,看后面你就知道了

另外我在配置“config syncronization”
我选择了Manual synchroization

设置完成后,有如下信息:




3) 服务器端安装
wget http://download.ej-technologies.com/jprofiler/jprofiler_linux_5_1_4.tar.gz
tar xzvf jprofiler_linux_5_1_4.tar.gz
无须安装,解压好就结束

4)服务器端配置

4.1)拷贝config.xml
按照上文中的说明:
C:\Documents and Settings\Administrator\.jprofiler5\config.xml must be copied manually to /home/pwlazy/dev/jprofiler5 on the remote computer
于是把客户端C:\Documents and Settings\Administrator\.jprofiler5\config.xml拷贝到服务器jprofile的安装目录下


4.2)修改服务器启动脚本
按照上文所说的
我在jboss的启动脚本中加入下面一段




注意:一定要参考你配置客户端完成后的说明因为我上文中的说明中的有些路径和你的机器应该有些差别

5)启动服务器
此时启动
出错:

JProfiler> Using dynamic instrumentation
JProfiler> Time measurement: elapsed time
JProfiler> CPU profiling enabled
JProfiler> ERROR: Invalid license key. Aborting.

原来key无效

正如我上面提到的,我需要输入服务端的注册码
在刚才拷过来的config.xml中找到<licenseKey name="pwlazy" company="ali" key="L-FLN#44240-p0dthf1gxzng4#216" />
输入key:L-Larry_Lau@163.com#83192-56yozpwn6v3n#174

因为config.xml是客户端生成的,由于客户端我采用了本文提到的第一种客户端的安装方式,仅适合windows,所以linux认为无效,
如果一开始我就采用第二种仅需输入验证码的安装方式,服务端就不会报错了

话题扯到“startup mode”的选择,第二种启动方式的脚本多了个选项config=/home/pwlazy/dev/jprofiler5/config.xml,
config.xml含有注册码,让你知道服务器启动使用的注册码,有问题了也好纠错,
但第一种方式,没有这种选项,也不知道注册码的存放方式,对于注册码无效这种问题,不知如何下手,
或许你会想到在第一种启动方式也可以强项加入这么个选项,但第一种启动方式不会生成config.xml,
如果你把第二种启动方式产生的config.xml用于第一种启动方式,那么意义也不大了

下面看看第一种启动方式和第二种启动方式的差别:
第二种启动方式多了config.xml,另外在服务器启动中了多了一段配置“,nowait,id=104,config=/home/pwlazy/dev/jprofiler5/config.xml”

6) 启动客户端session
此时客户端会连上服务器8849端口,开始profiler吧 !

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics