如何获取用于在 Jconsole 中创建图表的 csv 数据
这里是新手。 我有一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
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.
谷歌一些客户端示例。 这是一个快速的。
我最近所做的正是你所描述的。这没什么工作。一个技巧花了我一些时间。如果您使用 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)
也许 jvmtop 值得一看。
它是一个命令行工具,可为多个指标提供实时视图。
您可以使用其 STDOUT 作为进一步处理的输入。
输出示例:
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: