Java 使用JVM SNMP功能的读写访问可以做什么?

Java 使用JVM SNMP功能的读写访问可以做什么?,java,jvm,snmp,Java,Jvm,Snmp,我正在使用该工具为Java应用程序进行SNMP监控 ACL模板的格式部分描述了access和managers选项的含义: ############################################################## # Format of the acl group ############################################################## # # communities: a list

我正在使用该工具为Java应用程序进行SNMP监控

ACL模板的格式部分描述了
access
managers
选项的含义:

##############################################################
#               Format of the acl group
##############################################################
#
# communities: a list of SNMP community strings to which the
#              access control applies separated by commas.
#
# access: either "read-only" or "read-write".
#
# managers: a list of hosts to be granted the access rights.
#    Each can be expressed as any one of the following:
#    - hostname: hubble
#    - ip v4 and v6 addresses: 123.456.789.12 , fe80::a00:20ff:fe9b:ea82
#    - ip v4 and v6 netmask prefix notation: 123.456.789.0/24, 
#         fe80::a00:20ff:fe9b:ea82/64  
#      see RFC 2373 (http://www.ietf.org/rfc/rfc2373.txt)
#
# An example of two community groups for multiple hosts:
#    acl = {
#     {
#       communities = public, private
#       access = read-only
#       managers = hubble, snowbell, nanak
#     }
#     {
#       communities = jerry
#       access = read-write
#       managers = hubble, telescope
#     }
#    }
如果我授予一个管理器
access=read-write
该管理器在运行的JVM中实际可以写入或更改什么


写访问是否允许管理器执行诸如触发GC或heapdump之类的操作?

使用JVM SNMP写访问可以做的事情不多,但是,调用GC是可能的

要查找JVM中可以通过SNMP修改的所有内容,您可以遍历所有属于的
JVM*Meta
类,并查找非平凡的
SnmpValue
setter:

    public SnmpValue set(SnmpValue x, long var, Object data)
以下是JDK 8u121中所有可写OID的列表,以及相应的JMX方法:

  • (1.3.6.1.4.1.42.2.145.3.163.1.1.1.4)
  • (1.3.6.1.4.1.42.2.145.3.163.1.1.2.2)
  • (1.3.6.1.4.1.42.2.145.3.163.1.1.2.3)
  • (1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.131)
  • (1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.110)
  • (1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.5)
  • (1.3.6.1.4.1.42.2.145.3.163.1.1.3.5)
  • (1.3.6.1.4.1.42.2.145.3.163.1.1.3.6)
  • (1.3.6.1.4.1.42.2.145.3.163.1.1.3.7)