使用参考

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

查看所有属性

  1. [arthas@24264]$ sysprop
  2. KEY VALUE
  3. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  4. awt.toolkit sun.awt.X11.XToolkit
  5. file.encoding.pkg sun.io
  6. java.specification.version 1.8
  7. sun.cpu.isalist
  8. sun.jnu.encoding UTF-8
  9. java.class.path ./like/target/interaction-like.jar
  10. java.vm.vendor Oracle Corporation
  11. sun.arch.data.model 64
  12. com.alibaba.csp.ahas.shaded.com.ali true
  13. baba.metrics.struct_reporter.init_f
  14. lag
  15. java.vendor.url http://java.oracle.com/
  16. user.timezone Asia/Shanghai
  17. os.name Linux
  18. java.vm.specification.version 1.8
  19. user.country US
  20. sun.java.launcher SUN_STANDARD
  21. sun.boot.library.path /usr/local/jdk1.8.0_161/jre/lib/amd64
  22. sun.java.command ./like/target/interaction-like.jar --spring.profiles.active=fat
  23. sun.cpu.endian little
  24. user.home /home/webuser
  25. user.language en
  26. java.specification.vendor Oracle Corporation
  27. java.home /usr/local/jdk1.8.0_161/jre
  28. file.separator /
  29. line.separator
  30. java.vm.specification.vendor Oracle Corporation
  31. java.specification.name Java Platform API Specification
  32. ahas.version 1.8.4_1.8.7
  33. java.awt.graphicsenv sun.awt.X11GraphicsEnvironment
  34. java.awt.headless true
  35. sun.boot.class.path /usr/local/jdk1.8.0_161/jre/lib/resources.jar:/usr/local/jdk1.8.0_161/jre/lib/rt.jar:/usr/local/jdk1.8.0_161/jre/lib/sunrsasign.jar:/usr/local/jdk1
  36. .8.0_161/jre/lib/jsse.jar:/usr/local/jdk1.8.0_161/jre/lib/jce.jar:/usr/local/jdk1.8.0_161/jre/lib/charsets.jar:/usr/local/jdk1.8.0_161/jre/lib/jfr.
  37. jar:/usr/local/jdk1.8.0_161/jre/classes
  38. java.protocol.handler.pkgs org.springframework.boot.loader
  39. sun.management.compiler HotSpot 64-Bit Tiered Compilers
  40. java.runtime.version 1.8.0_161-b12
  41. user.name webuser
  42. path.separator :
  43. os.version 3.10.0-229.el7.x86_64
  44. java.endorsed.dirs /usr/local/jdk1.8.0_161/jre/lib/endorsed
  45. java.runtime.name Java(TM) SE Runtime Environment
  46. file.encoding UTF-8
  47. spring.beaninfo.ignore true
  48. sun.nio.ch.bugLevel
  49. java.vm.name Java HotSpot(TM) 64-Bit Server VM
  50. jetty.git.hash b1e6b55512e008f7fbdf1cbea4ff8a6446d1073b
  51. java.vendor.url.bug http://bugreport.sun.com/bugreport/
  52. java.io.tmpdir /tmp
  53. com.zaxxer.hikari.pool_number 1
  54. java.version 1.8.0_161
  55. user.dir /home/webuser/middleplatform-interaction
  56. os.arch amd64
  57. PID 24264
  58. java.vm.specification.name Java Virtual Machine Specification
  59. java.awt.printerjob sun.print.PSPrinterJob
  60. app.id 100076
  61. sun.os.patch.level unknown
  62. java.library.path /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
  63. java.vm.info mixed mode
  64. java.vendor Oracle Corporation
  65. java.vm.version 25.161-b12
  66. java.ext.dirs /usr/local/jdk1.8.0_161/jre/lib/ext:/usr/java/packages/lib/ext
  67. sun.io.unicode.encoding UnicodeLittle
  68. java.class.version 52.0
  69. apollo.meta http://beta.config.csdn.net:8080

查看单个属性

支持通过TAB键自动补全

$ sysprop java.version
java.version=1.8.0_51

修改单个属性

$ sysprop user.country
user.country=US
$ sysprop user.country CN
Successfully changed the system property.
user.country=CN