问题标签 [jmx]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
4 回答
2792 浏览

jmx - 对于使用 JMX 监控 JVM,最好使用构建自己的工具还是使用 JConsole 之类的工具?

我目前的任务是开发一个工具来使用 JMX 来监控 JVM,例如但不限于内存使用、堆大小、线程数。所需的工具是一个可以为每个 jvm 显示许多图表的工具(下面的示例)。

那么问题是最好自己构建吗?使用其他可用的工具?(如果有,是哪一个)或者是否有一个具有许可证的工具,我可以使用它来构建?

示例:(每个 JVM 都有许多可以同时查看的图表,因此您可以查看特定应用程序/服务器/jvm 是否相当容易地运行。

  1. JVM1:PermGen 图、堆大小图、线程图
  2. JVM2:PermGen 图、堆大小图、线程图
  3. JVM3:PermGen 图、堆大小图、线程图

***编辑:“你忘记了第三个选项……买一个。” 有什么特别可以满足这些要求的吗?或者足够可扩展以处理它们?

0 投票
7 回答
23629 浏览

java - 如何让 JMX 绑定到特定接口?

我目前正在使用com.sun.management.jmxremote.*属性启动我的 Java VM,以便我可以通过 JConsole 连接到它以进行管理和监视。不幸的是,它侦听机器上的所有接口(IP 地址)。

在我们的环境中,经常会出现在一台机器上同时运行多个 Java VM 的情况。虽然可以告诉 JMX 监听不同的 TCP 端口(使用com.sun.management.jmxremote.port),但最好让 JMX 使用标准 JMX 端口并绑定到特定的 IP 地址(而不是全部)。

这将使我们更容易确定我们通过 JConsole 连接到哪个 VM(因为每个 VM 有效地“拥有”自己的 IP 地址)。有没有人想出如何让 JMX 监听单个 IP 地址或主机名?

0 投票
2 回答
849 浏览

java - 可以持久保存收集到的信息的 JMX 客户端

我们已经向我们的应用程序添加了性能度量,并正在使用 JMX 公开它们。现在我们想在文件或数据库中收集和存储性能数据以供分析。

有谁知道可以保存收集到的信息的 JMX 客户端、开源或商业客户端?

0 投票
1 回答
4960 浏览

spring - 关于 JMX 的 @ManagedResource 注释的 Spring 问题

我想找出 org.springframework.ManagedResource 注释的属性在这个 JavaDoc 中看到的。我想了解每个参数,以便将其设置为正确的值。如果有人知道在哪里可以找到更多信息,我将不胜感激。

http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/jmx/export/annotation/ManagedResource.html

0 投票
4 回答
8871 浏览

security - Restricting JMX to localhost

While there appears to some documentation on how to expose JMX through various firewall and tunneling schemes, I sort of want the opposite. I want to ensure that JMX is only accessible to local machine. Unfortunately it appears that the "out of the box" management options do not allow restricting the ports to a local interface and netstat shows them listening on any/all interfaces.

http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html#gdevf

I have to admit I am bewildered by the layers of indirection in JMX, the RMI registry, connectors, adapters, etc.

I would like to just turn it on and then tunnel through SSH as opposed to exposing it to the world and then having to perform arduous and superfluous user management and security configuration. It would be nice to be able to use a built in RMI registry and not have to run an external one.

0 投票
12 回答
90499 浏览

java - 如何在 Websphere 中启用 JMX?

我想使用 JConsole 来监控我的 Websphere 应用程序,但我不确定如何启用 JMX。

0 投票
5 回答
10621 浏览

jmx - Java app performance counters viewed in Perfmon

I have a Java app running on Tomcat, and I would like to monitor counters using Windows Performance Monitor. Is this possible using a JMX adapter for the Java MBeans or by some other means?

0 投票
1 回答
436 浏览

java - 保护 MBean 操作

我有一些需要保护的 MBean 操作。我希望用户需要以服务器管理员身份登录,并且我希望在部署应用程序时以编程方式或最好通过 WAR 中的配置文件进行设置。我想避免要求管理员将其设置为部署步骤。

我们正在运行 glassfish,但首选平台中性。但是,glassfish 特定的配置文件会很好。

0 投票
6 回答
9019 浏览

java - 在生产系统上详细分析 Tomcat 堆

使用 JMX 控制台分析了在 tomcat 中运行的轻负载 Web 应用程序,结果表明“PS Old Gen”增长缓慢但稳定。它从 200MB 开始,增长到大约 80MB/小时。

CPU 不是问题,它平均以 0-1% 的速度运行,但在某处它会泄漏内存,因此在部署后几天会变得不稳定。

我如何找出堆上分配了哪些对象?你知道有什么好的教程或工具吗?

0 投票
1 回答
3001 浏览

java - 是否有必要从 Platform MBean Server 注销 MBean?

我已经开始使用 MBeans 来公开有关应用程序的一些信息。几乎所有的 HOWTO / 教程 / 博客文章 / 在线示例都教您如何实现 MBean 并将其注册到 MBean 服务器,但从未提及(或只是粗略地)从服务器取消注册 MBean。

我担心一个 MBean 需要引用一个相当重量级的对象才能提供有关该对象的状态信息。

平台 MBean 服务器是否维护对 MBean 的弱引用或其他类似的技巧,以确保如果您的应用程序不再持有对它的任何引用,它最终会被 GC 处理?注销通常是不必要的,从而解释了为什么没有人在 JMX 教程中谈论它?