jvm

查看当前JVM信息

使用参考

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