jinfo(Configuration info for Java)
jinfo的作用是实时地查看和调整虚拟机各项参数。
jinfo 命令格式:
jinfo [ option ] pidpid是虚拟机进程ID(用jps可以查询)
option 列表:
| 选项 | 说明 | 
|---|---|
| -flag | to print the value of the named VM flag | 
| -flag [+|-] | to enable or disable the named VM flag | 
| -flag | to set the named VM flag to the given value | 
| -flags | to print VM flags | 
| -sysprops | to print Java system properties | 
| <no option> | to print both of the above | 
| -h | -help | to print this help message | 
jinfo 还可以使用 -sysprops 选项把虚拟机进程的 System.getProperties() 的内容打印出来。在运行期修改参数使用-flag[+|-] name 或者 -flage name=value 修改一部分运行期可写的虚拟机参数值。
