jvm参数查看
所属分类 jvm
浏览量 1766
-XX:+PrintCommandLineFlags -XX:+PrintFlagsFinal
jvm启动时打印 命令行jvm参数及最终所有参数和值
jcmd PID VM.flags
jcmd PID VM.flags -all
加上all 输出所有参数及值 与 PrintFlagsFinal 输出的一样
jcmd PID VM.command_line
VM Arguments:
jvm_args
java_command
java_class_path
jcmd PID VM.flags -all |grep manageable
输出所有可管理的参数
intx CMSAbortablePrecleanWaitMillis = 100 {manageable}
intx CMSTriggerInterval = -1 {manageable}
intx CMSWaitDuration = 2000 {manageable}
bool HeapDumpAfterFullGC = false {manageable}
bool HeapDumpBeforeFullGC = false {manageable}
bool HeapDumpOnOutOfMemoryError = false {manageable}
ccstr HeapDumpPath = {manageable}
uintx MaxHeapFreeRatio = 70 {manageable}
uintx MinHeapFreeRatio = 40 {manageable}
bool PrintClassHistogram = false {manageable}
bool PrintClassHistogramAfterFullGC = false {manageable}
bool PrintClassHistogramBeforeFullGC = false {manageable}
bool PrintConcurrentLocks = false {manageable}
bool PrintGC := true {manageable}
bool PrintGCDateStamps = false {manageable}
bool PrintGCDetails := true {manageable}
bool PrintGCID = false {manageable}
bool PrintGCTimeStamps := true {manageable}
不带冒号的是默认值
开启HeapDumpAfterFullGC
jinfo -flag +HeapDumpAfterFullGC PID
关闭HeapDumpAfterFullGC
jinfo -flag -HeapDumpAfterFullGC PID
jinfo -flag $name
print the value of the named VM flag
jinfo -flag [+|-]$name
enable or disable the named VM flag
jinfo -flag $name=$value
set the named VM flag to the given value
-XX:+PrintFlagsFinal -XX:+PrintCommandLineFlags -verbose:gc -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseConcMarkSweepGC
-XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps
-XX:+PrintFlagsFinal -XX:+PrintCommandLineFlags -verbose:gc -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseConcMarkSweepGC
-XX:+PrintFlagsFinal -XX:+PrintCommandLineFlags -verbose:gc -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseG1GC
-XX:+PrintFlagsFinal -XX:+PrintCommandLineFlags -verbose:gc -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseSerialGC
-XX:+PrintFlagsFinal -XX:+PrintCommandLineFlags -verbose:gc -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseParallelGC
上一篇
下一篇
zookeeper内部原理
httpclient post 请求返回400
使用jmx监控jvm
gc日志相关参数
MySQL事务机制
秒杀系统设计思路