zoukankan      html  css  js  c++  java
  • JVM-Jinfo命令

    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 -help
    Usage:
        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 | more
    Attaching to process ID 24971, please wait...
    Debugger attached successfully.
    Server compiler detected.
    JVM version is 24.79-b02
    java.runtime.name = Java(TM) SE Runtime Environment
    java.vm.version = 24.79-b02
    sun.boot.library.path = /usr/local/java/jdk1.7.0_79/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/yuhuo-tomcat/tomcat2/conf/logging.properties
    tomcat.util.buf.StringCache.byte.enabled = true
    sun.os.patch.level = unknown
    sun.java.launcher = SUN_STANDARD
    user.country = CN
    user.dir = /home/yuhuo-tomcat/tomcat2/bin
    java.vm.specification.name = Java Virtual Machine Specification
    java.runtime.version = 1.7.0_79-b15
    org.apache.catalina.startup.TldConfig.jarsToSkip = tomcat7-websocket.jar
    java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
    os.arch = amd64
    1
    2
    [root@localhost bin]# jinfo -flag MaxPermSize 24971
    -XX:MaxPermSize=85983232
  • 相关阅读:
    std thread
    windows更新包发布地址
    How to set up logging level for Spark application in IntelliJ IDEA?
    spark 错误 How to set heap size in spark within the Eclipse environment?
    hadoop 常用命令
    windows 安装hadoop 3.2.1
    windows JAVA_HOME 路径有空格,执行软连接
    day01MyBatisPlus条件构造器(04)
    day01MyBatisPlus的CRUD 接口(03)
    day01MyBatisPlus入门(02)
  • 原文地址:https://www.cnblogs.com/findbetterme/p/11388632.html
Copyright © 2011-2022 走看看