功能
jinfo可以查看正在运行的jvm进程的参数,同时也可以修改参数。
使用
它的语法如下:
jinfo [option] <pid>
optition信息如下:
-flag <name> to print the value of the named VM flag
-flag [+|-]<name> to enable or disable the named VM flag
-flag <name>=<value> to set the named VM flag to the given value
-flags to print VM flags
-sysprops to print Java system properties
1.查看jvm某个参数
C:\Users\dell>jinfo -flag PrintGCDetails 15096
-XX:+PrintGCDetails
2.修改jvm参数
C:\Users\dell>jinfo -flag -PrintGCDetails 15096
C:\Users\dell>jinfo -flag PrintGCDetails 15096
-XX:-PrintGCDetails
3.查看jvm所有参数
C:\Users\dell>jinfo -flags 15096
Attaching to process ID 15096, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.192-b12
Non-default VM flags: -XX:CICompilerCount=4 -XX:InitialHeapSize=266338304 -XX:MaxHeapSize=734003200 -XX:MaxNewSize=244318208 -XX:MinHeapDeltaBytes=524288 -XX:NewSize=88604672 -XX:OldSize=177733632 -XX:-PrintGCDetails -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseFastUnorderedTimeStamps -XX:-UseLargePagesIndividualAllocation -XX:+UseParallelGC
Command line: -Xmx700m -Djava.awt.headless=true -Djava.endorsed.dirs="" -Djdt.compiler.useSingleThread=true -Dpreload.project.path=D:/learn -Dpreload.config.path=C:/Users/dell/.IntelliJIdea2019.1/config/options -Dexternal.project.config=C:\Users\dell\.IntelliJIdea2019.1\system\external_build_system\learn.37187f5e -Dcompile.parallel=false -Drebuild.on.dependency.change=true -Djava.net.preferIPv4Stack=true -Dio.netty.initialSeedUniquifier=8750413537132886974 -Dfile.encoding=GBK -Duser.language=zh -Duser.country=CN -Didea.paths.selector=IntelliJIdea2019.1 -Didea.home.path=C:\Program Files\JetBrains\IntelliJ IDEA 2019.1.3 -Didea.config.path=C:\Users\dell\.IntelliJIdea2019.1\config -Didea.plugins.path=C:\Users\dell\.IntelliJIdea2019.1\config\plugins -Djps.log.dir=C:/Users/dell/.IntelliJIdea2019.1/system/log/build-log -Djps.fallback.jdk.home=C:/Program Files/JetBrains/IntelliJ IDEA 2019.1.3/jre64 -Djps.fallback.jdk.version=1.8.0_202-release -Dio.netty.noUnsafe=true -Djava.io.tmpdir=C:/Users/dell/.IntelliJIdea2019.1/system/compile-server/learn_c8be5227/_temp_ -Djps.backward.ref.index.builder=true -Dkotlin.incremental.compilation=true -Dkotlin.incremental.compilation.js=true -Dkotlin.daemon.enabled -Dkotlin.daemon.client.alive.path="C:\Users\dell\AppData\Local\Temp\kotlin-idea-429080429474346921-is-running"