sysprop

查看当前JVM的系统属性(System Property)

使用参考

  1. USAGE:
  2. sysprop [-h] [property-name] [property-value]
  3.  
  4. SUMMARY:
  5. Display, and change all the system properties.
  6.  
  7. EXAMPLES:
  8. sysprop
  9. sysprop file.encoding
  10. sysprop production.mode true
  11.  
  12. WIKI:
  13. https://alibaba.github.io/arthas/sysprop
  14.  
  15. OPTIONS:
  16. -h, --help this help
  17. <property-name> property name
  18. <property-value> property value

查看所有属性

  1. $ sysprop
  2. KEY VALUE
  3. -------------------------------------------------------------------------------------------------------------------------------------
  4. java.runtime.name Java(TM) SE Runtime Environment
  5. sun.boot.library.path /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib
  6. java.vm.version 25.51-b03
  7. user.country.format CN
  8. gopherProxySet false
  9. java.vm.vendor Oracle Corporation
  10. java.vendor.url http://java.oracle.com/
  11. path.separator :
  12. java.vm.name Java HotSpot(TM) 64-Bit Server VM
  13. file.encoding.pkg sun.io
  14. user.country US
  15. sun.java.launcher SUN_STANDARD
  16. sun.os.patch.level unknown
  17. java.vm.specification.name Java Virtual Machine Specification
  18. user.dir /private/var/tmp
  19. java.runtime.version 1.8.0_51-b16
  20. java.awt.graphicsenv sun.awt.CGraphicsEnvironment
  21. java.endorsed.dirs /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/endors
  22. ed
  23. os.arch x86_64
  24. java.io.tmpdir /var/folders/2c/tbxwzs4s4sbcvh7frbcc7n000000gn/T/
  25. line.separator
  26.  
  27. java.vm.specification.vendor Oracle Corporation
  28. os.name Mac OS X
  29. sun.jnu.encoding UTF-8
  30. java.library.path /Users/wangtao/Library/Java/Extensions:/Library/Java/Extensions:/Network/Libra
  31. ry/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
  32. sun.nio.ch.bugLevel
  33. java.specification.name Java Platform API Specification
  34. java.class.version 52.0
  35. sun.management.compiler HotSpot 64-Bit Tiered Compilers
  36. os.version 10.12.6
  37. user.home /Users/wangtao
  38. user.timezone Asia/Shanghai
  39. java.awt.printerjob sun.lwawt.macosx.CPrinterJob
  40. file.encoding UTF-8
  41. java.specification.version 1.8
  42. user.name wangtao
  43. java.class.path .
  44. java.vm.specification.version 1.8
  45. sun.arch.data.model 64
  46. java.home /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre
  47. sun.java.command Test
  48. java.specification.vendor Oracle Corporation
  49. user.language en
  50. awt.toolkit sun.lwawt.macosx.LWCToolkit
  51. java.vm.info mixed mode
  52. java.version 1.8.0_51
  53. java.ext.dirs /Users/wangtao/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.
  54. 8.0_51.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library
  55. /Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
  56. sun.boot.class.path /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/resour
  57. ces.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/li
  58. b/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/l
  59. ib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/H
  60. ome/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Content
  61. s/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Conte
  62. nts/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jd
  63. k/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.
  64. jdk/Contents/Home/jre/classes
  65. java.vendor Oracle Corporation
  66. file.separator /
  67. java.vendor.url.bug http://bugreport.sun.com/bugreport/
  68. sun.cpu.endian little
  69. sun.io.unicode.encoding UnicodeBig
  70. sun.cpu.isalist

查看单个属性

支持通过TAB键自动补全
  1. $ sysprop java.version
  2. java.version=1.8.0_51

修改单个属性

  1. $ sysprop user.country
  2. user.country=US
  3. $ sysprop user.country CN
  4. Successfully changed the system property.
  5. user.country=CN

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