Skip to content

dicer instance stats

Shows each running or paused instance’s CPU, memory, network and disk use, read on the host from its hypervisor process: nothing in the guest is asked. Without names, every running or paused instance is shown, as they come and go.

CPUPerc is a share of one host CPU, so 200% is two kept busy; the threads emulating its devices count too. MemUsage is the hypervisor’s resident host memory / the guest memory the instance holds, and MemPerc the one as a share of the other. NetIO is what the guest received / transmitted, and BlockIO what the hypervisor read / wrote: the guest’s disks, and its own files, such as the console log and a snapshot’s memory. Reads served from the host’s page cache are not counted. Both are totals since the instance started.

The column names are also the fields of a --format template. --format json and yaml give each instance’s record instead, with the counts as numbers.

The view is redrawn every second until Ctrl+C. With --no-stream it is shown once, a second after asking, since CPU use is measured over that second.

Usage

$ dicer instance stats [NAME...] [flags]

Examples

$ dicer stats
$ dicer stats web db
$ dicer stats --no-stream --format '{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}'
$ dicer stats --no-stream --format json

Flags

FlagDescription
-c, --columns stringsColumns of the table to display, comma-separated and in any case (default: all).
--format stringOutput format: table, json, yaml, or a Go template of the table’s columns, e.g. ‘{{.Name}}’. Default: table.
--no-streamShow the stats once rather than live.
-q, --quietOnly display names, one a line.

Global flags

FlagDescription
-D, --debugTrace every call to the daemon on stderr (or set $DICER_DEBUG).
-r, --remote stringDaemon to talk to: a remote’s name, or an address (unix:///PATH or HOST:PORT) (default $DICER_REMOTE, then the current remote, then local).
--request-timeout durationGive up on a single call to the daemon after this long, e.g. 30s (0: never; streams such as logs -f and exec are not bounded).