-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update start-arthas.md and add en/start-arthas.md. #51
- Loading branch information
1 parent
a6a0101
commit 14c6610
Showing
2 changed files
with
96 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
Start Arthas | ||
===== | ||
|
||
## Interactive Mode | ||
|
||
```bash | ||
./as.sh | ||
``` | ||
|
||
```sh | ||
➜ bin git:(develop) ✗ ./as.sh | ||
Found existing java process, please choose one and hit RETURN. | ||
[1]: 3088 org.jetbrains.idea.maven.server.RemoteMavenServer | ||
* [2]: 12872 org.apache.catalina.startup.Bootstrap | ||
[3]: 2455 | ||
Attaching to 12872... | ||
,---. ,------. ,--------.,--. ,--. ,---. ,---. | ||
/ O \ | .--. ''--. .--'| '--' | / O \ ' .-' | ||
| .-. || '--'.' | | | .--. || .-. |`. `-. | ||
| | | || |\ \ | | | | | || | | |.-' | | ||
`--' `--'`--' '--' `--' `--' `--'`--' `--'`-----' | ||
$ | ||
``` | ||
|
||
## Non-Interactive Mode | ||
|
||
Startup script is as follows: | ||
|
||
```bash | ||
./as.sh <PID>[@IP:PORT] | ||
``` | ||
|
||
|
||
|
||
### Parameter Description | ||
|
||
* PID: Target Java process ID(Make sure that the user executing the command has sufficient permissions to operate the target Java process.) | ||
|
||
* IP: The address that Arthas Server listens on, the default value is `127.0.0.1`. Arthas allows multiple users to access simultaneously without interfering with each other. | ||
|
||
* PORT: Arthas Server port,the default value is 3658 | ||
|
||
### Sample | ||
|
||
* If you do not specify IP and PORT, the default is 127.0.0.1 and 3658 | ||
|
||
> ./as.sh 12345 | ||
|
||
Equivalent to: | ||
|
||
> ./as.sh 12356@127.0.0.1:3658 | ||
|
||
### Remote Diagnosis | ||
|
||
After starting Arthas Server, users can use `telnet` connect to the remote Arthas Server, for example: | ||
|
||
```bash | ||
telnet 192.168.1.119 3658 | ||
``` | ||
|
||
### sudo Support | ||
|
||
If you need to switch users, such as `admin`, you need to add the -H parameter. | ||
|
||
```bash | ||
sudo -u admin -H ./as.sh 12345 | ||
``` | ||
|
||
|
||
### Windows Support | ||
|
||
`as.bat` script only supports one parameter: pid | ||
|
||
```bash | ||
as.bat <pid> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters