Java 虚拟机程序员

【Java 虚拟机笔记】jinfo 配置信息工具相关整理

2019-02-28  本文已影响42人  58bc06151329

文前说明

作为码农中的一员,需要不断的学习,我工作之余将一些分析总结和学习笔记写成博客与大家一起交流,也希望采用这种方式记录自己的学习之旅。

本文仅供学习交流使用,侵权必删。
不用于商业目的,转载请注明出处。

1. Java 配置信息工具(Configuration Info for Java)

1.1 命令格式

选项 说明
无选项 打印虚拟机运行参数和系统属性的名称、值对。
-flag <name> 打印指定虚拟机运行参数的名称和值。
-flag [+|-]name 启用或禁用指定的布尔参数标志。
-flag name=value 将指定的参数标志设置为指定值。
-flags 打印虚拟机运行参数标志对。
-sysprops 打印系统属性的名称、值对。
-h 打印帮助信息。
-help 打印帮助信息。

1.2 无选项

执行样例

[root@localhost ~]# sudo -u ovirt jinfo 28823
Attaching to process ID 28823, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 24.161-b00
Java System Properties:

jboss.modules.system.pkgs = org.jboss.byteman
logging.configuration = file:///var/lib/ovirt-engine/jboss_runtime/config/ovirt-engine-logging.properties
java.vendor = Oracle Corporation
jboss.qualified.host.name = localhost.localdomain
sun.java.launcher = SUN_STANDARD
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
javax.xml.stream.XMLInputFactory = __redirected.__XMLInputFactory
sun.nio.ch.bugLevel = 
os.name = Linux
......

1.3 -flag <name>

执行样例

[root@localhost ~]# sudo -u ovirt jinfo -flag MaxPermSize 28823
-XX:MaxPermSize=268435456

输出格式

1.4 -flag [+|-]name

执行样例

[root@localhost ~]# sudo -u ovirt jinfo -flag HeapDumpOnOutOfMemoryError 28823
-XX:+HeapDumpOnOutOfMemoryError
[root@localhost ~]# sudo -u ovirt jinfo -flag -HeapDumpOnOutOfMemoryError 28823
[root@localhost ~]# sudo -u ovirt jinfo -flag HeapDumpOnOutOfMemoryError 28823
-XX:-HeapDumpOnOutOfMemoryError

1.5 -flag name=value

执行样例

[root@localhost ~]# sudo -u ovirt jinfo -flag HeapDumpPath 28823
-XX:HeapDumpPath=/var/log/ovirt-engine/dump
[root@localhost ~]# sudo -u ovirt jinfo -flag HeapDumpPath=/var/log/ovirt-engine/dump_temp 28823
[root@localhost ~]# sudo -u ovirt jinfo -flag HeapDumpPath 28823
-XX:HeapDumpPath=/var/log/ovirt-engine/dump_temp
[root@localhost ~]#  java -XX:+PrintFlagsFinal|grep manageable
     intx CMSAbortablePrecleanWaitMillis            = 100             {manageable}        
     intx CMSWaitDuration                           = 2000            {manageable}        
     bool HeapDumpAfterFullGC                       = false           {manageable}        
     bool HeapDumpBeforeFullGC                      = false           {manageable}        
     bool HeapDumpOnOutOfMemoryError                = false           {manageable}        
    ccstr HeapDumpPath                              =                 {manageable}        
    uintx MaxHeapFreeRatio                          = 100             {manageable}        
    uintx MinHeapFreeRatio                          = 0               {manageable}        
     bool PrintClassHistogram                       = false           {manageable}        
     bool PrintClassHistogramAfterFullGC            = false           {manageable}        
     bool PrintClassHistogramBeforeFullGC           = false           {manageable}        
     bool PrintConcurrentLocks                      = false           {manageable}        
     bool PrintGC                                   = false           {manageable}        
     bool PrintGCDateStamps                         = false           {manageable}        
     bool PrintGCDetails                            = false           {manageable}        
     bool PrintGCTimeStamps                         = false           {manageable}
上一篇下一篇

猜你喜欢

热点阅读