知乎專欄 | 多維度架構 | 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者” |
觀察運行中的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