Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common monitoring schemes for Docker?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Today, I will talk to you about the common monitoring programs of Docker, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.

As the scale of Docker deployment becomes larger, it will become more and more important to visually monitor the performance and health of the container environment.

We will discuss several commonly used container monitoring tools and solutions to provide reference for you to build your own monitoring system.

First we will discuss several monitoring subcommands that come with Docker: ps, top, and stats. Then there are several more powerful open source monitoring tools sysdig, Weave Scope, cAdvisor and Prometheus. Finally, we will make a comparison of these different tools and solutions.

The monitoring subcommand ps that comes with Docker

Docker container ps is a command that we are already familiar with, making it easy for us to see the currently running container.

There are already a large number of examples, so I won't repeat them here. It is worth noting that the new version of Docker provides a new command docker container ls that works and uses exactly the same as docker container ps. However, the meaning of ls may be more accurate than that of ps, so it is more recommended.

Top

If you want to know which processes are running in a container, you can execute the docker container top [container] command.

The above shows the processes in the sysdig container. The command can also be followed by the arguments of the Linux operating system ps command to display specific information, such as-au.

Stats

Docker container stats is used to display the usage of various resources in each container.

By default, a list of real-time changes is displayed, showing the CPU usage, memory usage and availability of each container.

Note: if there is no specific memory specified when the container starts, the limit,stats command will display the total memory of the host, but this does not mean that each container can use so much memory.

In addition, the docker container stats command also displays the IO data of the container network and disk.

The default output has the drawback of showing the container ID instead of the name. We can specify the name of the container after the stats command to display only the data for certain containers. Like docker container stats sysdig weave.

The commands ps,top and stats are included with docker. They are easy to run and are suitable for scenarios where you want to quickly understand the running status of the container. Its disadvantage is that the output data is limited, and it is all real-time data, which can not reflect historical changes and trends. The next few monitoring tools will provide richer functionality.

After reading the above, do you have any further understanding of the common monitoring schemes of Docker? 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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report