我试图按以下方式对JBoss进行分析:
-agentpath:C:\Progra~1\jprofiler8\bin\windows-x64\jprofilerti.dll添加到standalone.bat。请注意,没有指定nowait,因此VM将等待JProfiler GUI连接。standalone.bat问题是,无论我做什么,“快速附加”窗口都看不到JBoss JVM。
下面是显示JBoss已准备就绪的JProfiler标准输出:
Calling "C:\src\ss-master\middle\runtime\jboss-as-7.1.1.Final\bin\standalone.conf.bat"
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: C:\src\ss-master\middle\runtime\jboss-as-7.1.1.Final
JAVA: C:\tools\java\bin\java
JAVA_OPTS: -XX:+TieredCompilation -agentpath:C:\Progra~1\jprofiler8\bin\windows-x64\jprofilerti.dll -Dprogram.name=standalone_jprofiler.bat -Xms256m -Xmx8192m -XX:NewRatio=6 -XX:
PermSize=128m -XX:MaxPermSize=256m -Xss512K -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.war
ning=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.server.default.config=standalone.xml -Dorg.jboss.server.bootstrap.maxThreads=8 -agentlib:jdwp=transport=dt_socket,se
rver=y,suspend=n,address=5001
===============================================================================
JProfiler> Protocol version 41
JProfiler> Using JVMTI
JProfiler> JVMTI version 1.1 detected.
JProfiler> 64-bit library
JProfiler> Listening on port: 8849.
JProfiler> Instrumenting native methods.
JProfiler> Can retransform classes.
JProfiler> Can retransform any class.
JProfiler> Native library initialized
JProfiler> VM initialized
JProfiler> Waiting for a connection from the JProfiler GUI ...以下是我尝试过的一些事情:
nowait,连接是成功的(即使是从IDEA)。nowait,我只能从JProfiler GUI中预定义的会话连接。在此之后,我也可以从观念上联系起来。最后一点最耐人寻味。保存的会话有哪些其他信息使它能够检测“等待”的JProfiler代理?
下面是我的用例的约束条件:
nowait。发布于 2015-05-19 05:41:24
当分析代理在启动时等待连接时,附加机制无法工作,因为启用附加的jvmstat系统尚未加载。事实上,还没有加载任何Java类,所以在这个阶段不需要任何Java代码。
要分析这样一个等待的VM,您需要一个远程分析会话。在JProfiler 8中,IDE集成不支持这一点。
这在JProfiler 9.0中是可能的(不久将发布)。附加对话框将有两种模式,本地模式列出所有本地运行的VM和一个远程附加选项,您可以在其中输入主机名和端口。
但是,您也可以直接从IDEA中分析JBoss运行配置。然后,您不必修改开始脚本。
https://stackoverflow.com/questions/30313904
复制相似问题