| 1 |
<!-- SPDX-License-Identifier: LGPL-2.1+ --> |
| 2 |
|
| 3 |
<!DOCTYPE refentry PUBLIC @docdtd@ [ |
| 4 |
|
| 5 |
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml"> |
| 6 |
]> |
| 7 |
|
| 8 |
<refentry> |
| 9 |
|
| 10 |
<docinfo><date>@LXC_GENERATE_DATE@</date></docinfo> |
| 11 |
|
| 12 |
<refmeta> |
| 13 |
<refentrytitle>lxc-top</refentrytitle> |
| 14 |
<manvolnum>1</manvolnum> |
| 15 |
</refmeta> |
| 16 |
|
| 17 |
<refnamediv> |
| 18 |
<refname>lxc-top</refname> |
| 19 |
|
| 20 |
<refpurpose> |
| 21 |
monitor container statistics |
| 22 |
</refpurpose> |
| 23 |
</refnamediv> |
| 24 |
|
| 25 |
<refsynopsisdiv> |
| 26 |
<cmdsynopsis> |
| 27 |
<command>lxc-top</command> |
| 28 |
<arg choice="opt">--help</arg> |
| 29 |
<arg choice="opt">--delay <replaceable>delay</replaceable></arg> |
| 30 |
<arg choice="opt">--sort <replaceable>sortby</replaceable></arg> |
| 31 |
<arg choice="opt">--reverse</arg> |
| 32 |
</cmdsynopsis> |
| 33 |
</refsynopsisdiv> |
| 34 |
|
| 35 |
<refsect1> |
| 36 |
<title>Description</title> |
| 37 |
<para> |
| 38 |
<command>lxc-top</command> displays container statistics. The output |
| 39 |
is updated every <replaceable>delay</replaceable> seconds, and is |
| 40 |
ordered according to the <replaceable>sortby</replaceable> value |
| 41 |
given. <command>lxc-top</command> will display as many containers as |
| 42 |
can fit in your terminal. Press 'q' to quit. Press one of the sort |
| 43 |
key letters to sort by that statistic. Pressing a sort key letter a |
| 44 |
second time reverses the sort order. |
| 45 |
</para> |
| 46 |
</refsect1> |
| 47 |
|
| 48 |
<refsect1> |
| 49 |
<title>Options</title> |
| 50 |
<variablelist> |
| 51 |
|
| 52 |
<varlistentry> |
| 53 |
<term> |
| 54 |
<option>-d, --delay <replaceable>delay</replaceable></option> |
| 55 |
</term> |
| 56 |
<listitem> |
| 57 |
<para> |
| 58 |
Amount of time in seconds to delay between screen updates. |
| 59 |
The default is 3 seconds. |
| 60 |
</para> |
| 61 |
</listitem> |
| 62 |
</varlistentry> |
| 63 |
<varlistentry> |
| 64 |
<term> |
| 65 |
<option>-s, --sort <replaceable>sortby</replaceable></option> |
| 66 |
</term> |
| 67 |
<listitem> |
| 68 |
<para> |
| 69 |
Sort the containers by name, cpu use, or memory use. The |
| 70 |
<replaceable>sortby</replaceable> argument should be one of |
| 71 |
the letters n,c,b,m,k to sort by name, cpu use, block I/O, memory, |
| 72 |
or kernel memory use respectively. The default is 'n'. |
| 73 |
</para> |
| 74 |
</listitem> |
| 75 |
</varlistentry> |
| 76 |
<varlistentry> |
| 77 |
<term> |
| 78 |
<option>-r, --reverse</option> |
| 79 |
</term> |
| 80 |
<listitem> |
| 81 |
<para> |
| 82 |
Reverse the default sort order. By default, names sort in |
| 83 |
ascending alphabetical order and values sort in descending |
| 84 |
amounts (ie. largest value first). |
| 85 |
</para> |
| 86 |
</listitem> |
| 87 |
</varlistentry> |
| 88 |
</variablelist> |
| 89 |
</refsect1> |
| 90 |
|
| 91 |
<refsect1> |
| 92 |
<title>Example</title> |
| 93 |
<variablelist> |
| 94 |
<varlistentry> |
| 95 |
<term>lxc-top --delay 1 --sort m</term> |
| 96 |
<listitem> |
| 97 |
<para> |
| 98 |
Display containers, updating every second, sorted by memory use. |
| 99 |
</para> |
| 100 |
</listitem> |
| 101 |
</varlistentry> |
| 102 |
</variablelist> |
| 103 |
</refsect1> |
| 104 |
|
| 105 |
<refsect1> |
| 106 |
<title>Notes</title> |
| 107 |
<para> |
| 108 |
For performance reasons the kernel does not account kernel memory use |
| 109 |
unless a kernel memory limit is set. If a limit is not set, <command> |
| 110 |
lxc-top</command> will display kernel memory use as 0. If no containers |
| 111 |
are being accounted, the KMem column will not be displayed. A limit can |
| 112 |
be set by specifying |
| 113 |
<programlisting> |
| 114 |
lxc.cgroup.memory.kmem.limit_in_bytes = <replaceable>number</replaceable> |
| 115 |
</programlisting> |
| 116 |
in your container configuration file, see |
| 117 |
<citerefentry> |
| 118 |
<refentrytitle>lxc.conf</refentrytitle> |
| 119 |
<manvolnum>5</manvolnum> |
| 120 |
</citerefentry>. |
| 121 |
</para> |
| 122 |
</refsect1> |
| 123 |
|
| 124 |
&seealso; |
| 125 |
|
| 126 |
</refentry> |
| 127 |
|
| 128 |
<!-- Keep this comment at the end of the file |
| 129 |
Local variables: |
| 130 |
mode: sgml |
| 131 |
sgml-omittag:t |
| 132 |
sgml-shorttag:t |
| 133 |
sgml-minimize-attributes:nil |
| 134 |
sgml-always-quote-attributes:t |
| 135 |
sgml-indent-step:2 |
| 136 |
sgml-indent-data:t |
| 137 |
sgml-parent-document:nil |
| 138 |
sgml-default-dtd-file:nil |
| 139 |
sgml-exposed-tags:nil |
| 140 |
sgml-local-catalogs:nil |
| 141 |
sgml-local-ecat-files:nil |
| 142 |
End: |
| 143 |
--> |