jinfo不仅可以查看运行时某一个Java虚拟机参数的实际取值,甚至可以在运行时修改部分(被标记为manageable的flag)参数,并使之立即生效。

java -XX:PrintFlagsFinal -version|grep manageable

image.png

jinfo -flags pid

查看所有非默认VM参数信息:

[root@localhost ~]# jinfo -flags 9283
Attaching to process ID 9283, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.302-b08
Non-default VM flags: -XX:CICompilerCount=3 -XX:InitialHeapSize=262144000 -XX:MaxHeapSize=4164943872 -XX:MaxNewSize=1388314624 -XX:MinHeapDeltaBytes=524288 -XX:NewSize=87031808 -XX:OldSize=175112192 -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseFastUnorderedTimeStamps -XX:+UseParallelGC 
Command line:

Q.E.D.


曙光在头上,不抬起头,便永远只能看见物质的闪光。