本文介绍了如何将JProfiler连接到在localhost上运行的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序在我的本地主机上运行,​​我想要配置应用程序,看看如何提高应用程序的性能。我正在按照定义进行设置步骤,但是无法连接到localhost服务器,是否有适当的步骤指导可用于如何:


  1. 配置JProfiler与在localhost上运行的应用程序配合使用?

  2. 在分析应用程序时,如何配置文件以及要查找的区域?

  3. 使用Eclipse IDE配置JProfiler,现在可以在eclipse中的运行下拉列表中查看配置文件,但是它们没有被激活,因此如何激活?

我有与此相似的问题,但无法了解解决方案,对此的任何建议将非常感激。



我已经尝试了一段时间,没有任何成功配置JProfiler与在本地主机上运行的应用程序配合使用,任何建议将非常感谢。



我是最新的分析应用程序世界,所以真的很感激,如果你可以提供一些有用的指针



我我收到以下错误信息:



无法连接到127.0.0.1:8849。请确保远程地址正确,远程程序正常启动,网络路由允许套接字连接。我已经使用新服务器集成设置了配置,不知道还有什么需要完成了,这怎么可以解决。



添加 -agentpath后:C:\Users\user〜1.DOS\SOFTWA〜1\JPROFI〜1\ bin \WINDOW〜1\jprofilerti.dll = port = 8849,nowait,id = 117,config = C:\Users\user\.jprofiler6\config.xml to vm参数在运行配置下,然后当我运行配置我得到

  JProfiler> ;协议版本32 
JProfiler>使用JVMTI
JProfiler>检测到JVMTI版本1.1。
JProfiler> 64位库
JProfiler>不要等待前端连接。
JProfiler>使用配置文件C:\Users\user\.jprofiler6\config.xml(id:117)
JProfiler>无法找到ID:117`


解决方案

手动添加对于eclipse中运行配置的VM参数不推荐用于使用JProfiler进行概要分析。



有关eclipse IDE集成的更多信息,请参阅和。然后,您可以使用eclipse运行配置来配置JBoss,而不添加任何VM参数。



还有其他方法可以在不手动添加任何VM参数的情况下进行配置:


  1. 最简单的方法是使用JProfiler中的快速附加功能。通过会话 - >快速附加,您可以获得可以配置文件的正在运行的JVM的列表,而无需添加任何JVM参数。


  2. 如果您在上述步骤中错过了eclipse的源代码导航,则如果安装了JProfiler插件,eclipse中可以使用相同的操作。

    / li>

  1. 对于独立配置,请使用集成向导通过调用会话 - >集成向导 - >新服务器集成从JProfiler的主菜单。集成向导将修改启动脚本,以便您不必添加任何VM参数。

对于错误消息你有,我怀疑 C:\Users\user\.jprofiler6\config.xml 不存在。将参数减少到 -agentpath:C:\Users\user〜1.DOS\SOFTWA〜1\JPROFI〜1\bin\WINDOW〜1\jprofilerti.dll = port = 8849 将工作,那么JBoss VM将等待直到从JProfiler连接到附加到JVM(本地或远程)的会话。无论如何,仅在特殊情况下才需要手动添加VM参数。


I have an application running on my localhost and I want to profile the application to see how can I enhance the performance of the application. I am doing the setup steps as defined but it is not able to connect to localhost server, is there a proper step by step guideline available on how to:

  1. Configure JProfiler to work with application running on localhost?
  2. How to profile and what areas to look for while profiling for an application?
  3. Configure JProfiler with Eclipse IDE, right now am able to see profile in run dropdowns in eclipse but they are not activated and so how can it be activated?

I have similar issue as in this question but am not able to understand the solution, any suggestions on this would be really appreciated.

I am tried for sometime now without any success on configuring JProfiler to work with application running on localhost, any suggestions would be highly appreciated.

I am new to profiling application world and so would really appreciate if you can provide some useful pointers

I am getting following error message:

Could not connect to 127.0.0.1:8849. Please make sure that the remote address is correct, the remote program is started properly, and the network route allows socket connections. and I have set up configuration using New Server Integration, not sure what else needs to be done and how can this be fixed.

After adding -agentpath:C:\Users\user~1.DOS\SOFTWA~1\JPROFI~1\bin\WINDOW~1\jprofilerti.dll=port=8849,nowait,id=117,config=C:\Users\user\.jprofiler6\config.xml to vm arguments under run configuration and then when i run configuration i get

JProfiler> Protocol version 32
JProfiler> Using JVMTI
JProfiler> JVMTI version 1.1 detected.
JProfiler> 64-bit library
JProfiler> Don't wait for frontend to connect.
JProfiler> Using config file C:\Users\user\.jprofiler6\config.xml (id: 117)
JProfiler> Could not find session with id: 117`
解决方案

Manually adding a VM parameter to a run configuration in eclipse is not recommended for profiling with JProfiler.

For more on the eclipse IDE integration, see this screen cast and this help page. You can then profile JBoss with an eclipse run configuration without adding any VM parameters.

There are other ways to profile without manually adding any VM parameters:

  1. The easiest way to get started is to use the "Quick attach" feature in JProfiler. With "Session->Quick Attach" you get a list of running JVMs that you can profile without having to add any JVM parameters.

  2. If you miss source code navigation to eclipse in the above step, the same action is available in eclipse if the JProfiler plugin is installed.

  1. For standalone configuration, use the integration wizard by invoking "Session->Integration Wizards->New Server Integration" from JProfiler's main menu. The integration wizard will modify the start script, so that you don't have to add any VM parameters.

For the error message that you got, I suspect that C:\Users\user\.jprofiler6\config.xml does not exist. Reducing the parameter to -agentpath:C:\Users\user~1.DOS\SOFTWA~1\JPROFI~1\bin\WINDOW~1\jprofilerti.dll=port=8849 will work, then the JBoss VM will wait until you connect with a session of type "Attach to JVM (local or remote)" from JProfiler. Anyway, adding VM parameters manually is only necessary in special situations.

这篇关于如何将JProfiler连接到在localhost上运行的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 21:21