Commit 7dc6f6e2 by Dwight Engen Committed by Stéphane Graber

port lxc-top from lua to C for wider availability

- keep but rename the lua version as an example of how to use the lua API - got rid of the fairly useless --max argument Signed-off-by: 's avatarDwight Engen <dwight.engen@oracle.com> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 3cd988cc
......@@ -47,7 +47,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<cmdsynopsis>
<command>lxc-top</command>
<arg choice="opt">--help</arg>
<arg choice="opt">--max <replaceable>count</replaceable></arg>
<arg choice="opt">--delay <replaceable>delay</replaceable></arg>
<arg choice="opt">--sort <replaceable>sortby</replaceable></arg>
<arg choice="opt">--reverse</arg>
......@@ -60,9 +59,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<command>lxc-top</command> displays container statistics. The output
is updated every <replaceable>delay</replaceable> seconds, and is
ordered according to the <replaceable>sortby</replaceable> value
given. Specifying <replaceable>count</replaceable> will limit the
number of containers displayed, otherwise <command>lxc-top</command>
will display as many containers as can fit in your terminal.
given. <command>lxc-top</command> will display as many containers as
can fit in your terminal. Press 'q' to quit. Press one of the sort
key letters to sort by that statistic. Pressing a sort key letter a
second time reverses the sort order.
</para>
</refsect1>
......@@ -72,26 +72,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<varlistentry>
<term>
<option><optional>-m, --max <replaceable>count</replaceable></optional></option>
</term>
<listitem>
<para>
Limit the number of containers displayed to
<replaceable>count</replaceable>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option><optional>-d, --delay <replaceable>delay</replaceable></optional></option>
</term>
<listitem>
<para>
Amount of time in seconds to delay between screen updates.
This can be specified as less than a second by giving a
rational number, for example 0.5 for a half second delay. The
default is 3 seconds.
The default is 3 seconds.
</para>
</listitem>
</varlistentry>
......@@ -103,7 +89,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<para>
Sort the containers by name, cpu use, or memory use. The
<replaceable>sortby</replaceable> argument should be one of
the letters n,c,d,m,k to sort by name, cpu use, disk I/O, memory,
the letters n,c,b,m,k to sort by name, cpu use, block I/O, memory,
or kernel memory use respectively. The default is 'n'.
</para>
</listitem>
......
......@@ -165,7 +165,7 @@ bin_SCRIPTS = lxc-checkconfig
EXTRA_DIST = \
lxc-device \
lxc-ls \
lxc-top \
lxc-top.lua \
lxc.net \
lxc-restore-net
......@@ -177,10 +177,6 @@ else
bin_SCRIPTS += legacy/lxc-ls
endif
if ENABLE_LUA
bin_SCRIPTS += lxc-top
endif
bin_PROGRAMS = \
lxc-attach \
lxc-autostart \
......@@ -198,6 +194,7 @@ bin_PROGRAMS = \
lxc-snapshot \
lxc-start \
lxc-stop \
lxc-top \
lxc-unfreeze \
lxc-unshare \
lxc-usernsexec \
......@@ -231,6 +228,7 @@ lxc_monitord_SOURCES = lxc_monitord.c
lxc_clone_SOURCES = lxc_clone.c
lxc_start_SOURCES = lxc_start.c
lxc_stop_SOURCES = lxc_stop.c
lxc_top_SOURCES = lxc_top.c
lxc_unfreeze_SOURCES = lxc_unfreeze.c
lxc_unshare_SOURCES = lxc_unshare.c
lxc_wait_SOURCES = lxc_wait.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment