diff --git a/core/src/main/java/com/taobao/arthas/core/command/BuiltinCommandPack.java b/core/src/main/java/com/taobao/arthas/core/command/BuiltinCommandPack.java index a067cf361..0c70cf71c 100644 --- a/core/src/main/java/com/taobao/arthas/core/command/BuiltinCommandPack.java +++ b/core/src/main/java/com/taobao/arthas/core/command/BuiltinCommandPack.java @@ -91,8 +91,6 @@ public class BuiltinCommandPack implements CommandResolver { commands.add(Command.create(ClsCommand.class)); commands.add(Command.create(ResetCommand.class)); commands.add(Command.create(VersionCommand.class)); - commands.add(Command.create(ShutdownCommand.class)); - commands.add(Command.create(StopCommand.class)); commands.add(Command.create(SessionCommand.class)); commands.add(Command.create(SystemPropertyCommand.class)); commands.add(Command.create(SystemEnvCommand.class)); @@ -105,5 +103,7 @@ public class BuiltinCommandPack implements CommandResolver { commands.add(Command.create(GrepCommand.class)); commands.add(Command.create(TeeCommand.class)); commands.add(Command.create(ProfilerCommand.class)); + commands.add(Command.create(ShutdownCommand.class)); + commands.add(Command.create(StopCommand.class)); } } diff --git a/core/src/main/java/com/taobao/arthas/core/command/basic1000/ShutdownCommand.java b/core/src/main/java/com/taobao/arthas/core/command/basic1000/ShutdownCommand.java index 5516b12b4..7fc2bd63c 100644 --- a/core/src/main/java/com/taobao/arthas/core/command/basic1000/ShutdownCommand.java +++ b/core/src/main/java/com/taobao/arthas/core/command/basic1000/ShutdownCommand.java @@ -6,6 +6,7 @@ import com.taobao.arthas.core.shell.command.AnnotatedCommand; import com.taobao.arthas.core.shell.command.CommandProcess; import com.taobao.arthas.core.util.affect.EnhancerAffect; import com.taobao.arthas.core.util.matcher.WildcardMatcher; +import com.taobao.middleware.cli.annotations.Hidden; import com.taobao.middleware.cli.annotations.Name; import com.taobao.middleware.cli.annotations.Summary; @@ -20,6 +21,7 @@ import java.lang.instrument.UnmodifiableClassException; */ @Name("shutdown") @Summary("Shutdown Arthas server and exit the console") +@Hidden public class ShutdownCommand extends AnnotatedCommand { @Override public void process(CommandProcess process) { diff --git a/core/src/main/java/com/taobao/arthas/core/command/basic1000/StopCommand.java b/core/src/main/java/com/taobao/arthas/core/command/basic1000/StopCommand.java index 23a7e940e..42a4260e8 100644 --- a/core/src/main/java/com/taobao/arthas/core/command/basic1000/StopCommand.java +++ b/core/src/main/java/com/taobao/arthas/core/command/basic1000/StopCommand.java @@ -11,7 +11,7 @@ import com.taobao.middleware.cli.annotations.Summary; * @see ShutdownCommand */ @Name("stop") -@Summary("Stop/Shutdown Arthas server and exit the console. Alias for shutdown.") +@Summary("Stop/Shutdown Arthas server and exit the console.") public class StopCommand extends AnnotatedCommand { @Override public void process(CommandProcess process) { diff --git a/site/src/site/sphinx/advanced-use.md b/site/src/site/sphinx/advanced-use.md index c32cad04f..9f46705fe 100644 --- a/site/src/site/sphinx/advanced-use.md +++ b/site/src/site/sphinx/advanced-use.md @@ -15,7 +15,7 @@ * version——输出当前目标 Java 进程所加载的 Arthas 版本号 * history——打印命令历史 * quit——退出当前 Arthas 客户端,其他 Arthas 客户端不受影响 -* stop/shutdown——关闭 Arthas 服务端,所有 Arthas 客户端全部退出 +* stop——关闭 Arthas 服务端,所有 Arthas 客户端全部退出 * [keymap](keymap.md)——Arthas快捷键列表及自定义快捷键 ## jvm相关 @@ -47,7 +47,7 @@ ## monitor/watch/trace相关 -> 请注意,这些命令,都通过字节码增强技术来实现的,会在指定类的方法中插入一些切面来实现数据统计和观测,因此在线上、预发使用时,请尽量明确需要观测的类、方法以及条件,诊断结束要执行 `shutdown` 或将增强过的类执行 `reset` 命令。 +> 请注意,这些命令,都通过字节码增强技术来实现的,会在指定类的方法中插入一些切面来实现数据统计和观测,因此在线上、预发使用时,请尽量明确需要观测的类、方法以及条件,诊断结束要执行 `stop` 或将增强过的类执行 `reset` 命令。 * [monitor](monitor.md)——方法执行监控 * [watch](watch.md)——方法执行数据观测 diff --git a/site/src/site/sphinx/commands.md b/site/src/site/sphinx/commands.md index 7451606a7..6b4000141 100644 --- a/site/src/site/sphinx/commands.md +++ b/site/src/site/sphinx/commands.md @@ -46,6 +46,5 @@ * version——输出当前目标 Java 进程所加载的 Arthas 版本号 * history——打印命令历史 * quit——退出当前 Arthas 客户端,其他 Arthas 客户端不受影响 -* stop——和`shutdown`命令一致(推荐使用,避免误操作) -* shutdown——关闭 Arthas 服务端,所有 Arthas 客户端全部退出 +* stop——关闭 Arthas 服务端,所有 Arthas 客户端全部退出 * [keymap](keymap.md)——Arthas快捷键列表及自定义快捷键 \ No newline at end of file diff --git a/site/src/site/sphinx/en/advanced-use.md b/site/src/site/sphinx/en/advanced-use.md index 6a607bcf4..93ca3624e 100644 --- a/site/src/site/sphinx/en/advanced-use.md +++ b/site/src/site/sphinx/en/advanced-use.md @@ -10,11 +10,11 @@ Advanced Usage * [tee](tee.md) - Copies standard input to standard output, making a copy in zero or more files. * [pwd](pwd.md) - Return working directory name * session - display current session information -* [reset](reset.md) - reset all the enhanced classes. All enhanced classes will also be reset when Arthas server is closed by `stop/shutdown` +* [reset](reset.md) - reset all the enhanced classes. All enhanced classes will also be reset when Arthas server is closed by `stop` * version - print the version for the Arthas attached to the current Java process * history - view command history * quit/exit - exit the current Arthas session, without effecting other sessions -* stop/shutdown - terminate the Arthas server, all Arthas sessions will be destroyed +* stop - terminate the Arthas server, all Arthas sessions will be destroyed * [keymap](keymap.md) - keymap for Arthas keyboard shortcut ## JVM diff --git a/site/src/site/sphinx/en/commands.md b/site/src/site/sphinx/en/commands.md index 8a9f78f1c..b2497573a 100644 --- a/site/src/site/sphinx/en/commands.md +++ b/site/src/site/sphinx/en/commands.md @@ -47,8 +47,7 @@ All Commands * version - print out Arthas's version * history - view command history * quit - exit the current Arthas client without affecting other clients -* stop - the same as `shutdown` command -* shutdown - terminate the Arthas server, all the Arthas clients connecting to this server will be disconnected +* stop - terminate the Arthas server, all the Arthas clients connecting to this server will be disconnected * [keymap](keymap.md) - list all Arthas keyboard shortcuts and shortcut customizations. diff --git a/site/src/site/sphinx/en/reset.md b/site/src/site/sphinx/en/reset.md index ebdec1b03..2749d9cd6 100644 --- a/site/src/site/sphinx/en/reset.md +++ b/site/src/site/sphinx/en/reset.md @@ -1,7 +1,7 @@ reset === -> Reset all classes that have been enhanced by Arthas. These enhanced classes will also be reset when Arthas server is `stop/shutdown`. +> Reset all classes that have been enhanced by Arthas. These enhanced classes will also be reset when Arthas server is `stop`. ### Usage diff --git a/site/src/site/sphinx/quick-start.md b/site/src/site/sphinx/quick-start.md index b17a751c8..3bb85abc1 100644 --- a/site/src/site/sphinx/quick-start.md +++ b/site/src/site/sphinx/quick-start.md @@ -230,4 +230,4 @@ ts=2018-11-28 19:22:35; [cost=29.969732ms] result=@ArrayList[ 如果只是退出当前的连接,可以用`quit`或者`exit`命令。Attach到目标进程上的arthas还会继续运行,端口会保持开放,下次连接时可以直接连接上。 -如果想完全退出arthas,可以执行`stop/shutdown`命令。 +如果想完全退出arthas,可以执行`stop`命令。 diff --git a/site/src/site/sphinx/reset.md b/site/src/site/sphinx/reset.md index 9435aa459..5999a5e26 100644 --- a/site/src/site/sphinx/reset.md +++ b/site/src/site/sphinx/reset.md @@ -1,7 +1,7 @@ reset命令 === -> 重置增强类,将被 Arthas 增强过的类全部还原,Arthas 服务端`stop/shutdown`时会重置所有增强过的类 +> 重置增强类,将被 Arthas 增强过的类全部还原,Arthas 服务端`stop`时会重置所有增强过的类 ### 使用参考