45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
12b42c76672a66c2d4ea7212c14f8f1b5a62b78dTom Gundersen "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering<!--
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering This file is part of systemd.
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering Copyright 2012 Lennart Poettering
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering systemd is free software; you can redistribute it and/or modify it
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering under the terms of the GNU Lesser General Public License as published by
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering (at your option) any later version.
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering systemd is distributed in the hope that it will be useful, but
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering Lesser General Public License for more details.
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering You should have received a copy of the GNU Lesser General Public License
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering-->
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering
dfdebb1b925332352966804303b2516a6506a429Zbigniew Jędrzejewski-Szmek<refentry id="systemd-cgtop"
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek xmlns:xi="http://www.w3.org/2001/XInclude">
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <refentryinfo>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <title>systemd-cgtop</title>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <productname>systemd</productname>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <authorgroup>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <author>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <contrib>Developer</contrib>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <firstname>Lennart</firstname>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <surname>Poettering</surname>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <email>lennart@poettering.net</email>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </author>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </authorgroup>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </refentryinfo>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <refmeta>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <refentrytitle>systemd-cgtop</refentrytitle>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <manvolnum>1</manvolnum>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </refmeta>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <refnamediv>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <refname>systemd-cgtop</refname>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <refpurpose>Show top control groups by their resource usage</refpurpose>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </refnamediv>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <refsynopsisdiv>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <cmdsynopsis>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <command>systemd-cgtop</command>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <arg choice="opt" rep="repeat">OPTIONS</arg>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </cmdsynopsis>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </refsynopsisdiv>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <refsect1>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <title>Description</title>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <para><command>systemd-cgtop</command> shows the top control
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek groups of the local Linux control group hierarchy, ordered by
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek their CPU, memory, or disk I/O load. The display is refreshed in
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek regular intervals (by default every 1s), similar in style to
780fe62ecab08850cefd136b95f38c15cb31c0ecCharles Duffy <citerefentry project='man-pages'><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
780fe62ecab08850cefd136b95f38c15cb31c0ecCharles Duffy
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering <para>If <command>systemd-cgtop</command> is not connected to a
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering tty, no column headers are printed and the default is to only run
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering one iteration. The <varname>--iterations=</varname> argument, if
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering given, is honored. This mode is suitable for scripting.</para>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <para>Resource usage is only accounted for control groups in the
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek relevant hierarchy, i.e. CPU usage is only accounted for control
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek groups in the <literal>cpuacct</literal> hierarchy, memory usage
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek only for those in <literal>memory</literal> and disk I/O usage for
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek those in <literal>blkio</literal>. If resource monitoring for
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek these resources is required, it is recommended to add the
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varname>CPUAccounting=1</varname>,
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varname>MemoryAccounting=1</varname> and
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varname>BlockIOAccounting=1</varname> settings in the unit files
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek in question. See
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek for details.</para>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
b0f5a5105ba3e57c20528ee2c292cd1f7300da8fUmut Tezduyar Lindskog <para>The CPU load value can be between 0 and 100 times the number of
b0f5a5105ba3e57c20528ee2c292cd1f7300da8fUmut Tezduyar Lindskog processors the system has. For example, if the system has 8 processors,
b0f5a5105ba3e57c20528ee2c292cd1f7300da8fUmut Tezduyar Lindskog the CPU load value is going to be between 0% and 800%. The number of
b0f5a5105ba3e57c20528ee2c292cd1f7300da8fUmut Tezduyar Lindskog processors can be found in <literal>/proc/cpuinfo</literal>.</para>
b0f5a5105ba3e57c20528ee2c292cd1f7300da8fUmut Tezduyar Lindskog
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <para>To emphasize this: unless
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <literal>CPUAccounting=1</literal>,
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <literal>MemoryAccounting=1</literal> and
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <literal>BlockIOAccounting=1</literal> are enabled for the
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek services in question, no resource accounting will be available for
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek system services and the data shown by
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <command>systemd-cgtop</command> will be incomplete.</para>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </refsect1>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <refsect1>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <title>Options</title>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <para>The following options are understood:</para>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <variablelist>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <term><option>-p</option></term>
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering <term><option>--order=path</option></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <listitem><para>Order by control group
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek path name.</para></listitem>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <term><option>-t</option></term>
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering <term><option>--order=tasks</option></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering <listitem><para>Order by number of tasks/processes in the control group.</para></listitem>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <term><option>-c</option></term>
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering <term><option>--order=cpu</option></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <listitem><para>Order by CPU load.</para></listitem>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <term><option>-m</option></term>
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering <term><option>--order=memory</option></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <listitem><para>Order by memory usage.</para></listitem>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <term><option>-i</option></term>
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering <term><option>--order=io</option></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <listitem><para>Order by disk I/O load.</para></listitem>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <term><option>-b</option></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <term><option>--batch</option></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <listitem><para>Run in "batch" mode: do not accept input and
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek run until the iteration limit set with
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering <option>--iterations=</option> is exhausted or until killed.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek This mode could be useful for sending output from
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <command>systemd-cgtop</command> to other programs or to a
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek file.</para></listitem>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
a2c9f63136775b128bdb9fb3e1b57f5ad977d5cbCharles Duffy <varlistentry>
a2c9f63136775b128bdb9fb3e1b57f5ad977d5cbCharles Duffy <term><option>-r</option></term>
a2c9f63136775b128bdb9fb3e1b57f5ad977d5cbCharles Duffy <term><option>--raw</option></term>
a2c9f63136775b128bdb9fb3e1b57f5ad977d5cbCharles Duffy
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt <listitem><para>Format byte counts (as in memory usage and I/O metrics)
a2c9f63136775b128bdb9fb3e1b57f5ad977d5cbCharles Duffy with raw numeric values rather than human-readable
a2c9f63136775b128bdb9fb3e1b57f5ad977d5cbCharles Duffy numbers.</para></listitem>
a2c9f63136775b128bdb9fb3e1b57f5ad977d5cbCharles Duffy </varlistentry>
a2c9f63136775b128bdb9fb3e1b57f5ad977d5cbCharles Duffy
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering <varlistentry>
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering <term><option>--cpu=percentage</option></term>
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering <term><option>--cpu=time</option></term>
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering <listitem><para>Controls whether the CPU usage is shown as
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt percentage or time. By default, the CPU usage is shown as
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering percentage. This setting may also be toggled at runtime by
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering pressing the <keycap>%</keycap> key.</para></listitem>
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering </varlistentry>
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4Lennart Poettering
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering <varlistentry>
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering <term><option>-P</option></term>
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering <listitem><para>Count only userspace processes instead of all
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt tasks. By default, all tasks are counted: each kernel thread
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt and each userspace thread individually. With this setting,
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering kernel threads are excluded from the counting and each
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering userspace process only counts as one, regardless how many
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering threads it consists of. This setting may also be toggled at
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering runtime by pressing the <keycap>P</keycap> key. This option
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering may not be combined with
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering <option>-k</option>.</para></listitem>
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering </varlistentry>
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering
41ba8b6e69ad79b6c8e603ac970720665c88a363Lennart Poettering <varlistentry>
41ba8b6e69ad79b6c8e603ac970720665c88a363Lennart Poettering <term><option>-k</option></term>
41ba8b6e69ad79b6c8e603ac970720665c88a363Lennart Poettering
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering <listitem><para>Count only userspace processes and kernel
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt threads instead of all tasks. By default, all tasks are
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering counted: each kernel thread and each userspace thread
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt individually. With this setting, kernel threads are included in
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering the counting and each userspace process only counts as on one,
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering regardless how many threads it consists of. This setting may
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering also be toggled at runtime by pressing the <keycap>k</keycap>
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering key. This option may not be combined with
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering <option>-P</option>.</para></listitem>
41ba8b6e69ad79b6c8e603ac970720665c88a363Lennart Poettering </varlistentry>
41ba8b6e69ad79b6c8e603ac970720665c88a363Lennart Poettering
3cb5beea0c484011fffbd50ae0aaaf71cc699eefLennart Poettering <varlistentry>
3cb5beea0c484011fffbd50ae0aaaf71cc699eefLennart Poettering <term><option>--recursive=</option></term>
3cb5beea0c484011fffbd50ae0aaaf71cc699eefLennart Poettering
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering <listitem><para>Controls whether the number of processes shown
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering for a control group shall include all processes that are
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering contained in any of the child control groups as well. Takes a
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt boolean argument, which defaults to <literal>yes</literal>. If
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt enabled, the processes in child control groups are included, if
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt disabled, only the processes in the control group itself are
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering counted. This setting may also be toggled at runtime by
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering pressing the <keycap>r</keycap> key. Note that this setting
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering only applies to process counting, i.e. when the
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering <option>-P</option> or <option>-k</option> options are
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering used. It has not effect if all tasks are counted, in which
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering case the counting is always recursive.</para></listitem>
3cb5beea0c484011fffbd50ae0aaaf71cc699eefLennart Poettering </varlistentry>
3cb5beea0c484011fffbd50ae0aaaf71cc699eefLennart Poettering
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <term><option>-n</option></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <term><option>--iterations=</option></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <listitem><para>Perform only this many iterations. A value of
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering 0 indicates that the program should run
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering indefinitely.</para></listitem>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <term><option>-d</option></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <term><option>--delay=</option></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <listitem><para>Specify refresh delay in seconds (or if one of
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <literal>ms</literal>, <literal>us</literal>,
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <literal>min</literal> is specified as unit in this time
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering unit). This setting may also be increased and decreased at
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering runtime by pressing the <keycap>+</keycap> and
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <keycap>-</keycap> keys.</para></listitem>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <term><option>--depth=</option></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <listitem><para>Maximum control group tree traversal depth.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Specifies how deep <command>systemd-cgtop</command> shall
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek traverse the control group hierarchies. If 0 is specified,
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek only the root group is monitored. For 1, only the first level
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek of control groups is monitored, and so on. Defaults to
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek 3.</para></listitem>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
96a6426f30dc9bf3c4dd1f61548c334fa12034dfEvgeny Vereshchagin <varlistentry>
96a6426f30dc9bf3c4dd1f61548c334fa12034dfEvgeny Vereshchagin <term><option>-M <replaceable>MACHINE</replaceable></option></term>
96a6426f30dc9bf3c4dd1f61548c334fa12034dfEvgeny Vereshchagin <term><option>--machine=<replaceable>MACHINE</replaceable></option></term>
96a6426f30dc9bf3c4dd1f61548c334fa12034dfEvgeny Vereshchagin
96a6426f30dc9bf3c4dd1f61548c334fa12034dfEvgeny Vereshchagin <listitem><para>Limit control groups shown to the part
96a6426f30dc9bf3c4dd1f61548c334fa12034dfEvgeny Vereshchagin corresponding to the container
96a6426f30dc9bf3c4dd1f61548c334fa12034dfEvgeny Vereshchagin <replaceable>MACHINE</replaceable>.</para></listitem>
96a6426f30dc9bf3c4dd1f61548c334fa12034dfEvgeny Vereshchagin </varlistentry>
96a6426f30dc9bf3c4dd1f61548c334fa12034dfEvgeny Vereshchagin
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <xi:include href="standard-options.xml" xpointer="help" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <xi:include href="standard-options.xml" xpointer="version" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </variablelist>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </refsect1>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <refsect1>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <title>Keys</title>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <para><command>systemd-cgtop</command> is an interactive tool and
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek may be controlled via user input using the following keys:</para>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <variablelist>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varlistentry>
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <term><keycap>h</keycap></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <listitem><para>Shows a short help text.</para></listitem>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varlistentry>
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <term><keycap function="space"/></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <listitem><para>Immediately refresh output.</para></listitem>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varlistentry>
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <term><keycap>q</keycap></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <listitem><para>Terminate the program.</para></listitem>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varlistentry>
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <term><keycap>p</keycap></term>
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <term><keycap>t</keycap></term>
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <term><keycap>c</keycap></term>
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <term><keycap>m</keycap></term>
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <term><keycap>i</keycap></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <listitem><para>Sort the control groups by path, number of
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt tasks, CPU load, memory usage, or I/O load, respectively. This
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering setting may also be controlled using the
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <option>--order=</option> command line
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering switch.</para></listitem>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varlistentry>
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <term><keycap>%</keycap></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <listitem><para>Toggle between showing CPU time as time or
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering percentage. This setting may also be controlled using the
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <option>--cpu=</option> command line switch.</para></listitem>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <varlistentry>
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <term><keycap>+</keycap></term>
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <term><keycap>-</keycap></term>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <listitem><para>Increase or decrease refresh delay,
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering respectively. This setting may also be controlled using the
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <option>--delay=</option> command line
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering switch.</para></listitem>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </varlistentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering <varlistentry>
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering <term><keycap>P</keycap></term>
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering <listitem><para>Toggle between counting all tasks, or only
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering userspace processes. This setting may also be controlled using
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering the <option>-P</option> command line switch (see
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering above).</para></listitem>
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering </varlistentry>
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering
7fcfb7ee2f0c2562c0e102915cacbc3ec2c4b8f8Lennart Poettering <varlistentry>
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <term><keycap>k</keycap></term>
7fcfb7ee2f0c2562c0e102915cacbc3ec2c4b8f8Lennart Poettering
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering <listitem><para>Toggle between counting all tasks, or only
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering userspace processes and kernel threads. This setting may also
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering be controlled using the <option>-k</option> command line
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering switch (see above).</para></listitem>
7fcfb7ee2f0c2562c0e102915cacbc3ec2c4b8f8Lennart Poettering </varlistentry>
7fcfb7ee2f0c2562c0e102915cacbc3ec2c4b8f8Lennart Poettering
7fcfb7ee2f0c2562c0e102915cacbc3ec2c4b8f8Lennart Poettering <varlistentry>
6d3eefd28e653c42bc4a6e0e58dfd9581b5c6e0aLennart Poettering <term><keycap>r</keycap></term>
7fcfb7ee2f0c2562c0e102915cacbc3ec2c4b8f8Lennart Poettering
7fcfb7ee2f0c2562c0e102915cacbc3ec2c4b8f8Lennart Poettering <listitem><para>Toggle between recursively including or
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering excluding processes in child control groups in control group
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering process counts. This setting may also be controlled using the
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering <option>--recursive=</option> command line switch. This key is
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt not available if all tasks are counted, it is only available
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering if processes are counted, as enabled with the
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering <keycap>P</keycap> or <keycap>k</keycap>
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8fLennart Poettering keys.</para></listitem>
7fcfb7ee2f0c2562c0e102915cacbc3ec2c4b8f8Lennart Poettering </varlistentry>
7fcfb7ee2f0c2562c0e102915cacbc3ec2c4b8f8Lennart Poettering
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </variablelist>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </refsect1>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <refsect1>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <title>Exit status</title>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <para>On success, 0 is returned, a non-zero failure code
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek otherwise.</para>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </refsect1>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <refsect1>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <title>See Also</title>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <para>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <citerefentry project='man-pages'><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </para>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek </refsect1>
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering
caa94887002de8596c69f578dbdb684dfb368240Lennart Poettering</refentry>