使用JProfiler分析定位java内存泄露memory leak
2014-01-08 09:29
836 查看
使用jprofiler远程profile JBoss应用服务器
项目中发现JBoss出现内存泄露, 从2G一直涨到3.5G左右
开始考虑使用jmap dump出内存来, 在用jhap打开浏览器分析。
想到JProfiler可以看类的引用关系, 更容易分析内存泄露, 所以决定使用JProfile。 同时应为JBoss运行在远端的服务器, 所以要使用remote attachment
1) 安装JProfiler. In Windows install jprofiler_windows-x64_8_0_2.exe; in Linux, install jprofiler_linux_8_0_2.rpm.
2) 修改JBoss的/opt/jboss/default/bin/standalone.conf
add VM parameter: -agentpath:/opt/jprofiler8/bin/linux-x64/libjprofilerti.so=port=8849 // 需要Jprofile连接一下, java JVM才会启动。
也可以添加,nowait. 区别是, 加入这个参数后, 就不用jprofile连接一下了。
3) 启动JBoss
4) add ssh port forward using PuTTY
5) 在windows上启动JProfiler来远程连接Linux上的JBoss
Open JProfiler client. -> Start center -> New session tab -> New session button -> select remote -> configure host and port of target jvm -> Start
Start target JVM. it will pause and wait JProfiler to attach it.
In JProfiler client, click Attach and OK
When the evaluation ends, the client still can open but it doesn’t wor
项目中发现JBoss出现内存泄露, 从2G一直涨到3.5G左右
开始考虑使用jmap dump出内存来, 在用jhap打开浏览器分析。
想到JProfiler可以看类的引用关系, 更容易分析内存泄露, 所以决定使用JProfile。 同时应为JBoss运行在远端的服务器, 所以要使用remote attachment
1) 安装JProfiler. In Windows install jprofiler_windows-x64_8_0_2.exe; in Linux, install jprofiler_linux_8_0_2.rpm.
2) 修改JBoss的/opt/jboss/default/bin/standalone.conf
add VM parameter: -agentpath:/opt/jprofiler8/bin/linux-x64/libjprofilerti.so=port=8849 // 需要Jprofile连接一下, java JVM才会启动。
也可以添加,nowait. 区别是, 加入这个参数后, 就不用jprofile连接一下了。
3) 启动JBoss
4) add ssh port forward using PuTTY
5) 在windows上启动JProfiler来远程连接Linux上的JBoss
Open JProfiler client. -> Start center -> New session tab -> New session button -> select remote -> configure host and port of target jvm -> Start
Start target JVM. it will pause and wait JProfiler to attach it.
In JProfiler client, click Attach and OK
When the evaluation ends, the client still can open but it doesn’t wor
相关文章推荐
- Android 性能优化之使用MAT分析内存泄露问题
- 使用Memory Analyzer Tool(MAT)Eclipse插件分析内存泄露
- Android 性能优化之使用MAT分析内存泄露问题
- JAVA简单内存泄露分析及解决
- jprofiler简单安装和使用--用来检测javaweb执行时内存使用情况工具
- Java内存泄露分析,Java弱引用(weakreference)
- Android中使用Handler造成内存泄露的分析和解决
- Java的内存泄露 Memory leak of Java
- Android 性能优化之使用MAT分析内存泄露问题
- Android 性能优化之使用MAT分析内存泄露问题
- 使用MAT分析Java内存
- 深度分析内存泄漏原因,使用MAT工具检测内存泄露和性能
- 利用内存分析工具(Memory Analyzer Tool,MAT)分析java项目内存泄露
- Android中使用Handler造成内存泄露的分析和解决
- Android_使用Android studio分析内存泄露
- 使用Handler容易产生的内存泄露以及介绍下Java的4种引用
- Android中使用Handler造成内存泄露的分析和解决
- 使用Java VisualVM配置Java应用程序/分析CPU或内存的使用情况(转)
- java内存泄露分析
- [Android内存分析] 使用MAT工具做内存泄露分析一