简体   繁体   English

maven / visualvm:我如何使用visualvm来描述正在运行的万无一失的过程?

[英]maven/visualvm: how can i use visualvm to profile a running surefire process?

I can attach to the surefire process, but trying to profile it shows for sampling: 我可以附加到万无一失的过程中,但是试图对其进行分析以示抽样:

CPU sampling:
Not available. Failed to create JMX connection to target application. Use 'Add JMX Connection' action to attach to the application.

Memory sampling:
Not available. Failed to read objects in target application. Check the logfile for details (use Help | About | Logfile).

And trying to start profiling shows an empty error message box 并尝试开始分析显示一个空的错误消息框

As it says "failed to create JMX connection" what about enabling jmx when starting maven? 正如它说“未能创建JMX连接”那么启动maven时启用jmx怎么样? Here is a question how to activate jmx and i think you can use MAVEN_OPTS or JAVA_OPTS to provide those parameters to maven. 这是一个如何激活jmx的问题,我认为你可以使用MAVEN_OPTS或JAVA_OPTS为maven提供这些参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM