jvm

查看当前JVM信息

使用参考

  1. $ jvm
  2. CATEGORY INFO
  3. ------------------------------------------------------------------------------------------------------------------------------------
  4.  
  5. RUNTIME MACHINE-NAME hellodeMacBook-Air.local
  6. JVM-START-TIME 2015-12-23 10:54:18
  7. MANAGEMENT-SPEC-VERSION 1.2
  8. SPEC-NAME Java Virtual Machine Specification
  9. SPEC-VENDOR Oracle Corporation
  10. SPEC-VERSION 1.8
  11. VM-NAME Java HotSpot(TM) 64-Bit Server VM
  12. VM-VENDOR Oracle Corporation
  13. VM-VERSION 25.60-b23
  14. INPUT-ARGUMENTS -Xbootclasspath/a:/Users/hello/.jenv/versions/1.8/lib/tools.jar
  15. -Djava.util.logging.config.file=/Users/hello/code/java/crash/packaging/target/
  16. conf/logging.properties
  17.  
  18. CLASS-PATH /Users/hello/.jenv/versions/1.8/lib/tools.jar:/Users/hello/code/java/cras
  19. h/packaging/target/bin/crash.cli-1.3.2-SNAPSHOT.jar::/Users/hello/code/java/cr
  20. ash/packaging/target/lib/bcpkix-jdk15on-1.51.jar:/Users/hello/code/java/crash/
  21. packaging/target/lib/bcprov-jdk15on-1.51.jar:/Users/hello/code/java/crash/pack
  22. aging/target/lib/crash.connectors.ssh-1.3.2-SNAPSHOT-standalone.jar:/Users/hengyuna
  23. bc/code/java/crash/packaging/target/lib/crash.connectors.telnet-1.3.2-SNAPSHOT-stan
  24. dalone.jar:/Users/hello/code/java/crash/packaging/target/lib/crash.shell-1.3.2
  25. -SNAPSHOT.jar:/Users/hello/code/java/crash/packaging/target/lib/groovy-all-1.8
  26. .9.jar:/Users/hello/code/java/crash/packaging/target/lib/ivy-2.2.0.jar
  27. BOOT-CLASS-PATH /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/resources.j
  28. ar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/rt.jar:/
  29. Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/sunrsasign.j
  30. ar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/jsse.jar
  31. :/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/jce.jar:/L
  32. ibrary/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/charsets.jar:
  33. /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/jfr.jar:/Li
  34. brary/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/classes:/Users/hen
  35. gyunabc/.jenv/versions/1.8/lib/tools.jar
  36. LIBRARY-PATH /Users/hello/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library
  37. /Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
  38.  
  39. CLASS-LOADING LOADED-CLASS-COUNT 4264
  40. TOTAL-LOADED-CLASS-COUNT 4264
  41. UNLOADED-CLASS-COUNT 0
  42. IS-VERBOSE false
  43.  
  44. COMPILATION NAME HotSpot 64-Bit Tiered Compilers
  45. TOTAL-COMPILE-TIME 5145(ms)
  46.  
  47. GARBAGE-COLLECTORS PS Scavenge 6/74(ms)
  48. [count/time]
  49. PS MarkSweep 1/64(ms)
  50. [count/time]
  51.  
  52. MEMORY-MANAGERS CodeCacheManager Code Cache
  53.  
  54. Metaspace Manager Metaspace
  55. Compressed Class Space
  56.  
  57. PS Scavenge PS Eden Space
  58. PS Survivor Space
  59.  
  60. PS MarkSweep PS Eden Space
  61. PS Survivor Space
  62. PS Old Gen
  63.  
  64. MEMORY HEAP-MEMORY-USAGE 1073741824(1.00 GiB)/1073741824(1.00 GiB)/5242880000(4.88 GiB)/278637584(265.73 MiB)
  65. [committed/init/max/used]
  66. NO-HEAP-MEMORY-USAGE 172597248(164.60 MiB)/2555904(2.44 MiB)/1862270976(1.73 GiB)/166521144(158.81 MiB)
  67. [committed/init/max/used]
  68. PENDING-FINALIZE-COUNT 0
  69.  
  70. OPERATING-SYSTEM OS Mac OS X
  71. ARCH x86_64
  72. PROCESSORS-COUNT 4
  73. LOAD-AVERAGE 2.328125
  74. VERSION 10.10.5
  75.  
  76. THREAD COUNT 16
  77. DAEMON-COUNT 10
  78. PEAK-COUNT 18
  79. STARTED-COUNT 19
  80. DEADLOCK-COUNT 0
  81.  
  82. FILE-DESCRIPTOR
  83.  
  84. MAX-FILE-DESCRIPTOR-COUNT 10240
  85. OPEN-FILE-DESCRIPTOR-COUNT 648
  86.  
  87. Affect cost in 2 ms.

THREAD相关

  • COUNT: JVM当前活跃的线程数
  • DAEMON-COUNT: JVM当前活跃的守护线程数
  • PEAK-COUNT: 从JVM启动开始曾经活着的最大线程数
  • STARTED-COUNT: 从JVM启动开始总共启动过的线程次数
  • DEADLOCK-COUNT: JVM当前死锁的线程数

文件描述符相关

  • MAX-FILE-DESCRIPTOR-COUNT:JVM进程最大可以打开的文件描述符数
  • OPEN-FILE-DESCRIPTOR-COUNT:JVM当前打开的文件描述符数

原文: https://alibaba.github.io/arthas/jvm.html