1.jps:查看当前运行着的java进程(仿linux下的ps),显示进程号
  2. jinfo: 查参数jinfo -flagPermSize 2208(进程号)
jinfo -flag MaxPermSize 2208(进程号)
C:\Users\WILL>jinfo
Usage:
jinfo <option> <pid>
(to connect to a running process)
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
-h | -help           to print this help message
3. jconsole 2208
用法:
jconsole [ -interval=n ] [ -notile ] [ -pluginpath <path> ] [ -version ] [ connection ...]
-interval   将更新间隔时间设置为 n 秒(默认值为 4 秒)
-notile     最初不平铺显示窗口(对于两个或更多连接)
-pluginpath 指定 jconsole 用于查找插件的路径
-version    输出程序版本
connection = pid || host:port || JMX URL (service:jmx:<protocol>://...)
pid       目标进程的进程 ID
host      远程主机名或 IP 地址
port      用于远程连接的端口号
-J          对正在运行 jconsole 的 Java 虚拟机指定
输入参数
4. jstack  2208列出所有线程,以及线程的运行状态
C:\Users\WILL>jstack
Usage:
jstack [-l] <pid>
(to connect to running process)
Options:
-l  long listing. Prints additional information about locks
-h or -help to print this help message
 5. jstat -gcutil 2208 1000(每隔1000毫秒打印一次信息) 10(打印10行)
C:\Users\WILL>jstat
invalid argument count
Usage: jstat -help|-options
jstat -<option> [-t] [-h<lines>] <vmid> [<interval> [<count>]]
Definitions:
<option>      An option reported by the -options option
<vmid>        Virtual Machine Identifier. A vmid takes the following form:
<lvmid>[@<hostname>[:<port>]]
Where <lvmid> is the local vm identifier for the target
Java virtual machine, typically a process id; <hostname> is
the name of the host running the target Java virtual machine;
and <port> is the port number for the rmiregistry on the
target host. See the jvmstat documentation for a more complete
description of the Virtual Machine Identifier.
<lines>       Number of samples between header lines.
<interval>    Sampling interval. The following forms are allowed:
<n>["ms"|"s"]
Where <n> is an integer and the suffix specifies the units as
milliseconds("ms") or seconds("s"). The default units are "ms".
<count>       Number of samples to take before terminating.
-J<flag>      Pass <flag> directly to the runtime system.
C:\Users\WILL>jstat -options
-class
-compiler
-gc
-gccapacity
-gccause
-gcnew
-gcnewcapacity
-gcold
-gcoldcapacity
-gcpermcapacity
-gcutil
-printcompilation
6. jmap把虚拟机里运行着的所有文件都down下来,相当于快照
C:\Users\WILL>jmap
Usage:
jmap -histo <pid>
(to connect to running process and print histogram of java object heap
jmap -dump:<dump-options> <pid>
(to connect to running process and dump java heap)
dump-options:
format=b     binary default
file=<file>  dump heap to <file>
Example:       jmap -dump:format=b,file=heap.bin <pid>
7. jhat 对jmap下来的文件进行分析,多个角度
Usage:  jhat [-stack <bool>] [-refs <bool>] [-port <port>] [-baseline <file>] [-
debug <int>] [-version] [-h|-help] <file>
-J<flag>          Pass <flag> directly to the runtime system. For
example, -J-mx512m to use a maximum heap size of 512MB
-stack false:     Turn off tracking object allocation call stack.
-refs false:      Turn off tracking of references to objects
-port <port>:     Set the port for the HTTP server.  Defaults to 7000
-exclude <file>:  Specify a file that lists data members that should
be excluded from the reachableFrom query.
-baseline <file>: Specify a baseline object dump.  Objects in
both heap dumps with the same ID and same class will
be marked as not being "new".
-debug <int>:     Set debug level.
0:  No debug output
1:  Debug hprof file parsing
2:  Debug hprof file parsing, no server
-version          Report version number
-h|-help          Print this help and exit
<file>            The file to read
For a dump file that contains multiple heap dumps,
you may specify which dump in the file
by appending "#<number>" to the file name, i.e. "foo.hprof#3".
All boolean options default to "true"
图片又不能上传。。。就打印出这些帮助参数来,能看懂得了。
最新内容请见作者的GitHub页:http://qaseven.github.io/

使用java自带工具监控jvm运行状态相关推荐

  1. 诊断神器Arthas,动态跟踪Java代码,实时监控JVM状态

    简介 Arthas 是Alibaba开源的Java诊断工具,动态跟踪Java代码:实时监控JVM状态,可以在不中断程序执行的情况下轻松完成JVM相关问题排查工作 .支持JDK 6+,支持Linux/M ...

  2. zabbix监控JAVA微服务_Zabbix监控JVM(微服务进程)

    老的方法感觉效果不好,又写了一个模板和脚本,请移步: http://www.cnops.top/posts/748ad64f.html 有兴趣的可以继续往下看. Zabbix监控JVM(微服务进程) ...

  3. java自带工具_深入了解Java JDK自带工具,包括javac、jar、jstack等,实用~

    在Java JDK的安用装目录bin下,有一些有非常实用的小工具,可用于分析JVM初始配置.内存溢出异常等问题,我们接下来将对些常用的工具进行一些说明. JDK小工具简介 在JDK的bin目录下面有一 ...

  4. 6 款 Java 8 自带工具,轻松分析定位 JVM 问题!

    这篇文章中介绍下如何使用 JDK 自带工具来分析和定位 Java 程序的问题. 使用 JDK 自带工具查看 JVM 情况 JDK 自带了很多命令行甚至是图形界面工具,帮助我们查看 JVM 的一些信息. ...

  5. 收集6 款 Java 8 自带工具,轻松分析定位 JVM 性能问题!

    这篇文章中介绍下如何使用 JDK 自带工具来分析和定位 Java 程序的问题. 使用 JDK 自带工具查看 JVM 情况 JDK 自带了很多命令行甚至是图形界面工具,帮助我们查看 JVM 的一些信息. ...

  6. java自带的jvm在哪里看_使用jdk工具查看jvm笔记

    前言 有时候线上出问题或者需要对java项目进行优化的时候 需要一些工具对jvm运行状态进行一些查看和分析 jdk自带了很多工具 这里对jvm参数查看分析写一篇笔记 方便查阅 至于在线debug 另外 ...

  7. java系统运维:使用java自带的工具监控系统(java)虚机的运行

    公司采用的B/S架构开发的系统林林总总,有时候系统不稳定,分析起来很头疼.除了看日志,还很希望能知道系统虚拟机的运行情况. java 虚拟机从1.5开始,有类似的工具 jconsole,1.6开始不但 ...

  8. 史上最全图详解Jvm—诊断工具和JVM监控

    3.1. 工具概述 使用上一章命令行工具或组合能帮您获取目标Java应用性能相关的基础信息,但它们存在下列局限: 1.无法获取方法级别的分析数据,如方法间的调用关系.各方法的调用次数和调用时间等(这对 ...

  9. 深入理解Java虚拟机-如何利用 JDK 自带的命令行工具监控上百万的高并发的虚拟机性能...

    虚拟机系列文章 深入理解 Java 虚拟机(第一弹) - Java 内存区域透彻分析 深入理解 Java 虚拟机(第二弹) - 常用 vm 参数分析 深入理解 Java 虚拟机-如何利用 Visual ...

  10. 深入理解Java虚拟机-如何利用 JDK 自带的命令行工具监控上百万的高并发的虚拟机性能

    点击上方 好好学java ,选择 星标 公众号 重磅资讯.干货,第一时间送达 今日推荐:打卡活动第二期来啦,100% 能获得奖品个人原创+1博客:点击前往,查看更多 虚拟机系列文章 深入理解 Java ...

最新文章

  1. python网站开发实例-【9】Python接口开发:flask Demo实例
  2. java join()源码_Java Thread的join() 之刨根问底
  3. webservice的css哪里添加,jQuery_XML+XSLT+CSS+JQuery+WebService组建Asp.Net网(2), 3.       更 - phpStudy...
  4. mysql 5.5 重新编译_源码编译mysql5.5过程记录
  5. 尤雨溪写的100多行的“玩具 vite”,十分有助于理解 vite 原理
  6. 通过电话号码获取姓名 (+86或者飞信)
  7. java与java ee_Java EE 7社区调查结果!
  8. 台式计算机技术参数响应表,联想台式电脑配置推荐及参数详情【图文】
  9. 新浪微博自动发送微博 功能已实现(net)
  10. 李开复谈软件外包及软件安全(一)
  11. 体育健身类毕业论文文献有哪些?
  12. 数据质量监控工具-Apache Griffin
  13. 上山的路上,总得给自己一点阳光。
  14. EMC共模干扰与差模干扰是什么?怎么解决?
  15. 计算机毕业设计ssm校园竞赛管理系统设计与实现hyr9b系统+程序+源码+lw+远程部署
  16. Android_插值器
  17. Java实现TCP的长短链接
  18. ai如何旋转画布_Illustrator让一个图形沿着某一点或顶点旋转复制教程
  19. Android中使用logger打印完整的okhttp网络请求和响应的所有相关信息(请求行、请求头、请求体、响应行、响应行、响应头、响应体)
  20. 回文是指正读反读均相同的字符序列;如“abba”和“abdba”均是回文,但“good”不是回文。试写一个算法判定给定的字符序列是否是回文。

热门文章

  1. Android layoutInflate.inflate 方法具体解释,removeView()错误解决
  2. linux内核之同步
  3. Buddy(伙伴)系统分配器之分配page
  4. linux内核分析与应用 -- 并发(下)
  5. windows 编译FFMPEG
  6. linux 下 ffmpeg 库怎么才可以调试
  7. 1106 Lowest Price in Supply Chain(25 分)
  8. 用递归求字符串的全组合
  9. python中的列表推导与生成器
  10. python中的闭包与装饰器