jinfo
JVM Configuration info这个命令作用是实时查看和调整虚拟机运行参数。 之前的jps -v口令只能查看到显示指定的参数,如果想要查看未被显示指定的参数的值就要使用jinfo口令。【JVM配置参数调整查看】
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
[root@localhost bin]# jinfo -helpUsage: jinfo [option] <pid> (to connect to running process) jinfo [option] <executable <core> (to connect to a core file) jinfo [option] [server_id@]<remote server IP or hostname> (to connect to remote debug server)where <option> is one of: -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 <no option> to print both of the above -h | -help to print this help message |
参数
-flag:输出指定args参数的值-flags:输出所有JVM参数的值
-sysprops:输出系统属性,等同于System.getProperties()
示例
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
[root@localhost bin]# jinfo -sysprops 24971 | moreAttaching to process ID 24971, please wait...Debugger attached successfully.Server compiler detected.JVM version is 24.79-b02java.runtime.name = Java(TM) SE Runtime Environmentjava.vm.version = 24.79-b02sun.boot.library.path = /usr/local/java/jdk1.7.0_79/jre/lib/amd64shared.loader = java.vendor.url = http://java.oracle.com/java.vm.vendor = Oracle Corporationpath.separator = :file.encoding.pkg = sun.iojava.vm.name = Java HotSpot(TM) 64-Bit Server VMjava.util.logging.config.file = /home/yuhuo-tomcat/tomcat2/conf/logging.propertiestomcat.util.buf.StringCache.byte.enabled = truesun.os.patch.level = unknownsun.java.launcher = SUN_STANDARDuser.country = CNuser.dir = /home/yuhuo-tomcat/tomcat2/binjava.vm.specification.name = Java Virtual Machine Specificationjava.runtime.version = 1.7.0_79-b15org.apache.catalina.startup.TldConfig.jarsToSkip = tomcat7-websocket.jarjava.awt.graphicsenv = sun.awt.X11GraphicsEnvironmentos.arch = amd64 |
|
1
2
|
[root@localhost bin]# jinfo -flag MaxPermSize 24971-XX:MaxPermSize=85983232 |