From 96bb9be0d6abf8e60a7950df5e37ed7adcbe3025 Mon Sep 17 00:00:00 2001 From: Hollow Man Date: Thu, 23 Jul 2020 16:22:54 +0800 Subject: [PATCH] =?UTF-8?q?Arthas=20pwd=20=E5=91=BD=E4=BB=A4=E6=95=99?= =?UTF-8?q?=E7=A8=8B=20(#1323)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add pwd command scenario. #847 Signed-off-by: hollowman6 * fix link typo Signed-off-by: hollowman6 * remove '--target-ip 0.0.0.0' in arthas-boot.md Signed-off-by: hollowman6 --- site/src/site/sphinx/en/pwd.md | 2 ++ site/src/site/sphinx/pwd.md | 2 ++ .../katacoda/command-pwd-cn/arthas-boot.md | 16 +++++++++ .../katacoda/command-pwd-cn/arthas-demo.md | 10 ++++++ tutorials/katacoda/command-pwd-cn/finish.md | 10 ++++++ tutorials/katacoda/command-pwd-cn/index.json | 33 +++++++++++++++++++ tutorials/katacoda/command-pwd-cn/intro.md | 11 +++++++ tutorials/katacoda/command-pwd-cn/pwd.md | 4 +++ .../katacoda/command-pwd-en/arthas-boot.md | 15 +++++++++ .../katacoda/command-pwd-en/arthas-demo.md | 11 +++++++ tutorials/katacoda/command-pwd-en/finish.md | 6 ++++ tutorials/katacoda/command-pwd-en/index.json | 33 +++++++++++++++++++ tutorials/katacoda/command-pwd-en/intro.md | 11 +++++++ tutorials/katacoda/command-pwd-en/pwd.md | 4 +++ 14 files changed, 168 insertions(+) create mode 100644 tutorials/katacoda/command-pwd-cn/arthas-boot.md create mode 100644 tutorials/katacoda/command-pwd-cn/arthas-demo.md create mode 100644 tutorials/katacoda/command-pwd-cn/finish.md create mode 100644 tutorials/katacoda/command-pwd-cn/index.json create mode 100644 tutorials/katacoda/command-pwd-cn/intro.md create mode 100644 tutorials/katacoda/command-pwd-cn/pwd.md create mode 100644 tutorials/katacoda/command-pwd-en/arthas-boot.md create mode 100644 tutorials/katacoda/command-pwd-en/arthas-demo.md create mode 100644 tutorials/katacoda/command-pwd-en/finish.md create mode 100644 tutorials/katacoda/command-pwd-en/index.json create mode 100644 tutorials/katacoda/command-pwd-en/intro.md create mode 100644 tutorials/katacoda/command-pwd-en/pwd.md diff --git a/site/src/site/sphinx/en/pwd.md b/site/src/site/sphinx/en/pwd.md index 12f26292f..8b473a338 100644 --- a/site/src/site/sphinx/en/pwd.md +++ b/site/src/site/sphinx/en/pwd.md @@ -1,6 +1,8 @@ pwd === +[`pwd` online tutorial](https://alibaba.github.io/arthas/arthas-tutorials?language=en&id=command-pwd) + > Return working directory name diff --git a/site/src/site/sphinx/pwd.md b/site/src/site/sphinx/pwd.md index 8af1c47f6..d71709566 100644 --- a/site/src/site/sphinx/pwd.md +++ b/site/src/site/sphinx/pwd.md @@ -1,6 +1,8 @@ pwd === +[`pwd`在线教程](https://alibaba.github.io/arthas/arthas-tutorials?language=cn&id=command-pwd) + > 返回当前的工作目录,和linux命令类似 diff --git a/tutorials/katacoda/command-pwd-cn/arthas-boot.md b/tutorials/katacoda/command-pwd-cn/arthas-boot.md new file mode 100644 index 000000000..84ef525a2 --- /dev/null +++ b/tutorials/katacoda/command-pwd-cn/arthas-boot.md @@ -0,0 +1,16 @@ + + + + +在新的`Terminal 2`里,下载`arthas-boot.jar`,再用`java -jar`命令启动: + +`wget https://alibaba.github.io/arthas/arthas-boot.jar +java -jar arthas-boot.jar`{{execute T2}} + +`arthas-boot`是`Arthas`的启动程序,它启动后,会列出所有的Java进程,用户可以选择需要诊断的目标进程。 + +选择第一个进程,输入 `1`{{execute T2}} ,再`Enter/回车`: + +Attach成功之后,会打印Arthas LOGO。输入 `help`{{execute T2}} 可以获取到更多的帮助信息。 + +![Arthas Boot](/arthas/scenarios/common-resources/assets/arthas-boot.png) diff --git a/tutorials/katacoda/command-pwd-cn/arthas-demo.md b/tutorials/katacoda/command-pwd-cn/arthas-demo.md new file mode 100644 index 000000000..f1136e88e --- /dev/null +++ b/tutorials/katacoda/command-pwd-cn/arthas-demo.md @@ -0,0 +1,10 @@ + + + + +下载`arthas-demo.jar`,再用`java -jar`命令启动: + +`wget https://alibaba.github.io/arthas/arthas-demo.jar +java -jar arthas-demo.jar`{{execute T1}} + +`arthas-demo`是一个很简单的程序,它随机生成整数,再执行因式分解,把结果打印出来。如果生成的随机数是负数,则会打印提示信息。 diff --git a/tutorials/katacoda/command-pwd-cn/finish.md b/tutorials/katacoda/command-pwd-cn/finish.md new file mode 100644 index 000000000..9dc12e525 --- /dev/null +++ b/tutorials/katacoda/command-pwd-cn/finish.md @@ -0,0 +1,10 @@ + +通过本教程基本掌握了Arthas pwd的用法。更多高级特性,可以在下面的进阶指南里继续了解。 + +* [Arthas进阶](https://alibaba.github.io/arthas/arthas-tutorials?language=cn&id=arthas-advanced) +* [Arthas Github](https://github.com/alibaba/arthas) +* [Arthas 文档](https://alibaba.github.io/arthas/) + +欢迎关注公众号,获取Arthas项目的信息,源码分析,案例实践。 + +![Arthas公众号](/arthas/scenarios/common-resources/assets/qrcode_gongzhonghao.jpg) diff --git a/tutorials/katacoda/command-pwd-cn/index.json b/tutorials/katacoda/command-pwd-cn/index.json new file mode 100644 index 000000000..3a3bb44c2 --- /dev/null +++ b/tutorials/katacoda/command-pwd-cn/index.json @@ -0,0 +1,33 @@ +{ + "title": "Arthas pwd命令教程", + "description": "Arthas pwd命令教程", + "details": { + "steps": [ + { + "title": "启动arthas-demo", + "text": "arthas-demo.md" + }, + { + "title": "启动arthas-boot", + "text": "arthas-boot.md" + }, + { + "title": "pwd 命令", + "text": "pwd.md" + } + ], + "intro": { + "text": "intro.md" + }, + "finish": { + "text": "finish.md" + } + }, + "environment": { + "uilayout": "terminal" + }, + "backend": { + "imageid": "java", + "environmentsprotocol": "http" + } +} \ No newline at end of file diff --git a/tutorials/katacoda/command-pwd-cn/intro.md b/tutorials/katacoda/command-pwd-cn/intro.md new file mode 100644 index 000000000..23669532b --- /dev/null +++ b/tutorials/katacoda/command-pwd-cn/intro.md @@ -0,0 +1,11 @@ + + + +![Arthas](https://alibaba.github.io/arthas/_images/arthas.png) + +`Arthas` 是Alibaba开源的Java诊断工具,深受开发者喜爱。在线排查问题,无需重启;动态跟踪Java代码;实时监控JVM状态。 + +`Arthas` 支持JDK 6+,支持Linux/Mac/Windows,采用命令行交互模式,同时提供丰富的 `Tab` 自动补全功能,进一步方便进行问题的定位和诊断。 + +* Github: https://github.com/alibaba/arthas +* 文档: https://alibaba.github.io/arthas/ \ No newline at end of file diff --git a/tutorials/katacoda/command-pwd-cn/pwd.md b/tutorials/katacoda/command-pwd-cn/pwd.md new file mode 100644 index 000000000..e5285be2c --- /dev/null +++ b/tutorials/katacoda/command-pwd-cn/pwd.md @@ -0,0 +1,4 @@ + +通过`pwd`命令可以获知当前的工作目录,和linux命令类似 + +`pwd`{{execute T2}} diff --git a/tutorials/katacoda/command-pwd-en/arthas-boot.md b/tutorials/katacoda/command-pwd-en/arthas-boot.md new file mode 100644 index 000000000..118df69d8 --- /dev/null +++ b/tutorials/katacoda/command-pwd-en/arthas-boot.md @@ -0,0 +1,15 @@ + + + +In the new `Terminal 2`, download `arthas-boot.jar` and start with the `java -jar` command: + +`wget https://alibaba.github.io/arthas/arthas-boot.jar +java -jar arthas-boot.jar`{{execute T2}} + +`arthas-boot` is the launcher for `Arthas`. It lists all the Java processes, and the user can select the target process to be diagnosed. + +Select the first process, type `1`{{execute T2}} ,then type `Enter`: + +After the Attach is successful, Arthas LOGO is printed. Enter `help`{{execute T2}} for more help. + +![Arthas Boot](/arthas/scenarios/common-resources/assets/arthas-boot.png) diff --git a/tutorials/katacoda/command-pwd-en/arthas-demo.md b/tutorials/katacoda/command-pwd-en/arthas-demo.md new file mode 100644 index 000000000..b15edea76 --- /dev/null +++ b/tutorials/katacoda/command-pwd-en/arthas-demo.md @@ -0,0 +1,11 @@ + + + + +Download `arthas-demo.jar` and start with the `java -jar` command: + +`wget https://alibaba.github.io/arthas/arthas-demo.jar +java -jar arthas-demo.jar`{{execute T1}} + +`arthas-demo` is a very simple program that randomly generates integers, performs factorization, and prints the results. +If the generated random number is negative, a error message will be printed. \ No newline at end of file diff --git a/tutorials/katacoda/command-pwd-en/finish.md b/tutorials/katacoda/command-pwd-en/finish.md new file mode 100644 index 000000000..2f057d424 --- /dev/null +++ b/tutorials/katacoda/command-pwd-en/finish.md @@ -0,0 +1,6 @@ + +Through this tutorial, you can know how to use Arthas `pwd`. More advanced features can be found in the Advanced Guide below. + +* [Arthas Advanced](https://alibaba.github.io/arthas/arthas-tutorials?language=en&id=arthas-advanced) +* [Arthas Github](https://github.com/alibaba/arthas) +* [Arthas Documentation](https://alibaba.github.io/arthas/en) diff --git a/tutorials/katacoda/command-pwd-en/index.json b/tutorials/katacoda/command-pwd-en/index.json new file mode 100644 index 000000000..415903abc --- /dev/null +++ b/tutorials/katacoda/command-pwd-en/index.json @@ -0,0 +1,33 @@ +{ + "title": "Arthas pwd", + "description": "Arthas pwd", + "details": { + "steps": [ + { + "title": "Start arthas-demo", + "text": "arthas-demo.md" + }, + { + "title": "Start arthas-boot", + "text": "arthas-boot.md" + }, + { + "title": "pwd command", + "text": "pwd.md" + } + ], + "intro": { + "text": "intro.md" + }, + "finish": { + "text": "finish.md" + } + }, + "environment": { + "uilayout": "terminal" + }, + "backend": { + "imageid": "java", + "environmentsprotocol": "http" + } +} \ No newline at end of file diff --git a/tutorials/katacoda/command-pwd-en/intro.md b/tutorials/katacoda/command-pwd-en/intro.md new file mode 100644 index 000000000..e45235726 --- /dev/null +++ b/tutorials/katacoda/command-pwd-en/intro.md @@ -0,0 +1,11 @@ + + + +![Arthas](https://alibaba.github.io/arthas/_images/arthas.png) + +`Arthas` is a Java diagnostic tool open-sourced by Alibaba middleware team. Arthas helps developers in trouble-shooting issues in production environment for Java based applications without modifying code or restarting servers. + +`Arthas` supports JDK 6+, supports Linux/Mac/Windows. + +* Github: https://github.com/alibaba/arthas +* Documentation: https://alibaba.github.io/arthas/en \ No newline at end of file diff --git a/tutorials/katacoda/command-pwd-en/pwd.md b/tutorials/katacoda/command-pwd-en/pwd.md new file mode 100644 index 000000000..82ebdc55d --- /dev/null +++ b/tutorials/katacoda/command-pwd-en/pwd.md @@ -0,0 +1,4 @@ + +Use `pwd` to get working directory name + +`pwd`{{execute T2}} \ No newline at end of file