使用 VisualVM 分析 Tomcat 应用程序

编程入门 行业动态 更新时间:2024-10-09 22:16:08
本文介绍了使用 VisualVM 分析 Tomcat 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我想使用 VisualVM 工具分析在 Tomcat 上运行的应用程序.不幸的是,当我告诉 VisualVM 配置 Tomcat 时,Tomcat 会打印出几条消息,表明它正在连接到配置文件工具,然后直接退出.

I would like to profile an application that runs on Tomcat with the VisualVM tool. Unfortunately, when I tell VisualVM to profile Tomcat, Tomcat prints out a couple of messages indicating it is connecting to a profile tool and then simply exits.

详情...

我使用的是 Windows XP、Tomcat 6、VisualVM 1.2.1 和 JDK 1.6.0_11.

I am using Windows XP, Tomcat 6, VisualVM 1.2.1, and JDK 1.6.0_11.

在 Visual VM 中,我右键单击 Tomcat 应用程序并选择配置文件"在 Profiler 选项卡中,我按下内存按钮(或 CPU 按钮).Tomcat 退出

请注意,如果我右键单击 Tomcat 应用程序并选择堆转储",这似乎可以正常工作.

Note that if I right-click on the Tomcat Application and select "Heap Dump" that seems to work OK.

推荐答案

我现在有 VisualVM 分析与我的 Tomcat 应用程序一起工作.我需要在tomcat启动时添加以下参数:

I have VisualVM profiling working with my Tomcat application now. I needed to add the following parameters to the tomcat startup:

-Dcom.sun.management.jmxremote.port=8086
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

这是一篇不错的文章 使用 VisualVM 监控 Tomcat.

这篇关于使用 VisualVM 分析 Tomcat 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 03:35:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1388956.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   VisualVM   Tomcat

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!