diff --git a/site/src/site/sphinx/commands.md b/site/src/site/sphinx/commands.md index 9c33d14cc..c341d800c 100644 --- a/site/src/site/sphinx/commands.md +++ b/site/src/site/sphinx/commands.md @@ -5,6 +5,7 @@ * [thread](thread.md) * [jvm](jvm.md) * [sysprop](sysprop.md) +* [sysenv](sysenv.md) * [getstatic](getstatic.md) * [ognl](ognl.md) diff --git a/site/src/site/sphinx/en/commands.md b/site/src/site/sphinx/en/commands.md index 978666e55..3760cb259 100644 --- a/site/src/site/sphinx/en/commands.md +++ b/site/src/site/sphinx/en/commands.md @@ -5,6 +5,7 @@ All Commands * [thread](thread.md) * [jvm](jvm.md) * [sysprop](sysprop.md) +* [sysenv](sysenv.md) * [getstatic](getstatic.md) * [ognl](ognl.md) diff --git a/site/src/site/sphinx/en/sysenv.md b/site/src/site/sphinx/en/sysenv.md new file mode 100644 index 000000000..2ba9d2369 --- /dev/null +++ b/site/src/site/sphinx/en/sysenv.md @@ -0,0 +1,73 @@ +sysenv +======================= + +> View the current JVM environment variables. + +### Usage + +``` + USAGE: + sysenv [-h] [env-name] + + SUMMARY: + Display the system env. + + EXAMPLES: + sysenv + sysenv USER + + WIKI: + https://alibaba.github.io/arthas/sysenv + + OPTIONS: + -h, --help this help + env name + ``` + +#### View all environment variables + + +``` +$ sysenv + KEY VALUE +---------------------------------------------------------------------------------------------------------------------------- + PATH /Users/admin/.sdkman/candidates/visualvm/current/bin:/Users/admin/.sdkman/candidates/ja + va/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/ + MacOS + SDKMAN_VERSION 5.7.3+337 + JAVA_HOME /Users/admin/.sdkman/candidates/java/current + JAVA_MAIN_CLASS_65244 demo.MathGame + TERM xterm-256color + LANG zh_CN.UTF-8 + AUTOJUMP_SOURCED 1 + COLORTERM truecolor + LOGNAME admin + XPC_SERVICE_NAME 0 + PWD /Users/admin/code/ali/arthas/demo + TERM_PROGRAM_VERSION 3.2.5 + _ /Users/admin/.sdkman/candidates/java/current/bin/java + SHELL /bin/bash + TERM_PROGRAM iTerm.app + SDKMAN_PLATFORM Darwin + USER admin + ITERM_PROFILE Default + TMPDIR /var/folders/0r/k561bkk917gg972stqclbz9h0000gn/T/ + XPC_FLAGS 0x0 + TERM_SESSION_ID w0t4p0:60BC264D-9649-42AC-A7E4-AF85B69F93F8 + __CF_USER_TEXT_ENCODING 0x1F5:0x19:0x34 + Apple_PubSub_Socket_Ren /private/tmp/com.apple.launchd.DwmmjSQsll/Render + der + COLORFGBG 7;0 + HOME /Users/admin + SHLVL 1 + AUTOJUMP_ERROR_PATH /Users/admin/Library/autojump/errors.log +``` + +#### View individual environment variables + +> Use `tab` for auto-completion + +``` +$ sysenv USER +USER=admin +``` diff --git a/site/src/site/sphinx/sysenv.md b/site/src/site/sphinx/sysenv.md new file mode 100644 index 000000000..32a571ff5 --- /dev/null +++ b/site/src/site/sphinx/sysenv.md @@ -0,0 +1,73 @@ +sysenv +======================= + +> 查看当前JVM的环境属性(`System Environment Variables`) + +### 使用参考 + +``` + USAGE: + sysenv [-h] [env-name] + + SUMMARY: + Display the system env. + + EXAMPLES: + sysenv + sysenv USER + + WIKI: + https://alibaba.github.io/arthas/sysenv + + OPTIONS: + -h, --help this help + env name + ``` + +#### 查看所有环境变量 + + +``` +$ sysenv + KEY VALUE +---------------------------------------------------------------------------------------------------------------------------- + PATH /Users/admin/.sdkman/candidates/visualvm/current/bin:/Users/admin/.sdkman/candidates/ja + va/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/ + MacOS + SDKMAN_VERSION 5.7.3+337 + JAVA_HOME /Users/admin/.sdkman/candidates/java/current + JAVA_MAIN_CLASS_65244 demo.MathGame + TERM xterm-256color + LANG zh_CN.UTF-8 + AUTOJUMP_SOURCED 1 + COLORTERM truecolor + LOGNAME admin + XPC_SERVICE_NAME 0 + PWD /Users/admin/code/ali/arthas/demo + TERM_PROGRAM_VERSION 3.2.5 + _ /Users/admin/.sdkman/candidates/java/current/bin/java + SHELL /bin/bash + TERM_PROGRAM iTerm.app + SDKMAN_PLATFORM Darwin + USER admin + ITERM_PROFILE Default + TMPDIR /var/folders/0r/k561bkk917gg972stqclbz9h0000gn/T/ + XPC_FLAGS 0x0 + TERM_SESSION_ID w0t4p0:60BC264D-9649-42AC-A7E4-AF85B69F93F8 + __CF_USER_TEXT_ENCODING 0x1F5:0x19:0x34 + Apple_PubSub_Socket_Ren /private/tmp/com.apple.launchd.DwmmjSQsll/Render + der + COLORFGBG 7;0 + HOME /Users/admin + SHLVL 1 + AUTOJUMP_ERROR_PATH /Users/admin/Library/autojump/errors.log +``` + +#### 查看单个环境变量 + +> 支持通过`TAB`键自动补全 + +``` +$ sysenv USER +USER=admin +```