Skip to content

Commit

Permalink
Add Docker stats to runtime metrics article
Browse files Browse the repository at this point in the history
Fixes moby#13170

Signed-off-by: Ankush Agarwal <[email protected]>
  • Loading branch information
ankushagarwal committed Jul 6, 2015
1 parent 4f69609 commit 274c838
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions docs/articles/runmetrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+++
title = "Runtime metrics"
description = "Measure the behavior of running containers"
keywords = ["docker, metrics, CPU, memory, disk, IO, run, runtime"]
keywords = ["docker, metrics, CPU, memory, disk, IO, run, runtime, stats"]
[menu.main]
parent = "smn_administrate"
weight = 4
Expand All @@ -11,15 +11,33 @@ weight = 4

# Runtime metrics


## Docker stats

You can use the `docker stats` command to live stream a container's
runtime metrics. The command supports CPU, memory usage, memory limit,
and network IO metrics.

The following is a sample output from the `docker stats` command

$ docker stats redis1 redis2
CONTAINER CPU % MEM USAGE/LIMIT MEM % NET I/O
redis1 0.07% 796 KB/64 MB 1.21% 788 B/648 B
redis2 0.07% 2.746 MB/64 MB 4.29% 1.266 KB/648 B


The [docker stats](/reference/commandline/stats/) reference page has
more details about the `docker stats` command.

## Control groups

Linux Containers rely on [control groups](
https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt)
which not only track groups of processes, but also expose metrics about
CPU, memory, and block I/O usage. You can access those metrics and
obtain network usage metrics as well. This is relevant for "pure" LXC
containers, as well as for Docker containers.

## Control groups

Control groups are exposed through a pseudo-filesystem. In recent
distros, you should find this filesystem under `/sys/fs/cgroup`. Under
that directory, you will see multiple sub-directories, called devices,
Expand Down

0 comments on commit 274c838

Please sign in to comment.