美文网首页
java性能分析工具--yourkit的配置

java性能分析工具--yourkit的配置

作者: 985cf3d148b0 | 来源:发表于2016-05-31 10:15 被阅读2594次

    破解有效证书:YEVALFLK6E179CK4OLKCO7

    当然,你也可以下载破解机,参考如下:

    破解教程

    此工具可以分别在本地和远程进行监控具体教程如下:

    本地性能测试

    1.首先需要在eclipse上安装yourkit插件,否则,yourkit平台将提示错误:无法连接没有编译的Application,教程如下:

    配置eclipse插件

    远程性能测试

    1.下载

    在yourkit官网下载,yjp-2016.02-b36-linux.tar.bz2,通过ftp工具上传服务器上

    2.配置

    解压:tar  xfj  yjp-2016.02-b36-linux.tar.bz2

    cd yjp-2016.02

    #生成启动脚本

    java -jar lib/yjp.jar -integrate

    配置:

    Choose server to integrate with:1) Geronimo2) GlassFish3) JBoss4) Jetty5) JRun 46) Resin 3.1/47) Tomcat 3/4/5/6/7/88) WebLogic 9 and newer9) WebSphere Application Server 7 or newer10) WebSphere Application Server V8.5 Liberty profile11) Generic server (use if your server is not on the list)Enter number which corresponds to your server (0 to exit) and press Enter:>7Please specify whether the server runs on a 32-bit JVM or a 64-bit JVM.Hint: If you are not sure what to choose, choose "32-bit JVM". If with this choice the server does not start with profiling, re-run the integration and choose "64-bit Java" option.1) 32-bit JVM2) 64-bit JVM>2Tomcat startup script (/bin/startup.sh):

    >/home/ubuntu/web/apache-tomcat-7.0.69/bin/startup.sh

    Startup options configuration: step 1 of 5

    Should option 'disablestacktelemetry' be specified?

    1) Yes (recommended to minimize profiling overhead in production)

    2) No

    >1

    Startup options configuration: step 2 of 5

    Should option 'disableexceptiontelemetry' be specified?

    1) Yes (recommended to minimize profiling overhead in production)

    2) No

    >1

    Startup options configuration: step 3 of 5

    Built-in probes:

    1) Enabled: recommended for use in DEVELOPMENT; gives high level profiling results, but may add overhead

    2) Disabled: recommended for use in PRODUCTION to minimise overhead, or for troubleshooting

    Hint: It's recommended to choose #1 in development and #2 in production.

    If choosing #1 makes profiling overhead big or there are startup issues, re-run the integration and choose #2.

    >1

    Startup options configuration: step 4 of 5

    Should option 'delay=10000' be specified?

    1) Yes (recommended)

    2) No

    >1

    Startup options configuration: step 5 of 5

    Please specify comma-separated list of additional startup options, or press Enter for no additional options:

    >/home/ubuntu/web/apache-tomcat-7.0.69/bin/startup.sh

    ******* WARNING! *******

    Invalid option: /home/ubuntu/web/apache-tomcat-7.0.69/bin/startup.sh

    There are invalid option(s) specified.

    1) Re-enter the options (recommended)

    2) Ignore and continue (profiled application may not start)

    >

    Not a number. Please re-enter.

    >2^H1

    Not a number. Please re-enter.

    >1

    Startup options configuration: step 5 of 5

    Please specify comma-separated list of additional startup options, or press Enter for no additional options:

    >

    Startup script to be used for profiling has been successfully created:

    /home/ubuntu/web/apache-tomcat-7.0.69/bin/startup_with_yjp.sh

    3.分配连接端口

    根据以下命令进行分配端口:

    [ubuntu@VM-80-63-ubuntu~/yjp-2016.02]$cd bin

    [ubuntu@VM-80-63-ubuntu~/yjp-2016.02/bin]$ssh yjp.sh -attach

    [YourKit Java Profiler 2016.02-b36] Log file: /home/ubuntu/.yjp/log/yjp-9467.log

    Running JVMs:

    Name                            |  PID| Status

    -------------------------------- |------|--------------------------------

    Tomcat                          |  6748| Ready for attach

    yjp                              |  9119| Ready for attach

    Enter PID of the application you want to attach (0 to exit) and press Enter:

    >6748

    Please specify comma-separated list of startup options, or press Enter for default options (recommended):

    >

    Attaching to process 6748 using options

    The profiler agent has attached. Waiting while it initializes...

    The agent is loaded and is listening on port 10001.

    You can connect to it from the profiler UI.

    搞定!!!在yourkit客户端上面输入ip:port就可以启动远程监控平台啦!!!

    如:145.22.33.44:10001

    参考:

    YourKit Java Profiler 剖析远程服务器

    java 性能监控软件 yourkit 远程监控方法

    相关文章

      网友评论

          本文标题:java性能分析工具--yourkit的配置

          本文链接:https://www.haomeiwen.com/subject/utmcdttx.html