In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Before we begin
How do I count the resource information occupied by a container?
Docker provides the stats subcommand to understand the resource usage of the current running container, including: CPU, memory, network IO, disk IO, and so on.
Environment description
Docker 1.10.3 on CentOS 7
This version of Docker is very old and can not be found at present. In addition, Ubuntu Server 16.04 LTS is recommended for Linux host operating system Docker, which can better support advanced features such as overlay2 storage driver.
For instance
1. All container status information is output by default
Docker stats# uses Ctrl + C to exit statistics
two。 Outputs the specified container status information
Docker stats nginx# uses Ctrl + C to exit statistics
3. Or you can output the result only once.
Docker stats-- no-stream nginx command helps docker stats-- helpUsage: docker stats [OPTIONS] [CONTAINER...] Display a live stream of container (s) resource usage statistics-a,-- all Show all containers (default shows just running)-- help Print usage-- no-stream Disable streaming stats and only pull the first result summary
Finally, let's summarize the knowledge points in the article.
Learn about the resource usage of the currently running container through the docker stats subcommand. Output real-time statistics by default and exit using Ctrl + C key. Parameter-no-stream means that real-time statistics are disabled and only the results obtained for the first time are used.
Reference article
Doker&k8s Qun [703906133]
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.