Java命令行工具 -- jinfo

功能

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"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值