In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you "what are the tracking methods of Java open source tools on linux", the content is easy to understand, clear, hope to help you solve your doubts, the following let Xiaobian lead you to study and learn about "Java open source tools tracking methods on linux" this article.
In our commonly used Jstack, Jmap is a tool for analyzing the status of a java virtual machine, which tracks the status of another virtual machine by running the java file under the sun.tools package.
If you are asked to design a way to track another process, you will usually consider these common ways.
* is to notify the process being tracked and let the process execute the corresponding message and react to it at the same time.
The second is that through the call of the kernel, you can directly access the memory and stack of the process, and know the status of the current tracked process by analyzing the memory structure of the tracked process.
* * *
Advantages:
As long as a simple communication protocol is reached between the caller and the callee, the caller does not need to know the logic and structure of the callee, but only needs a simple way to send the command, and the callee can receive the command and respond to the command.
Disadvantages:
If the callee is already in an abnormal state or too busy to respond to the command, the tracking process is often unable to return the correct required information within the specified waiting time. Secondly, in the process of analysis, the callee may need to pause other threads in the process, which has a certain impact on the process being tracked.
The second way
Advantages:
Through kernel support, access to tracked memory, and make snapshots, background analysis, rarely affect the tracked process.
Disadvantages:
This approach requires a good understanding of the memory allocation and use of the tracked program, which cannot be decoupled, and there will be problems with the kernel calls of the system itself.
These two methods are also roughly implemented in the Java tool class. * will be selected first in the tool. If * is found to be unsuccessful, it is recommended to use the-F parameter, that is, the second method.
Let's start with *.
Since it is necessary to issue commands to the tracked process, you can choose a variety of ways to communicate in the process in linux, such as shared memory, files, and so on, among which creating socket files to achieve communication is a relatively simple method.
Here is the entire flow chart:
The above is all the contents of the article "what are the tracking methods of Java open source tools on linux?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.