systemd/man/systemd-cgtop.1
2015-02-17 11:22:16 +01:00

169 lines
4.3 KiB
Groff

'\" t
.TH "SYSTEMD\-CGTOP" "1" "" "systemd 219" "systemd-cgtop"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
systemd-cgtop \- Show top control groups by their resource usage
.SH "SYNOPSIS"
.HP \w'\fBsystemd\-cgtop\fR\ 'u
\fBsystemd\-cgtop\fR [OPTIONS...]
.SH "DESCRIPTION"
.PP
\fBsystemd\-cgtop\fR
shows the top control groups of the local Linux control group hierarchy, ordered by their CPU, memory, or disk I/O load\&. The display is refreshed in regular intervals (by default every 1s), similar in style to
\fBtop\fR(1)\&. If
\fBsystemd\-cgtop\fR
is not connected to a tty, only one iteration is performed and no columns headers are printed\&. This mode is suitable for scripting\&.
.PP
Resource usage is only accounted for control groups in the relevant hierarchy, i\&.e\&. CPU usage is only accounted for control groups in the
"cpuacct"
hierarchy, memory usage only for those in
"memory"
and disk I/O usage for those in
"blkio"\&. If resource monitoring for these resources is required, it is recommended to add the
\fICPUAccounting=1\fR,
\fIMemoryAccounting=1\fR
and
\fIBlockIOAccounting=1\fR
settings in the unit files in question\&. See
\fBsystemd.resource-control\fR(5)
for details\&.
.PP
To emphasize this: unless
"CPUAccounting=1",
"MemoryAccounting=1"
and
"BlockIOAccounting=1"
are enabled for the services in question, no resource accounting will be available for system services and the data shown by
\fBsystemd\-cgtop\fR
will be incomplete\&.
.SH "OPTIONS"
.PP
The following options are understood:
.PP
\fB\-p\fR
.RS 4
Order by control group path name\&.
.RE
.PP
\fB\-t\fR
.RS 4
Order by number of tasks in control group (i\&.e\&. threads and processes)\&.
.RE
.PP
\fB\-c\fR
.RS 4
Order by CPU load\&.
.RE
.PP
\fB\-m\fR
.RS 4
Order by memory usage\&.
.RE
.PP
\fB\-i\fR
.RS 4
Order by disk I/O load\&.
.RE
.PP
\fB\-b\fR, \fB\-\-batch\fR
.RS 4
Run in "batch" mode: do not accept input and run until the iteration limit set with
\fB\-\-iterations\fR
is exhausted or until killed\&. This mode could be useful for sending output from
\fBsystemd\-cgtop\fR
to other programs or to a file\&.
.RE
.PP
\fB\-n\fR, \fB\-\-iterations=\fR
.RS 4
Perform only this many iterations\&.
.RE
.PP
\fB\-d\fR, \fB\-\-delay=\fR
.RS 4
Specify refresh delay in seconds (or if one of
"ms",
"us",
"min"
is specified as unit in this time unit)\&.
.RE
.PP
\fB\-\-depth=\fR
.RS 4
Maximum control group tree traversal depth\&. Specifies how deep
\fBsystemd\-cgtop\fR
shall traverse the control group hierarchies\&. If 0 is specified, only the root group is monitored\&. For 1, only the first level of control groups is monitored, and so on\&. Defaults to 3\&.
.RE
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Print a short help text and exit\&.
.RE
.PP
\fB\-\-version\fR
.RS 4
Print a short version string and exit\&.
.RE
.SH "KEYS"
.PP
\fBsystemd\-cgtop\fR
is an interactive tool and may be controlled via user input using the following keys:
.PP
h
.RS 4
Shows a short help text\&.
.RE
.PP
SPACE
.RS 4
Immediately refresh output\&.
.RE
.PP
q
.RS 4
Terminate the program\&.
.RE
.PP
p, t, c, m, i
.RS 4
Sort the control groups by path, number of tasks, CPU load, memory usage, or IO load, respectively\&.
.RE
.PP
%
.RS 4
Toggle between showing CPU time as time or percentage\&.
.RE
.PP
+, \-
.RS 4
Increase or decrease refresh delay, respectively\&.
.RE
.SH "EXIT STATUS"
.PP
On success, 0 is returned, a non\-zero failure code otherwise\&.
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1),
\fBsystemctl\fR(1),
\fBsystemd-cgls\fR(1),
\fBsystemd.resource-control\fR(5),
\fBtop\fR(1)