In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Today, I will talk to you about the sample analysis of the source code of Arthas Bootstrap. Many people may not know much about it. In order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.
Arthas (Alsace, https://github.com/alibaba/arthas) is an open source Java diagnostic tool of Alibaba. It supports JDK 6 runs as a command line. With the help of the ability of Java Instrumentation, we can dynamically attach to a running java process, obtain JVM information in real time and dynamically enhance the loaded classes.
Instrumentation-related content can be found in the document https://www.ibm.com/developerworks/cn/java/j-lo-jse61/
This paper mainly describes the process of Arthas startup and dynamic Attach. The main class diagrams related to Bootstrap & Attach are as follows:
Main class description:
Arthas.java-the main entry for the entire tool parses command-line arguments and runs the instrumentation agent in the target process through Attach API.
AgentBootstrap-the instrumentation agent that runs in the target process, including two entry methods of premain/agentmain. Load and start ArthasBootstrap through a special classloader.
ArthasBootstrap-the startup class of the Arthas kernel that run a shell server in the target java process.
ShellServerImpl-shell server that runs within the target java process, listens to the telnet/http protocol on special ports, parses and responds to user instructions.
The startup process is shown in the figure above. Note: Arthas.java runs in a separate process, while AgentBootstrap/ArthasBootstrap/ShellServerImpl runs inside the target java process.
After reading the above, do you have any further understanding of Arthas Bootstrap's source code sample analysis? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.