mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-12 22:41:26 +00:00
update doc
This commit is contained in:
1 parent
1704abcace
commit
b5f009c0c4
94 files changed
+904
-22
No files matched your search
@@ -38,7 +38,7 @@ You can see that there is currently a background job executing:
|
||||
|
||||
## 3. Suspend and cancel job
|
||||
|
||||
When the job is executing in the foreground, for example, directly executing the command `trace Test t`, or executing the background job command `trace Test t &`, then putting the job back to the forground via `fg` command, the console cannot continue to execute other command, but can receive and process the following keyboard events:
|
||||
When the job is executing in the foreground, for example, directly executing the command `trace Test t`, or executing the background job command `trace Test t &`, then putting the job back to the foreground via `fg` command, the console cannot continue to execute other command, but can receive and process the following keyboard events:
|
||||
|
||||
* ‘ctrl + z’: Suspend the job, the job status will change to `Stopped`, and the job can be restarted by `bg <job-id>` or `fg <job-id>`
|
||||
* ‘ctrl + c’: Stop the job
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
Docker
|
||||
===
|
||||
|
||||
## Quick start with Docker
|
||||
|
||||
1. Delete the existing `arthas-demo` docker container (not necessary)
|
||||
|
||||
```sh
|
||||
$ docker stop arthas-demo || true && docker rm arthas-demo || true
|
||||
```
|
||||
|
||||
1. Start `arthas-demo`
|
||||
|
||||
```sh
|
||||
$ docker run --name arthas-demo -it hengyunabc/arthas:latest /bin/sh -c "java -jar /opt/arthas/arthas-demo.jar"
|
||||
```
|
||||
|
||||
1. Start `arthas-boot` for diagnosis
|
||||
|
||||
```sh
|
||||
$ docker exec -it arthas-demo /bin/sh -c "java -jar /opt/arthas/arthas-boot.jar"
|
||||
* [1]: 9 jar
|
||||
|
||||
[INFO] arthas home: /opt/arthas
|
||||
[INFO] Try to attach process 9
|
||||
[INFO] Attach process 9 success.
|
||||
[INFO] arthas-client connect 127.0.0.1 3658
|
||||
,---. ,------. ,--------.,--. ,--. ,---. ,---.
|
||||
/ O \ | .--. ''--. .--'| '--' | / O \ ' .-'
|
||||
| .-. || '--'.' | | | .--. || .-. |`. `-.
|
||||
| | | || |\ \ | | | | | || | | |.-' |
|
||||
`--' `--'`--' '--' `--' `--' `--'`--' `--'`-----'
|
||||
|
||||
|
||||
wiki: https://alibaba.github.io/arthas
|
||||
version: 3.0.5
|
||||
pid: 9
|
||||
time: 2018-12-18 11:30:36
|
||||
```
|
||||
|
||||
## Diagnose the Java process in Docker
|
||||
|
||||
```sh
|
||||
docker exec -it ${containerId} /bin/bash -c "wget https://alibaba.github.io/arthas/arthas-boot.jar && java -jar arthas-boot.jar"
|
||||
```
|
||||
|
||||
## Diagnose the Java process in the container in k8s
|
||||
|
||||
```sh
|
||||
kubectl exec -it ${pod} --container ${containerId} -- /bin/bash -c "wget https://alibaba.github.io/arthas/arthas-boot.jar && java -jar arthas-boot.jar"
|
||||
```
|
||||
|
||||
## Install Arthas into the base Docker image
|
||||
|
||||
It's easy to install Arthas into your Docker image.
|
||||
|
||||
```
|
||||
FROM openjdk:8-jdk-alpine
|
||||
|
||||
# copy arthas
|
||||
COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas
|
||||
```
|
||||
|
||||
[https://cloud.docker.com/repository/docker/hengyunabc/arthas](https://cloud.docker.com/repository/docker/hengyunabc/arthas)
|
||||
@@ -1,7 +1,7 @@
|
||||
Arthas Documentation
|
||||
===
|
||||
|
||||
**[中文文档](https://alibaba.github.io/arthas/)**
|
||||
**[中文文档/Chinese Documentation](https://alibaba.github.io/arthas/)**
|
||||
|
||||

|
||||
|
||||
@@ -31,6 +31,9 @@ Arthas is built to solve these issues. A developer can troubleshoot production i
|
||||
* Supports telnet and WebSocket, which enables both local and remote diagnostics with command line and browsers.
|
||||
* Supports JDK 6+
|
||||
|
||||
|
||||
**If you are using Arthas, please let us know. Your use is very important to us: [View](https://github.com/alibaba/arthas/issues/111)**
|
||||
|
||||
Contents
|
||||
--------
|
||||
|
||||
@@ -38,6 +41,7 @@ Contents
|
||||
* [Quick start](quick-start.md)
|
||||
* [Advanced usage](advanced-use.md)
|
||||
* [Commands](commands.md)
|
||||
* [Docker](docker.md)
|
||||
* [User cases](https://github.com/alibaba/arthas/issues?q=label%3Auser-case)
|
||||
* [Questions and answers](https://github.com/alibaba/arthas/issues?q=label%3Aquestion-answered)
|
||||
* [Fork me at GitHub](https://github.com/alibaba/arthas)
|
||||
|
||||
@@ -91,7 +91,7 @@ If you fail to boot Arthas with the provided batch file, you could try to assemb
|
||||
* `-telnet-port 3658 -http-port 8563` specifies telnet and HTTP ports for remote access
|
||||
* `-core /tmp/arthas-packaging/arthas-core.jar -agent /tmp/arthas-packaging/arthas/arthas-agent.jar` specifies core/agent jar package
|
||||
|
||||
If you are running on JDK 1.9 or above,then it's unncessary to add `tools.jar` in option `-Xbootclasspath`.
|
||||
If you are running on JDK 1.9 or above,then it's unnecessary to add `tools.jar` in option `-Xbootclasspath`.
|
||||
|
||||
You can find the logs from `~/logs/arthas/arthas.log`.
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ sc
|
||||
Affect(row-cnt:1) cost in 875 ms.
|
||||
```
|
||||
|
||||
* View class fileds
|
||||
* View class fields
|
||||
|
||||
```bash
|
||||
$ sc -d -f demo.MathGame
|
||||
|
||||
@@ -153,7 +153,7 @@ F.Y.I
|
||||
|
||||
1. **Loss** of the `ThreadLocal`
|
||||
|
||||
Arthas save params into an array, then invoke the method with the params again. The method execute in another thead, so the `ThreadLocal` **lost**.
|
||||
Arthas save params into an array, then invoke the method with the params again. The method execute in another thread, so the `ThreadLocal` **lost**.
|
||||
|
||||
1. params may be modified
|
||||
|
||||
|
||||
Reference in new issue
Block a user