Docker Container Monitoring Commands and Third‑Party Tools (Sysdig, Weave Scope)
This article explains how to monitor Docker containers using built‑in commands such as docker ps, docker top, and docker stats, and introduces third‑party tools like Sysdig and Weave Scope, providing installation steps, usage examples, and tips for effective container and host monitoring.
Preface
In enterprises, business cannot be stopped arbitrarily because it would cause huge economic loss. Operations engineers must ensure services run normally, including containerized services, by continuously monitoring their status.
Docker Monitoring Commands
docker ps
The docker ps command shows container status. An equivalent command is docker container ls .
docker top
The docker top command displays processes running inside a container. Adding a container name or parameters (e.g., -u ) can filter the output.
docker stats
The docker stats command provides a live list of resource usage (CPU, memory, network, etc.) for each container. Adding a container name shows statistics for that specific container.
Sysdig
Sysdig is a lightweight command‑line monitoring tool that aggregates functionalities of tools like strace , htop , and lsof . It can run as a container, requiring absolute host paths and appropriate permissions. After starting, Sysdig presents a UI with resource usage, process information, and various options for container interaction.
Weave Scope
Weave Scope offers a graphical interface for container and host monitoring. After installing the binary script and granting execution permission, the service runs on a specified port (e.g., http://192.168.77.128:4040/ ). It visualizes containers and hosts, allows filtering, searching, and provides detailed views for each entity, including status, info, processes, labels, and image data.
Weave Scope also supports multi‑host monitoring, enabling users to view containers across several hosts, search by name or logical conditions (e.g., cpu>1 ), and access help documentation.
Summary
The chapter covered Docker's built‑in monitoring commands and introduced third‑party tools Sysdig and Weave Scope. Sysdig is a powerful CLI tool, while Weave Scope provides an intuitive graphical view, helping users ensure containerized services run smoothly.
Top Architect
Top Architect focuses on sharing practical architecture knowledge, covering enterprise, system, website, large‑scale distributed, and high‑availability architectures, plus architecture adjustments using internet technologies. We welcome idea‑driven, sharing‑oriented architects to exchange and learn together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.