如何获取用于在 Jconsole 中创建图表的 csv 数据

发布于 2024-08-17 22:44:56 字数 206 浏览 3 评论 0原文

这里是新手。 我有一个 java 应用程序,我正在努力监视该 java 应用程序。我开始了解使用“JConsole”进行java监控和管理控制。它提供了有关正在运行的 java 进程的非常详细的图形信息。

但我想知道的是用于生成图表的数据。就像在 JConsole 中一样,我们可以通过右键单击运行图来将数据保存为 csv 格式,是否有任何命令行选项可以仅获取 csv 格式的数据。

newbie here.
I have a java application and I am working on to monitor that java application. I come to know about the java monitoring and management control using 'JConsole'. It giving a very detailed graphical information about the running java process.

but the thing I am wondering is about the data used to generate the graphs. As in JConsole we can save the data in csv format by right clicking on running graph, Is there any command line option to get the data only in csv format.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

烟雨扶苏 2024-08-24 22:44:56

JConsole 的命令行选项是仅用于启动 JConsole,不用于导出其结果。

从 JConsole 获取数据的唯一方法是通过 JMX MBean,如以下建议:SO 答案,但您需要自己以 CSV 格式编写这些数据。

The command-line options for JConsole are only for starting JConsole, not for exporting its results.

The only way to get data from JConsole would be through JMX MBeans as suggested in this SO answer, but you would need to write those data in CSV format yourself.

只是在用心讲痛 2024-08-24 22:44:56

谷歌一些客户端示例。 这是一个快速的。

我最近所做的正是你所描述的。这没什么工作。一个技巧花了我一些时间。如果您使用 DynamicMBeans,我发现的几乎每个示例中的 bean 附件方法都不起作用。您必须直接引用每个值。请参阅这个问题(我的)

Google some client examples. Here's a quick one.

I've recently done exactly what you've described. It wasn't much work. One tip that cost me some time. If you are working with DynamicMBeans, the bean attachment approach in nearly every example I found won't work. You have to directly reference each value. See this question (mine)

走过海棠暮 2024-08-24 22:44:56

也许 jvmtop 值得一看。
它是一个命令行工具,可为多个指标提供实时视图

您可以使用其 STDOUT 作为进一步处理的输入。

输出示例:

 JvmTop 0.4.1  amd64  8 cpus, Linux 2.6.32-27, load avg 0.12
 http://code.google.com/p/jvmtop

  PID MAIN-CLASS      HPCUR HPMAX NHCUR NHMAX    CPU     GC    VM USERNAME   #T DL
 3370 rapperSimpleApp  165m  455m  109m  176m  0.12%  0.00% S6U37 web        21
11272 ver.resin.Resin [ERROR: Could not attach to VM]
27338 WatchdogManager   11m   28m   23m  130m  0.00%  0.00% S6U37 web        31
19187 m.jvmtop.JvmTop   20m 3544m   13m  130m  0.93%  0.47% S6U37 web        20
16733 artup.Bootstrap  159m  455m  166m  304m  0.12%  0.00% S6U37 web        46

Maybe jvmtop is worth a look.
It's a command-line tool which provides a live-view for several metrics.

You can use its STDOUT as an input for further processing.

Example output:

 JvmTop 0.4.1  amd64  8 cpus, Linux 2.6.32-27, load avg 0.12
 http://code.google.com/p/jvmtop

  PID MAIN-CLASS      HPCUR HPMAX NHCUR NHMAX    CPU     GC    VM USERNAME   #T DL
 3370 rapperSimpleApp  165m  455m  109m  176m  0.12%  0.00% S6U37 web        21
11272 ver.resin.Resin [ERROR: Could not attach to VM]
27338 WatchdogManager   11m   28m   23m  130m  0.00%  0.00% S6U37 web        31
19187 m.jvmtop.JvmTop   20m 3544m   13m  130m  0.93%  0.47% S6U37 web        20
16733 artup.Bootstrap  159m  455m  166m  304m  0.12%  0.00% S6U37 web        46
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文