]> git.proxmox.com Git - systemd.git/blame - man/systemd-cgtop.html
Imported Upstream version 220
[systemd.git] / man / systemd-cgtop.html
CommitLineData
663996b3
MS
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-cgtop</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
2 a.headerlink {
3 color: #c60f0f;
4 font-size: 0.8em;
5 padding: 0 4px 0 4px;
6 text-decoration: none;
7 visibility: hidden;
8 }
9
10 a.headerlink:hover {
11 background-color: #c60f0f;
12 color: white;
13 }
14
15 h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
16 visibility: visible;
17 }
18 </style><a href="index.html">Index </a>·
19 <a href="systemd.directives.html">Directives </a>·
20 <a href="../python-systemd/index.html">Python </a>·
21 <a href="../libudev/index.html">libudev </a>·
e3bff60a 22 <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 220</span><hr><div class="refentry"><a name="systemd-cgtop"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-cgtop — Show top control groups by their resource usage</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-cgtop</code> [OPTIONS...]</p></div></div><div class="refsect1"><a name="idm140510925790800"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-cgtop</strong></span> shows the top control
e735f4d4
MP
23 groups of the local Linux control group hierarchy, ordered by
24 their CPU, memory, or disk I/O load. The display is refreshed in
25 regular intervals (by default every 1s), similar in style to
26 <a href="http://man7.org/linux/man-pages/man1/top.1.html"><span class="citerefentry"><span class="refentrytitle">top</span>(1)</span></a>.
27 If <span class="command"><strong>systemd-cgtop</strong></span> is not connected to a tty,
28 only one iteration is performed and no columns headers are
29 printed. This mode is suitable for scripting.</p><p>Resource usage is only accounted for control groups in the
30 relevant hierarchy, i.e. CPU usage is only accounted for control
31 groups in the "<code class="literal">cpuacct</code>" hierarchy, memory usage
32 only for those in "<code class="literal">memory</code>" and disk I/O usage for
33 those in "<code class="literal">blkio</code>". If resource monitoring for
34 these resources is required, it is recommended to add the
35 <code class="varname">CPUAccounting=1</code>,
36 <code class="varname">MemoryAccounting=1</code> and
37 <code class="varname">BlockIOAccounting=1</code> settings in the unit files
38 in question. See
39 <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>
40 for details.</p><p>To emphasize this: unless
41 "<code class="literal">CPUAccounting=1</code>",
42 "<code class="literal">MemoryAccounting=1</code>" and
43 "<code class="literal">BlockIOAccounting=1</code>" are enabled for the
44 services in question, no resource accounting will be available for
45 system services and the data shown by
e3bff60a 46 <span class="command"><strong>systemd-cgtop</strong></span> will be incomplete.</p></div><div class="refsect1"><a name="idm140510920828016"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-p"><span class="term"><code class="option">-p</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p>Order by control group
e735f4d4
MP
47 path name.</p></dd><dt id="-t"><span class="term"><code class="option">-t</code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>Order by number of tasks in control group
48 (i.e. threads and processes).</p></dd><dt id="-c"><span class="term"><code class="option">-c</code></span><a class="headerlink" title="Permalink to this term" href="#-c">¶</a></dt><dd><p>Order by CPU load.</p></dd><dt id="-m"><span class="term"><code class="option">-m</code></span><a class="headerlink" title="Permalink to this term" href="#-m">¶</a></dt><dd><p>Order by memory usage.</p></dd><dt id="-i"><span class="term"><code class="option">-i</code></span><a class="headerlink" title="Permalink to this term" href="#-i">¶</a></dt><dd><p>Order by disk I/O load.</p></dd><dt id="-b"><span class="term"><code class="option">-b</code>, </span><span class="term"><code class="option">--batch</code></span><a class="headerlink" title="Permalink to this term" href="#-b">¶</a></dt><dd><p>Run in "batch" mode: do not accept input and
49 run until the iteration limit set with
50 <code class="option">--iterations</code> is exhausted or until killed.
51 This mode could be useful for sending output from
52 <span class="command"><strong>systemd-cgtop</strong></span> to other programs or to a
53 file.</p></dd><dt id="-n"><span class="term"><code class="option">-n</code>, </span><span class="term"><code class="option">--iterations=</code></span><a class="headerlink" title="Permalink to this term" href="#-n">¶</a></dt><dd><p>Perform only this many iterations.
54 </p></dd><dt id="-d"><span class="term"><code class="option">-d</code>, </span><span class="term"><code class="option">--delay=</code></span><a class="headerlink" title="Permalink to this term" href="#-d">¶</a></dt><dd><p>Specify refresh delay in seconds (or if one of
55 "<code class="literal">ms</code>",
56 "<code class="literal">us</code>",
57 "<code class="literal">min</code>" is specified as unit in this time
58 unit).</p></dd><dt id="--depth="><span class="term"><code class="option">--depth=</code></span><a class="headerlink" title="Permalink to this term" href="#--depth=">¶</a></dt><dd><p>Maximum control group tree traversal depth.
59 Specifies how deep <span class="command"><strong>systemd-cgtop</strong></span> shall
60 traverse the control group hierarchies. If 0 is specified,
61 only the root group is monitored. For 1, only the first level
62 of control groups is monitored, and so on. Defaults to
63 3.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
e3bff60a 64 </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm140510920806832"></a><h2 id="Keys">Keys<a class="headerlink" title="Permalink to this headline" href="#Keys">¶</a></h2><p><span class="command"><strong>systemd-cgtop</strong></span> is an interactive tool and
e735f4d4
MP
65 may be controlled via user input using the following keys:</p><div class="variablelist"><dl class="variablelist"><dt id="h"><span class="term">h</span><a class="headerlink" title="Permalink to this term" href="#h">¶</a></dt><dd><p>Shows a short help text.</p></dd><dt id="SPACE"><span class="term">SPACE</span><a class="headerlink" title="Permalink to this term" href="#SPACE">¶</a></dt><dd><p>Immediately refresh output.</p></dd><dt id="q"><span class="term">q</span><a class="headerlink" title="Permalink to this term" href="#q">¶</a></dt><dd><p>Terminate the program.</p></dd><dt id="p"><span class="term">p, </span><span class="term">t, </span><span class="term">c, </span><span class="term">m, </span><span class="term">i</span><a class="headerlink" title="Permalink to this term" href="#p">¶</a></dt><dd><p>Sort the control groups by path, number of
66 tasks, CPU load, memory usage, or IO load, respectively.
67 </p></dd><dt id="%"><span class="term">%</span><a class="headerlink" title="Permalink to this term" href="#%">¶</a></dt><dd><p>Toggle between showing CPU time as time or
68 percentage.</p></dd><dt id="+"><span class="term">+, </span><span class="term">-</span><a class="headerlink" title="Permalink to this term" href="#+">¶</a></dt><dd><p>Increase or decrease refresh delay,
e3bff60a
MP
69 respectively.</p></dd></dl></div></div><div class="refsect1"><a name="idm140510920794960"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure code
70 otherwise.</p></div><div class="refsect1"><a name="idm140510920793808"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
e735f4d4
MP
71 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
72 <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
73 <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>,
74 <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>,
75 <a href="http://man7.org/linux/man-pages/man1/top.1.html"><span class="citerefentry"><span class="refentrytitle">top</span>(1)</span></a>
76 </p></div></div></body></html>