Home | 简体中文 | 繁体中文 | 杂文 | 打赏(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎专栏 | Search | Email

16.3. jinfo - Configuration Info

观察运行中的java程序的运行环境参数:参数包括Java System属性,各种.properties文件配置参数和JVM命令行参数

# jinfo $(pgrep java)
Attaching to process ID 15888, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 24.72-b04
Java System Properties:

java.vendor = Oracle Corporation
sun.java.launcher = SUN_STANDARD
catalina.base = /srv/apache-tomcat
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
catalina.useNaming = true
captcha.times = 5
os.name = Linux

...
...

java.vm.name = Java HotSpot(TM) 64-Bit Server VM
cpool.maxIdleTime = 7200
file.encoding = UTF-8
java.specification.version = 1.7

VM Flags:

-Djava.util.logging.config.file=/srv/apache-tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms512m -Xmx8192m -XX:PermSize=64M -XX:MaxPermSize=512m -Djava.endorsed.dirs=/srv/apache-tomcat/endorsed -Dcatalina.base=/srv/apache-tomcat -Dcatalina.home=/srv/apache-tomcat -Djava.io.tmpdir=/srv/apache-tomcat/temp
		

实例二

# jinfo $(jps | grep Bootstrap | cut -d " " -f1)
Attaching to process ID 15888, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 24.72-b04
Java System Properties:

java.vendor = Oracle Corporation
sun.java.launcher = SUN_STANDARD
catalina.base = /srv/apache-tomcat
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
catalina.useNaming = true
captcha.times = 5
os.name = Linux