hide the shutdown command. #982

pull/329/merge
hengyunabc 5 years ago
parent 5abcb65ef3
commit ee08fa5b34

@ -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));
}
}

@ -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) {

@ -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) {

@ -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)——方法执行数据观测

@ -46,6 +46,5 @@
* version——输出当前目标 Java 进程所加载的 Arthas 版本号
* history——打印命令历史
* quit——退出当前 Arthas 客户端,其他 Arthas 客户端不受影响
* stop——和`shutdown`命令一致(推荐使用,避免误操作)
* shutdown——关闭 Arthas 服务端,所有 Arthas 客户端全部退出
* stop——关闭 Arthas 服务端,所有 Arthas 客户端全部退出
* [keymap](keymap.md)——Arthas快捷键列表及自定义快捷键

@ -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

@ -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.

@ -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

@ -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`命令。

@ -1,7 +1,7 @@
reset命令
===
> 重置增强类,将被 Arthas 增强过的类全部还原Arthas 服务端`stop/shutdown`时会重置所有增强过的类
> 重置增强类,将被 Arthas 增强过的类全部还原Arthas 服务端`stop`时会重置所有增强过的类
### 使用参考

Loading…
Cancel
Save