Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8075926

Add a sun.management.JMXConnectorServer perf counter to track its state

    Details

      Backports

        Description

        The sun.management.JMXConnectorServer.<counter>.<key> perf counters are not updated when the remote management agent is stopped.

        It is no longer possible to connect to the remote agent, but the counters are still in the same state.
        We were hoping to use these counters in JMC to be able to know the state of the remote agent.
        (See also JDK-8023093)


        Repro:


        $>jcmd 9568 PerfCounter.print | grep sun.management

        $>jcmd 9568 ManagementAgent.start_local
        9568:
        Command executed successfully

        $>jcmd 9568 PerfCounter.print | grep sun.management
        sun.management.JMXConnectorServer.address="service:jmx:rmi://127.0.0.1/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc5AAtVbmljYXN0UmVmMgAADjEwLjE2MS4xOTAuMTY3AADsmGclwEXuSqnKIf2SqQAAAUxQM0FfgAEAeA=="

        $>jcmd 9568 ManagementAgent.start jmxremote.port=7091 jmxremote.authenticate=false jmxremote.ssl=false
        9568:
        Command executed successfully

        $>jcmd 9568 PerfCounter.print | grep sun.management
        sun.management.JMXConnectorServer.0.authenticate="false"
        sun.management.JMXConnectorServer.0.remoteAddress="service:jmx:rmi:///jndi/rmi://klara01:7091/jmxrmi"
        sun.management.JMXConnectorServer.0.ssl="false"
        sun.management.JMXConnectorServer.0.sslNeedClientAuth="false"
        sun.management.JMXConnectorServer.0.sslRegistry="false"
        sun.management.JMXConnectorServer.address="service:jmx:rmi://127.0.0.1/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc5AAtVbmljYXN0UmVmMgAADjEwLjE2MS4xOTAuMTY3AADsmGclwEXuSqnKIf2SqQAAAUxQM0FfgAEAeA=="

        $>jcmd 9568 ManagementAgent.stop
        9568:
        Command executed successfully

        $>jcmd 9568 PerfCounter.print | grep sun.management
        sun.management.JMXConnectorServer.0.authenticate="false"
        sun.management.JMXConnectorServer.0.remoteAddress="service:jmx:rmi:///jndi/rmi://klara01:7091/jmxrmi"
        sun.management.JMXConnectorServer.0.ssl="false"
        sun.management.JMXConnectorServer.0.sslNeedClientAuth="false"
        sun.management.JMXConnectorServer.0.sslRegistry="false"
        sun.management.JMXConnectorServer.address="service:jmx:rmi://127.0.0.1/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc5AAtVbmljYXN0UmVmMgAADjEwLjE2MS4xOTAuMTY3AADsmGclwEXuSqnKIf2SqQAAAUxQM0FfgAEAeA=="

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jbachorik Jaroslav BachorĂ­k
                  Reporter:
                  klward Klara Ward
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: