In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to use sysdig for monitoring, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
Sysdig is a lightweight system monitoring tool, and it also natively supports containers. Sysdig allows us to take a closer look at the behavior of linux operating systems and containers.
There are many common monitoring tools on Linux, such as strace,tcpdump,htop, iftop,lsof.
Sysdig integrates the functions of these tools into one tool and provides a friendly and unified operation interface.
Next we will demonstrate the powerful monitoring capabilities of sysdig.
The easiest way to install and run sysdig is to run the Docker container, command behavior:
Docker container run-it-rm-name=sysdig-privileged=true\
-- volume=/var/run/docker.sock:/host/var/run/docker.sock\
-- volume=/dev:/host/dev\
-- volume=/proc:/host/proc:ro\
-- volume=/boot:/host/boot:ro\
-- volume=/lib/modules:/host/lib/modules:ro\
-- volume=/usr:/host/usr:ro\
Sysdig/sysdig
As you can see, the sysdig container runs in privileged mode and reads data such as operating system / dev,/proc in order to get enough system information.
After startup, enter the container through docker container exec-it sysdig bash, execute the csysdig command, and start sysdig interactively.
This is an interface similar to the linux top command, but much more powerful. Sysdig monitors different types of resources by different View. Click the Views menu at the bottom (or press F2) to display the View selection list.
The View supported by sysdig is listed on the left side of the interface, with a total of more than 30 items, covering all aspects of the operating system. Since this is mainly about container monitoring, we move the cursor to the item Containers, and the function description of this View is immediately displayed on the right side of the interface.
Enter or double-click Containers to enter the container monitoring interface.
Sysdig displays real-time data for all containers of the Host, refreshed every two seconds. The meaning of each column of data is also self-explanatory. If you are not clear, click on the bottom Legend (or press F7). If you want to sort by a column, such as the amount of memory used, simply click the column header VIRT.
If you want to see a process running in a container, such as weavescope, move the cursor to the target container, then enter or double-click.
You can also continue to double-click to view threads in the process.
Go back to the previous level and press the backspace key.
Sysdig is very interactive, if the interface shows a lot of items, you can click on the bottom Search menu, and then enter keywords to find. As shown in the following figure, the keyword is service.
If you feel that the interface refreshes too fast to see the information you follow clearly, you can click on the Pause menu at the bottom.
Sysdig has the following characteristics:
Monitoring information is complete, including Linux operating system and container.
The interface is highly interactive.
However, sysdig shows real-time data and does not see changes or trends. And it is the command line operation mode, which needs to be executed on the Host by ssh, which will bring some inconvenience.
After reading the above, have you mastered how to use sysdig for monitoring? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.