diff --git a/site/src/site/sphinx/en/advanced-use.md b/site/src/site/sphinx/en/advanced-use.md index 31d413bcc..d3e8d4e75 100644 --- a/site/src/site/sphinx/en/advanced-use.md +++ b/site/src/site/sphinx/en/advanced-use.md @@ -3,13 +3,13 @@ Advanced Usage ## Basic -- help - show help info -- cls - clear out the current screen -- session - check details of the current session -- [reset](reset.md) - reset all injected/enhanced classes -- version - print the version of the Arthas attaching to the current target process -- quit/exit - exit the current Arthas client without affecting other clients -- shutdown - terminate the Arthas server and all clients +* help - show help info +* cls - clear out the current screen +* session - check details of the current session +* [reset](reset.md) - reset all injected/enhanced classes +* version - print the version of the Arthas attaching to the current target process +* quit/exit - exit the current Arthas client without affecting other clients +* shutdown - terminate the Arthas server and all clients ## JVM diff --git a/site/src/site/sphinx/en/reset.md b/site/src/site/sphinx/en/reset.md new file mode 100644 index 000000000..d32d8dc5d --- /dev/null +++ b/site/src/site/sphinx/en/reset.md @@ -0,0 +1,54 @@ +reset +=== + +> Reset all classes that have been enhanced by Arthas, and all enhanced classes will be reset when Arthas server `shutdown`. + +### Usage + +``` +$ reset -h + USAGE: + reset [-h] [-E] [class-pattern] + + SUMMARY: + Reset all the enhanced classes + + EXAMPLES: + reset + reset *List + reset -E .*List + + OPTIONS: + -h, --help this help + -E, --regex Enable regular expression to match (wildcard matching by default) + Path and classname of Pattern Matching +``` + +### Reset specified class + +``` +$ trace Test test +Press Ctrl+C to abort. +Affect(class-cnt:1 , method-cnt:1) cost in 57 ms. +`---ts=2017-10-26 17:10:33;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc + `---[0.590102ms] Test:test() + +`---ts=2017-10-26 17:10:34;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc + `---[0.068692ms] Test:test() + +$ reset Test +Affect(class-cnt:1 , method-cnt:0) cost in 11 ms. +``` + +### Reset all classes + +``` +$ trace Test test +Press Ctrl+C to abort. +Affect(class-cnt:1 , method-cnt:1) cost in 15 ms. +`---ts=2017-10-26 17:12:06;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc + `---[0.128518ms] Test:test() + +$ reset +Affect(class-cnt:1 , method-cnt:0) cost in 9 ms. +``` \ No newline at end of file diff --git a/site/src/site/sphinx/reset.md b/site/src/site/sphinx/reset.md index 3c9b53681..ecdd1cbcc 100644 --- a/site/src/site/sphinx/reset.md +++ b/site/src/site/sphinx/reset.md @@ -1,7 +1,7 @@ reset命令 === -> 重置增强类,将被 Arthas 增强过的类全部还原,Arthas 服务端关闭时会重置所有增强过的类 +> 重置增强类,将被 Arthas 增强过的类全部还原,Arthas 服务端`shutdown`时会重置所有增强过的类 ### 使用参考