## Arthas
![arthas](site/docs/.vuepress/public/images/arthas.png)
[![Build Status](https://github.com/alibaba/arthas/workflows/JavaCI/badge.svg)](https://github.com/alibaba/arthas/actions)
[![codecov](https://codecov.io/gh/alibaba/arthas/branch/master/graph/badge.svg)](https://codecov.io/gh/alibaba/arthas)
[![maven](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg)](https://search.maven.org/search?q=g:com.taobao.arthas)
![license](https://img.shields.io/github/license/alibaba/arthas.svg)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/alibaba/arthas.svg)](http://isitmaintained.com/project/alibaba/arthas "Average time to resolve an issue")
[![Percentage of issues still open](http://isitmaintained.com/badge/open/alibaba/arthas.svg)](http://isitmaintained.com/project/alibaba/arthas "Percentage of issues still open")
`Arthas` is a Java Diagnostic tool open sourced by Alibaba.
Arthas allows developers to troubleshoot production issues for Java applications without modifying code or restarting servers.
[中文说明/Chinese Documentation](README_CN.md)
### Background
Often times, the production system network is inaccessible from the local development environment. If issues are encountered in production systems, it is impossible to use IDEs to debug the application remotely. More importantly, debugging in production environment is unacceptable, as it will suspend all the threads, resulting in the suspension of business services.
Developers could always try to reproduce the same issue on the test/staging environment. However, this is tricky as some issues cannot be reproduced easily on a different environment, or even disappear once restarted.
And if you're thinking of adding some logs to your code to help troubleshoot the issue, you will have to go through the following lifecycle; test, staging, and then to production. Time is money! This approach is inefficient! Besides, the issue may not be reproducible once the JVM is restarted, as described above.
Arthas was built to solve these issues. A developer can troubleshoot your production issues on-the-fly. No JVM restart, no additional code changes. Arthas works as an observer, which will never suspend your existing threads.
### Key features
* Check whether a class is loaded, or where the class is being loaded. (Useful for troubleshooting jar file conflicts)
* Decompile a class to ensure the code is running as expected.
* View classloader statistics, e.g. the number of classloaders, the number of classes loaded per classloader, the classloader hierarchy, possible classloader leaks, etc.
* View the method invocation details, e.g. method parameter, return object, thrown exception, and etc.
* Check the stack trace of specified method invocation. This is useful when a developers wants to know the caller of the said method.
* Trace the method invocation to find slow sub-invocations.
* Monitor method invocation statistics, e.g. qps, rt, success rate and etc.
* Monitor system metrics, thread states and cpu usage, gc statistics, and etc.
* Supports command line interactive mode, with auto-complete feature enabled.
* Supports telnet and websocket, which enables both local and remote diagnostics with command line and browsers.
* Supports profiler/Flame Graph
* Support get objects in the heap that are instances of the specified class.
* Supports JDK 6+.
* Supports Linux/Mac/Windows.
### [Online Tutorials(Recommended)](https://arthas.aliyun.com/doc/arthas-tutorials.html?language=en)
* [Usages](tutorials/katacoda/README.md#online-tutorial-usages)
### Quick start
#### Use `arthas-boot`(Recommended)
Download`arthas-boot.jar`,Start with `java` command:
```bash
curl -O https://arthas.aliyun.com/arthas-boot.jar
java -jar arthas-boot.jar
```
Print usage:
```bash
java -jar arthas-boot.jar -h
```
#### Use `as.sh`
You can install Arthas with one single line command on Linux, Unix, and Mac. Copy the following command and paste it into the command line, then press *Enter* to run:
```bash
curl -L https://arthas.aliyun.com/install.sh | sh
```
The command above will download the bootstrap script `as.sh` to the current directory. You can move it any other place you want, or put its location in `$PATH`.
You can enter its interactive interface by executing `as.sh`, or execute `as.sh -h` for more help information.
### Documentation
* [Online Tutorials(Recommended)](https://arthas.aliyun.com/doc/arthas-tutorials.html?language=en)
* [User manual](https://arthas.aliyun.com/doc/en)
* [Installation](https://arthas.aliyun.com/doc/en/install-detail.html)
* [Download](https://arthas.aliyun.com/doc/en/download.html)
* [Quick start](https://arthas.aliyun.com/doc/en/quick-start.html)
* [Advanced usage](https://arthas.aliyun.com/doc/en/advanced-use.html)
* [Commands](https://arthas.aliyun.com/doc/en/commands.html)
* [WebConsole](https://arthas.aliyun.com/doc/en/web-console.html)
* [Docker](https://arthas.aliyun.com/doc/en/docker.html)
* [Arthas Spring Boot Starter](https://arthas.aliyun.com/doc/en/spring-boot-starter.html)
* [User cases](https://github.com/alibaba/arthas/issues?q=label%3Auser-case)
* [FAQ](https://arthas.aliyun.com/doc/en/faq)
* [Compile and debug/How to contribute](https://github.com/alibaba/arthas/blob/master/CONTRIBUTING.md)
* [Release Notes](https://github.com/alibaba/arthas/releases)
### Feature Showcase
#### Dashboard
* https://arthas.aliyun.com/doc/en/dashboard
![dashboard](site/docs/.vuepress/public/images/dashboard.png)
#### Thread
* https://arthas.aliyun.com/doc/en/thread
See what is eating your CPU (ranked by top CPU usage) and what is going on there in one glance:
```bash
$ thread -n 3
"as-command-execute-daemon" Id=29 cpuUsage=75% RUNNABLE
at sun.management.ThreadImpl.dumpThreads0(Native Method)
at sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:440)
at com.taobao.arthas.core.command.monitor200.ThreadCommand$1.action(ThreadCommand.java:58)
at com.taobao.arthas.core.command.handler.AbstractCommandHandler.execute(AbstractCommandHandler.java:238)
at com.taobao.arthas.core.command.handler.DefaultCommandHandler.handleCommand(DefaultCommandHandler.java:67)
at com.taobao.arthas.core.server.ArthasServer$4.run(ArthasServer.java:276)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Number of locked synchronizers = 1
- java.util.concurrent.ThreadPoolExecutor$Worker@6cd0b6f8
"as-session-expire-daemon" Id=25 cpuUsage=24% TIMED_WAITING
at java.lang.Thread.sleep(Native Method)
at com.taobao.arthas.core.server.DefaultSessionManager$2.run(DefaultSessionManager.java:85)
"Reference Handler" Id=2 cpuUsage=0% WAITING on java.lang.ref.Reference$Lock@69ba0f27
at java.lang.Object.wait(Native Method)
- waiting on java.lang.ref.Reference$Lock@69ba0f27
at java.lang.Object.wait(Object.java:503)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
```
#### jad
* https://arthas.aliyun.com/doc/en/jad
Decompile your class with one shot:
```java
$ jad javax.servlet.Servlet
ClassLoader:
+-java.net.URLClassLoader@6108b2d7
+-sun.misc.Launcher$AppClassLoader@18b4aac2
+-sun.misc.Launcher$ExtClassLoader@1ddf84b8
Location:
/Users/xxx/work/test/lib/servlet-api.jar
/*
* Decompiled with CFR 0_122.
*/
package javax.servlet;
import java.io.IOException;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
public interface Servlet {
public void init(ServletConfig var1) throws ServletException;
public ServletConfig getServletConfig();
public void service(ServletRequest var1, ServletResponse var2) throws ServletException, IOException;
public String getServletInfo();
public void destr
没有合适的资源?快使用搜索试试~ 我知道了~
arthas-master.zip
共1994个文件
md:890个
java:592个
png:146个
0 下载量 68 浏览量
2022-12-25
13:36:42
上传
评论
收藏 5.7MB ZIP 举报
温馨提示
Arthas(阿尔萨斯)是阿里巴巴开源的 Java 诊断工具
资源推荐
资源详情
资源评论
收起资源包目录
arthas-master.zip (1994个子文件)
arthas.1 3KB
copyright.1 484B
batch.as 130B
as-service.bat 8KB
as.bat 3KB
AccessBridgeCalls.c 45KB
mvnw.cmd 6KB
control 291B
jni-library.cpp 6KB
main.css 60B
main.css 58B
main.css 58B
libArthasJniLibrary-x64.dll 2.29MB
Dockerfile 930B
Dockerfile-No-Jdk 545B
libArthasJniLibrary.dylib 132KB
.env 58B
spring.factories 184B
.gitignore 452B
.gitignore 261B
.gitignore 47B
verify.groovy 100B
jvmti.h 80KB
AccessBridgePackages.h 76KB
jni.h 74KB
AccessBridgeCalls.h 35KB
classfile_constants.h 22KB
jawt.h 12KB
jdwpTransport.h 8KB
AccessBridgeCallbacks.h 5KB
jvmticmlr.h 5KB
jawt_md.h 3KB
jni_md.h 2KB
jawt_md.h 2KB
jawt_md.h 2KB
jni_md.h 2KB
jni_md.h 2KB
arthas-tutorials.html 32KB
index.html 373B
index.html 373B
index.html 364B
agents.html 316B
apps.html 313B
favicon.ico 17KB
favicon.ico 17KB
inputrc 1KB
maven-wrapper.jar 50KB
ConcurrentWeakKeyHashMap.java 50KB
Telnet.java 33KB
StringUtils.java 31KB
Bootstrap.java 31KB
SocketClient.java 29KB
HttpApiHandler.java 28KB
ClassLoaderCommand.java 27KB
ObjectView.java 26KB
ArthasBootstrap.java 25KB
Enhancer.java 23KB
TelnetInputStream.java 22KB
ProcessImpl.java 21KB
TimeTunnelCommand.java 21KB
ProfilerCommand.java 20KB
ThreadUtil.java 19KB
ReflectUtils.java 19KB
MBeanCommand.java 19KB
ObjectUtils.java 19KB
RetransformCommand.java 18KB
FieldUtils.java 18KB
StringUtilsTest.java 18KB
ProcessUtils.java 16KB
Ansi.java 16KB
JFRCommand.java 15KB
LoggerCommand.java 15KB
TelnetConsole.java 15KB
CompletionUtils.java 14KB
TunnelSocketFrameHandler.java 14KB
ArthasReflectUtils.java 13KB
TelnetClient.java 13KB
VmToolCommand.java 12KB
DirectoryBrowser.java 12KB
ClassUtils.java 12KB
PropertySource.java 11KB
DashboardCommand.java 11KB
JulyCommand.java 11KB
MutablePropertySources.java 11KB
AdviceListenerManager.java 11KB
PropertyPlaceholderHelper.java 10KB
ObjectViewTest.java 10KB
DatagramSocketClient.java 10KB
JadCommand.java 10KB
ShellImpl.java 10KB
JobControllerImpl.java 10KB
ThreadLocalRandom.java 10KB
ShellServerImpl.java 10KB
TableView.java 10KB
MBeanView.java 9KB
OptionsCommand.java 9KB
ThreadCommand.java 9KB
GetStaticCommand.java 9KB
EnhancerCommand.java 9KB
JvmCommand.java 9KB
共 1994 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
m0_72731342
- 粉丝: 2
- 资源: 1832
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功