使用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

使用JProfiler分析定位java内存泄露memory leak的更多相关文章

  1. SQL Server 内存泄露(memory leak)——游标导致的内存问题

    原文:SQL Server 内存泄露(memory leak)--游标导致的内存问题 转自:http://blogs.msdn.com/b/apgcdsd/archive/2011/07/01/sql ...

  2. 内存溢出(Oom)和内存泄露(Memory leak)

    1.概念 内存溢出(Oom):1.内存不够用:2.数据长度短的数据类型存储了一个数据长度较大的数据类型:3.一个结果 内存泄露(Memory leak):1.忘记释放已用内存,内存管理较为常见的现象: ...

  3. 利用linux的mtrace命令定位内存泄露(Memory Leak)

    一谈到内存泄露, 多数程序猿都闻之色变. 没错, 内存泄露非常easy引入. 但非常难定位.  以你我的手机为例(如果不常常关机). 如果每天泄露一些内存, 那么開始的一个星期, 你会发现手机好好的. ...

  4. Java 基础 - 内存泄露Memory leak & 内存溢出Out of memory

    内存泄露 & 内存溢出 关系 https://www.cnblogs.com/panxuejun/p/5883044.html 内存泄露的6种情况: https://blog.csdn.net ...

  5. 内存溢出(Memory Overflow)和内存泄露(Memory Leak)的区别

    内存泄漏指你用malloc或new申请了一块内存,但是没有通过free或delete将内存释放,导致这块内存一直处于占用状态 内存溢出指你申请了10个字节的空间,但是你在这个空间写入11或以上字节的数 ...

  6. python内存泄露memory leak排查记录

    问题描述 A服务,是一个检测MGR集群主节点是否发生变化的服务,使用python语言实现的. 针对每个集群,主线程会创建一个子线程,并由子线程去检测.子线程会频繁的创建和销毁. 上线以后,由于经常会有 ...

  7. 内存泄露 memory leak 的原因

    #include <iostream> using namespace std; void foo() { MyClass *x; x = new MyClass(); //指向的丢失了 ...

  8. Android 内存管理 &Memory Leak & OOM 分析

    转载博客:http://blog.csdn.net/vshuang/article/details/39647167 1.Android 进程管理&内存 Android主要应用在嵌入式设备当中 ...

  9. java内存泄露与内存溢出

    内存溢出 out of memory,是指程序在申请内存时,没有足够的内存空间供其使用,出现out of memory: 内存泄露 memory leak,是指程序在申请内存后,无法释放已申请的内存空 ...

随机推荐

  1. 洛谷 P1503 鬼子进村 解题报告

    P1503 鬼子进村 题目背景 小卡正在新家的客厅中看电视.电视里正在播放放了千八百次依旧重播的<亮剑>,剧中李云龙带领的独立团在一个县城遇到了一个鬼子小队,于是独立团与鬼子展开游击战. ...

  2. 虚拟机——mnt_hgfs下无目录情况解决

    /mnt/hgfs下无目录情况解决: VMware8虚拟机安装Ubuntu 11.10使用share folders共享目录将虚拟机掉电关闭(不能暂停),设置share folders目录,重启虚拟机 ...

  3. c语言数组传递

    转自:http://blog.csdn.net/xgmiao/article/details/9570825 点击打开链接 数组作为函数实参: C语言中数组作为函数实参时,编译器总是将其解析为指向数组 ...

  4. Linux命令之time

    我使用过的Linux命令之time - 测定一个命令的资源使用情况 本文链接:http://codingstandards.iteye.com/blog/798788   (转载请注明出处) 用途说明 ...

  5. package-lock.json 文件的作用

    npm5之后安装文件之后会多出一个package-lock.json的文件,它的作用是: 1. 安装之后锁定包的版本,手动更改package.json文件安装将不会更新包,想要更新只能使用 npm i ...

  6. 让Vs2010支持 Css3+HTML5

    第一步. 先到微软官方下载一个 Microsoft Visual Studio 2010 sp1 . 给传送门:.microsoft.com/downloads/zh-cn/details.aspx? ...

  7. webservice soapheader验证方法

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...

  8. Spinner用法与ListView用法

    参考: http://blog.csdn.net/u012960536/article/details/46732421 --------------------------------------- ...

  9. nginx 根据POST GET方法跳转

    location ~ /server/ {    proxy_pass_header   Server;    proxy_set_header Host $http_host;    proxy_r ...

  10. python2 登录带验证码的页面

    #!/usr/bin/python#-*- coding: utf-8 -*- import os,json;import urllib,urllib2;import cookielib; #获取co ...