JDK-8142398 : ManagementAgent.status diagnostic command only outputs the specifically set properties
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: javax.management
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-11-10
  • Updated: 2015-12-18
  • Resolved: 2015-12-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b97Fixed
Related Reports
Cloners :  
Description
The ManagementAgent.status diagnostic command only outputs the specifically set properties, and not any default values, even though the default values are also in effect.

This causes JMC (or the user) to have duplicated information about the default values, such ssl enabledment, JDP settings etc.

For example:

>jcmd 7948 ManagementAgent.start  jmxremote.port=7092 jmxremote.authenticate=false
7948:
Command executed successfully

>jcmd 7948 ManagementAgent.status
7948:
Agent: enabled

Connection Type: remote
Protocol       : rmi
Host           : klara01
URL            : service:jmx:rmi://klara01/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHVi
AAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxh
Mx4DAAB4cHciAAtVbmljYXN0UmVmMgEADjEwLjE2MS4xOTAuMTY3AADSonNyACdqYXZheC5ybWkuc3NsLlNzbFJNSUNsaWVudFNvY2tldEZhY3RvcnmMqrS7
gYUlDwIAAHhwdxeVBUcQ0oDc8Ok5v/0AAAFQ8Wb1poABAHg=
Properties     :
  com.sun.management.jmxremote.authenticate = false
  com.sun.management.jmxremote.port = 7092


( Notice that eg. jmxremote.ssl defaults to true, and jmxremote.rmi.port defaults to 7092)
---------------------------


One could imagine another part of the output containing default values in use, something like

Properties    :
  com.sun.......

Defaults      :
  com.sun......



I have no idea if this is considered a bug or a feature, or how hard it would be to implement, and I realize that we might have thought about this for the original enhancement/CCC, where we never really specified the output in that detail.
Not sure if the issue should be a bug or an enh.
Comments
Yes, only non-overridden defaults. Your output format suggestion looks nicer for the end user, a bit more tricky to parse but it's definitly possible, so I think you could go with that.
11-11-2015

Another possible output would be mixing the defaults into the 'Properties' section and adding [default] postfix: [jcmd] Properties : [jcmd] com.sun.management.jmxremote.authenticate = false [jcmd] com.sun.management.jmxremote.port = 56083 [jcmd] com.sun.management.jmxremote = [jcmd] com.sun.management.jmxremote.ssl = false [jcmd] com.sun.management.config.file = management.properties [default] [jcmd] com.sun.management.jmxremote.local.only = true [default] [jcmd] com.sun.management.jmxremote.access.file = jmxremote.access [default] [jcmd] com.sun.management.jmxremote.registry.ssl = false [default] [jcmd] com.sun.management.jmxremote.ssl.need.client.auth = false [default] [jcmd] com.sun.management.jmxremote.password.file = jmxremote.password [default] Please, let me know which kind of output would be preferred.
10-11-2015

Can be done. Probably only non-overridden defaults should be displayed.
10-11-2015