zoukankan      html  css  js  c++  java
  • JVM工具篇jinfo

    C:\Users\Administrator>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

    jinfo主要作用是查看 JVM 系统参数和运行参数,还可以动态设置部分参数值,下面实战来讲解,运行一个程序java代码

    Main后面的就是运行参数,可以用jps -lm查看,或者jinfo -sysprops pid里面的sun.java.command)

     Main前面的就是系统参数,可以设置虚拟机参数(Vm flags),可以设置系统属性(通过-D来设置),查看系统参数可用jps -lv查看,或者jinfo -flags pid

     查看 JVM 参数,其中 Non-default VM flags 是虚拟机默认设置的参数,Command line 是用户指定的参数,比如命令行启动main或者 jar 包的时候加上的参数。

     -D设置的参数,实际上就是系统属性,jinfo -sysprops pid会体现。

  • 相关阅读:
    将文件导入到SQL server数据库表中的字段中
    查看端口是否启用
    JS去除字符串左右两端的空格
    css常见问题
    iframe之局部刷新
    iframe局部刷新的二种实现方法
    模式识别复习目录
    linux下文件内容查找 转
    LaTeX技巧10:LaTeX数学公式输入初级入门
    matlab中高维数组怎么做PCA?
  • 原文地址:https://www.cnblogs.com/feibazhf/p/15796005.html
Copyright © 2011-2022 走看看