性能监控工具YourKit
1.下载YourKit(在不同系统或终端下请保持版本一致)
http://www.yourkit.com/java/profiler/index.jsp
2. 解压Linux的YourKit
tar xfj <archive name>.tar.bz2
3.增加 -agentpath:<full agent library path> VM 选项到java 命令行启动参数。(默认端口10001)
不同系统的代理库如下:
Windows, 32-bit Java | -agentpath:<profiler directory>\bin\win32\yjpagent.dll |
Windows, 64-bit Java | -agentpath:<profiler directory>\bin\win64\yjpagent.dll |
Mac OS X | -agentpath:<profiler directory>/bin/mac/libyjpagent.jnilib |
Linux x86, 32-bit Java | -agentpath:<profiler directory>/bin/linux-x86-32/libyjpagent.so |
Linux x86, 64-bit Java | -agentpath:<profiler directory>/bin/linux-x86-64/libyjpagent.so |
Solaris SPARC, 32-bit Java | -agentpath:<profiler directory>/bin/solaris-sparc-32/libyjpagent.so |
Solaris SPARC, 64-bit Java | -agentpath:<profiler directory>/bin/solaris-sparc-64/libyjpagent.so |
Solaris x86, 32-bit Java | -agentpath:<profiler directory>/bin/solaris-x86-32/libyjpagent.so |
Solaris x86, 64-bit Java | -agentpath:<profiler directory>/bin/solaris-x86-64/libyjpagent.so |
HP-UX IA64, 32-bit Java | -agentpath:<profiler directory>/bin/hpux-ia64-32/libyjpagent.so |
HP-UX IA64, 64-bit Java | -agentpath:<profiler directory>/bin/hpux-ia64-64/libyjpagent.so |
4.启动YourKit
YourKit_Home/bin/yjp.sh
5.点击connect to remote application,输入ip和端口(默认10001)