内容简介:java-jvm-jinfo
jinfo:
1、输出 当前 java 进程启动的相关配置信息,包括各种各样的jvm参数
2、修改运行时的java 进程的opts
查看参数:
举例:
sudo jinfo 14855
输出:
Attaching to process ID 14855, please wait... Debugger attached successfully. Server compiler detected. JVM version is 24.45-b08 Java System Properties: java.runtime.name = Java(TM) SE Runtime Environment java.vm.version = 24.45-b08 sun.boot.library.path = /home/q/java/jdk1.7.0_45/jre/lib/amd64 shared.loader = java.vendor.url = http://java.oracle.com/ java.vm.vendor = Oracle Corporation path.separator = : file.encoding.pkg = sun.io java.vm.name = Java HotSpot(TM) 64-Bit Server VM java.util.logging.config.file = /home/q/www/projectA/conf/logging.properties tomcat.util.buf.StringCache.byte.enabled = true sun.os.patch.level = unknown sun.java.launcher = SUN_STANDARD user.country = US user.dir = /home/robot.walle java.vm.specification.name = Java Virtual Machine Specification java.runtime.version = 1.7.0_45-b18 java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment os.arch = amd64 java.endorsed.dirs = /home/q/tomcat/endorsed line.separator = java.io.tmpdir = /home/q/www/projectA/temp java.vm.specification.vendor = Oracle Corporation java.util.logging.manager = org.apache.juli.ClassLoaderLogManager java.naming.factory.url.pkgs = org.apache.naming os.name = Linux gym.cache = /home/q/www/projectA/cache sun.jnu.encoding = UTF-8 java.library.path = /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib sun.nio.ch.bugLevel = curator-dont-log-connection-problems = false java.class.version = 51.0 java.specification.name = Java Platform API Specification http.keepAlive = false sun.management.compiler = HotSpot 64-Bit Tiered Compilers os.version = 2.6.32-358.23.2.el6.x86_64 user.home = /home/tomcat user.timezone = PRC catalina.useNaming = true java.awt.printerjob = sun.print.PSPrinterJob file.encoding = UTF-8 java.specification.version = 1.7 catalina.home = /home/q/tomcat user.name = tomcat java.class.path = /home/q/tomcat/bin/bootstrap.jar:/home/q/tomcat/bin/tomcat-juli.jar java.naming.factory.initial = org.apache.naming.java.javaURLContextFactory package.definition = sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper. java.vm.specification.version = 1.7 sun.arch.data.model = 64 sun.java.command = org.apache.catalina.startup.Bootstrap start java.home = /home/q/java/jdk1.7.0_45/jre user.language = en java.specification.vendor = Oracle Corporation awt.toolkit = sun.awt.X11.XToolkit java.vm.info = mixed mode java.version = 1.7.0_45 java.ext.dirs = /home/q/java/jdk1.7.0_45/jre/lib/ext:/usr/java/packages/lib/ext sun.boot.class.path = /home/q/java/jdk1.7.0_45/jre/lib/resources.jar:/home/q/java/jdk1.7.0_45/jre/lib/rt.jar:/home/q/java/jdk1.7.0_45/jre/lib/sunrsasign.jar:/home/q/java/jdk1.7.0_45/jre/lib/jsse.jar:/home/q/java/jdk1.7.0_45/jre/lib/jce.jar:/home/q/java/jdk1.7.0_45/jre/lib/charsets.jar:/home/q/java/jdk1.7.0_45/jre/lib/jfr.jar:/home/q/java/jdk1.7.0_45/jre/classes server.loader = java.vendor = Oracle Corporation catalina.base = /home/q/www/projectA file.separator = / java.vendor.url.bug = http://bugreport.sun.com/bugreport/ common.loader = ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar sun.io.unicode.encoding = UnicodeLittle sun.cpu.endian = little package.access = sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans. sun.cpu.isalist = VM Flags: -Djava.util.logging.config.file=/home/q/www/projectA/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms7168m -Xmx7168m -Xmn2048m -XX:SurvivorRatio=6 -XX:-OmitStackTraceInFastThrow -XX:+DisableExplicitGC -XX:MaxPermSize=400m -verbose:gc -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:/home/q/www/projectA/logs/gc.log -Djava.endorsed.dirs=/home/q/tomcat/endorsed -Dcatalina.base=/home/q/www/projectA -Dcatalina.home=/home/q/tomcat -Djava.io.tmpdir=/home/q/www/projectA/temp
查看参数:
sudo jinfo -flag MaxPermSize 48892
输出:
-XX:MaxPermSize=85983232
修改参数:
C:\Users\xinchun.wang> jinfo -flag PrintGCDetails 48892 -XX:-PrintGCDetails C:\Users\xinchun.wang> jinfo -flag +PrintGCDetails 48892 #无输出 C:\Users\xinchun.wang> jinfo -flag PrintGCDetails 48892 -XX:+PrintGCDetails
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Mastering Regular Expressions, Second Edition
Jeffrey E F Friedl / O'Reilly Media / 2002-07-15 / USD 39.95
Regular expressions are an extremely powerful tool for manipulating text and data. They have spread like wildfire in recent years, now offered as standard features in Perl, Java, VB.NET and C# (and an......一起来看看 《Mastering Regular Expressions, Second Edition》 这本书的介绍吧!
在线进制转换器
各进制数互转换器
Markdown 在线编辑器
Markdown 在线编辑器