From d823d5b966f49d975a09a8512d084389d6d7ffc7 Mon Sep 17 00:00:00 2001 From: dlezcano Date: Tue, 18 Nov 2008 13:45:49 +0000 Subject: [PATCH] Added the man.1 pages From: Daniel Lezcano Added the different man pages for the lxc commands. The generation of the man pages relies on the docbook tool. Signed-off-by: Daniel Lezcano --- Makefile.am | 4 +- configure.in | 15 +++ doc/lxc-create.sgml.in | 175 +++++++++++++++++++++++++++++++++++ doc/lxc-destroy.sgml.in | 154 +++++++++++++++++++++++++++++++ doc/lxc-execute.sgml.in | 192 +++++++++++++++++++++++++++++++++++++++ doc/lxc-freeze.sgml.in | 139 ++++++++++++++++++++++++++++ doc/lxc-ls.sgml.in | 140 ++++++++++++++++++++++++++++ doc/lxc-monitor.sgml.in | 182 +++++++++++++++++++++++++++++++++++++ doc/lxc-ps.sgml.in | 154 +++++++++++++++++++++++++++++++ doc/lxc-start.sgml.in | 179 ++++++++++++++++++++++++++++++++++++ doc/lxc-stop.sgml.in | 148 ++++++++++++++++++++++++++++++ doc/lxc-unfreeze.sgml.in | 136 +++++++++++++++++++++++++++ doc/lxc-wait.sgml.in | 172 +++++++++++++++++++++++++++++++++++ lxc.spec.in | 1 + src/lxc/lxc-ls.in | 2 +- 15 files changed, 1790 insertions(+), 3 deletions(-) create mode 100644 doc/lxc-create.sgml.in create mode 100644 doc/lxc-destroy.sgml.in create mode 100644 doc/lxc-execute.sgml.in create mode 100644 doc/lxc-freeze.sgml.in create mode 100644 doc/lxc-ls.sgml.in create mode 100644 doc/lxc-monitor.sgml.in create mode 100644 doc/lxc-ps.sgml.in create mode 100644 doc/lxc-start.sgml.in create mode 100644 doc/lxc-stop.sgml.in create mode 100644 doc/lxc-unfreeze.sgml.in create mode 100644 doc/lxc-wait.sgml.in diff --git a/Makefile.am b/Makefile.am index 43edcfc24..718815316 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ # Makefile.am -SUBDIRS = src test etc -DIST_SUBDIRS = config src test etc +SUBDIRS = doc src test etc +DIST_SUBDIRS = config doc src test etc EXTRA_DIST = lxc.spec CONTRIBUTING MAINTAINERS ChangeLog:: diff --git a/configure.in b/configure.in index 7a187f22a..52e6cb32f 100644 --- a/configure.in +++ b/configure.in @@ -41,9 +41,24 @@ AC_CONFIG_FILES([ Makefile lxc.spec config/Makefile + + doc/Makefile + doc/lxc-create.sgml + doc/lxc-destroy.sgml + doc/lxc-execute.sgml + doc/lxc-start.sgml + doc/lxc-stop.sgml + doc/lxc-freeze.sgml + doc/lxc-unfreeze.sgml + doc/lxc-monitor.sgml + doc/lxc-wait.sgml + doc/lxc-ls.sgml + doc/lxc-ps.sgml + src/Makefile src/lxc/Makefile src/lxc/lxc-ps + src/lxc/lxc-ls src/lxc/lxc-checkconfig etc/Makefile etc/lxc-macvlan.conf diff --git a/doc/lxc-create.sgml.in b/doc/lxc-create.sgml.in new file mode 100644 index 000000000..f4022f28a --- /dev/null +++ b/doc/lxc-create.sgml.in @@ -0,0 +1,175 @@ + + + + + + + @LXC_GENERATE_DATE@ + + + lxc-create + 1 + + + + lxc-create + + + creates a container + + + + + + lxc-create -n name + -f config_file + + + + + Description + + + lxc-create creates a system object where is + stored the configuration informations and where will be stored + runtime information. The + identifier name is used to + specify the container to be used with the different lxc + commands. + + + + This object is the definition of the different resources an + application can use or can see. The more the configuration file + contains informations, the more the container is isolated and + the more the application is jailed. + + + + If the configuration file config_file + is not specified, the container will be created with the default + isolation: processes, sysv ipc and mount points. + + + + + Options + + + + + + + + + Specify the container name to be created. + + + + + + + + + + + Specify the configuration file to configure the virtualization + and isolation functionalities for the container. + + + + + + + + + + Diagnostic + + + + + The container already exists + + + As the message mention it, you try to create a container + but there is a container with the same name. You can use + the lxc-ls -l command to list the + available containers on the system. + + + + + + + + + + See Also + + + + lxc-destroy + 1 + , + + + lxc-execute + 1 + , + + + lxc.conf + 5 + + + + + + + + Author + Daniel Lezcano daniel.lezcano@free.fr + + + + + diff --git a/doc/lxc-destroy.sgml.in b/doc/lxc-destroy.sgml.in new file mode 100644 index 000000000..4d540d804 --- /dev/null +++ b/doc/lxc-destroy.sgml.in @@ -0,0 +1,154 @@ + + + + + + + @LXC_GENERATE_DATE@ + + + lxc-destroy + 1 + + + + lxc-destroy + + + destroy a container. + + + + + + lxc-destroy -n name + + + + + + Description + + + lxc-destroy destroys the system container + object. After the destruction the container is no longer + available and should be recreated. + + + + + + Options + + + + + + + + + Specify the container name to be destroyed. + + + + + + + + + + Diagnostic + + + + + The container was not found + + + The specified container for destruction was not found. It + is probable it does not exists and was already + destroyed.You can use the lxc-ls -l + command to list the available containers on the system. + + + + + + The container is busy + + + The specified container is running an application. At this + point it is not destroyable, and it should be stopped + before trying to destroy it. + + + + + + + + + + See Also + + + + lxc-create + 1 + , + + + lxc-stop + 1 + , + + + + + + + Author + Daniel Lezcano daniel.lezcano@free.fr + + + + + diff --git a/doc/lxc-execute.sgml.in b/doc/lxc-execute.sgml.in new file mode 100644 index 000000000..c14ed72a5 --- /dev/null +++ b/doc/lxc-execute.sgml.in @@ -0,0 +1,192 @@ + + + + + + + @LXC_GENERATE_DATE@ + + + lxc-execute + 1 + + + + lxc-execute + + + run an application inside a container. + + + + + + lxc-execute -n name + -f config_file + command + + + + + + Description + + + lxc-execute runs + the command inside the container + specified by name. This command + should be used to launch an application, eg. sshd or bash. + + + + If the container does not exist, it is automatically created and + destroyed at the end. The command can use the configuration file + to create itself the container + like lxc-create would do and will destroy the + container when the application exits. If the container was + previously created with the lxc-create command, when the + application exits, the container is not destroyed and it can be + reused later. + + + + This command is mainly used when you want to quickly launch an + application in an isolated environment. It will create an + intermediate process allowing you application to daemonize in + the pid namespace and will mount the proc filesystem to complete + the pid isolation. + + + + + + Options + + + + + + + + + Specify the container name to be executed. + + + + + + + + + + + Specify the configuration file to configure the virtualization + and isolation functionalities for the container. + + + + + + + + + + Diagnostic + + + + + The container is busy + + + The specified container is already running an + application. You should stop it before reuse this + container or create a new one. + + + + + + + + + + See Also + + + + lxc-create + 1 + , + + + lxc-destroy + 1 + , + + + lxc-start + 1 + , + + + lxc-stop + 1 + , + + + lxc.conf + 5 + + + + + + + + + Author + Daniel Lezcano daniel.lezcano@free.fr + + + + + diff --git a/doc/lxc-freeze.sgml.in b/doc/lxc-freeze.sgml.in new file mode 100644 index 000000000..45bc9d829 --- /dev/null +++ b/doc/lxc-freeze.sgml.in @@ -0,0 +1,139 @@ + + + + + + + @LXC_GENERATE_DATE@ + + + lxc-freeze + 1 + + + + lxc-freeze + + + freeze all the container's processes + + + + + + lxc-freeze -n name + + + + + + Description + + + lxc-freeze freeze all the processes running + inside the container. The processes will be blocked until they + are explicitly thawed by the lxc-unfreeze + command. This command is useful for batch managers to schedule a + group of processes. + + + + + + Options + + + + + + + + + Specify the container name to be frozen. + + + + + + + + + + Diagnostic + + + + + The container was not found + + + The specified container was not created before with + the lxc-create command. + + + + + + + + + + + See Also + + + + lxc-unfreeze + 1 + , + + + + + + + Author + Daniel Lezcano daniel.lezcano@free.fr + + + + + diff --git a/doc/lxc-ls.sgml.in b/doc/lxc-ls.sgml.in new file mode 100644 index 000000000..1fea4531b --- /dev/null +++ b/doc/lxc-ls.sgml.in @@ -0,0 +1,140 @@ + + + + + + + + @LXC_GENERATE_DATE@ + + + lxc-ls + 1 + + + + lxc-ls + + + list the containers existing on the system + + + + + + lxc-ls ls option + + + + + + Description + + lxc-ls list the containers existing on the + system. + + + + + Options + + + + + + + + + The option passed to lxc-ls are the + same as the ls command. + + + + + + + + + + Examples + + + lxc-ls -l + + + list all the container and their permissions. + + + + + + lxc-ls -1 + + + list all the containers and display the list in one column. + + + + + + + + + See Also + + + + ls + 1 + , + + + + + + + Author + Daniel Lezcano daniel.lezcano@free.fr + + + + + diff --git a/doc/lxc-monitor.sgml.in b/doc/lxc-monitor.sgml.in new file mode 100644 index 000000000..35df19002 --- /dev/null +++ b/doc/lxc-monitor.sgml.in @@ -0,0 +1,182 @@ + + + + + + + @LXC_GENERATE_DATE@ + + + lxc-monitor + 1 + + + + lxc-monitor + + + monitor the container state + + + + + + lxc-monitor -n name + + + + + + Description + + + lxc-monitor monitors the state of the + specified containers. The name can be + a regular expression, conforming with posix2, so it is possible + to monitor all the containers, several of them or just one. + + + + + + Options + + + + + + + + + Specify the container name to be monitored. This option + can be a regular expression conforming POSIX2. + + + + + + + + + + Examples + + + lxc-monitor -n foo + + + will monitor the different states for container foo. + + + + + + lxc-monitor -n 'foo|bar' + + + will monitor the different states for container foo and bar. + + + + + + lxc-monitor -n '[f|b].*' + + + will monitor the different states for container with the + name beginning with letter 'f' or 'b'. + + + + + + lxc-monitor -n '.*' + + + will monitor the different states for all containers. + + + + + + + + + Diagnostic + + + + + The container was not found + + + The specified container was not created before with + the lxc-create command. + + + + + + + + + + + See Also + + + + regex + 7 + , + + + + + + + Author + Daniel Lezcano daniel.lezcano@free.fr + + + + + diff --git a/doc/lxc-ps.sgml.in b/doc/lxc-ps.sgml.in new file mode 100644 index 000000000..ce0c4fa52 --- /dev/null +++ b/doc/lxc-ps.sgml.in @@ -0,0 +1,154 @@ + + + + + + + + @LXC_GENERATE_DATE@ + + + lxc-ps + 1 + + + + lxc-ps + + + list the processes belonging to a specific container. + + + + + + lxc-ps -n name + ps option + + + + + + Description + + lxc-ps list the processes belonging to a + specific container. + + + + + Options + + + + + + + + + specify the container name to + list the processes. + + + + + + + + + + + The option passed to lxc-ps are the + same as the ps command. + + + + + + + + + + Examples + + + lxc-ps -n foo --forest + + + list all the processes belonging to container 'foo' and show + dependencies. + + + + + + lxc-ps -n foo -o pid= + + + list all the containers and display the list in one column. + + + + + + + + + See Also + + + + ps + 1 + , + + + + + + + Author + Daniel Lezcano daniel.lezcano@free.fr + + + + + diff --git a/doc/lxc-start.sgml.in b/doc/lxc-start.sgml.in new file mode 100644 index 000000000..e536450eb --- /dev/null +++ b/doc/lxc-start.sgml.in @@ -0,0 +1,179 @@ + + + + + + + @LXC_GENERATE_DATE@ + + + lxc-start + 1 + + + + lxc-start + + + run an application inside a container. + + + + + + lxc-start -n name + command + + + + + + Description + + + lxc-start runs the specified command inside + the container specified by name. It will setup the container + according with the configuration defined previously with the + lxc-create command and execute the command inside the + container. The orphan process group and daemon are not supported + by this command. + + If no command is specified, lxc-start will + use the default + "/sbin/init" command to run a system + container. + + + + + + + Options + + + + + + + + + Specify the container name to be started. + + + + + + + + + + Diagnostic + + + + + The container is busy + + + The specified container is already running an + application. You should stop it before reuse this + container or create a new one. + + + + + + The container was not found + + + The specified container was not created before with + the lxc-create + + + + + + + + + + + See Also + + + + lxc-create + 1 + , + + + lxc-destroy + 1 + , + + + lxc-start + 1 + , + + + lxc-stop + 1 + , + + + lxc.conf + 5 + + + + + + + + + Author + Daniel Lezcano daniel.lezcano@free.fr + + + + + diff --git a/doc/lxc-stop.sgml.in b/doc/lxc-stop.sgml.in new file mode 100644 index 000000000..31e4b9666 --- /dev/null +++ b/doc/lxc-stop.sgml.in @@ -0,0 +1,148 @@ + + + + + + + @LXC_GENERATE_DATE@ + + + lxc-stop + 1 + + + + lxc-stop + + + stop the application running inside a container + + + + + + lxc-stop -n name + + + + + + Description + + + lxc-stop kills all the processes inside the + container. This command should be used if the processes are no + longer accessible and can no be exited normally. + + + + + + Options + + + + + + + + + Specify the container name to be stopped. + + + + + + + + + + Diagnostic + + + + + The container is busy + + + The specified container is already running an + application. You should stop it before reuse this + container or create a new one. + + + + + + The container was not found + + + The specified container was not created before with + the lxc-create command. + + + + + + + + + + + See Also + + + + lxc-start + 1 + , + + + + + + + Author + Daniel Lezcano daniel.lezcano@free.fr + + + + + diff --git a/doc/lxc-unfreeze.sgml.in b/doc/lxc-unfreeze.sgml.in new file mode 100644 index 000000000..1e36fdf32 --- /dev/null +++ b/doc/lxc-unfreeze.sgml.in @@ -0,0 +1,136 @@ + + + + + + + @LXC_GENERATE_DATE@ + + + lxc-unfreeze + 1 + + + + lxc-unfreeze + + + thaw all the container's processes + + + + + + lxc-unfreeze -n name + + + + + + Description + + + lxc-unfreeze will thaw all the processes + previously frozen by the lxc-freeze command. + + + + + + Options + + + + + + + + + Specify the container name to be frozen. + + + + + + + + + + Diagnostic + + + + + The container was not found + + + The specified container was not created before with + the lxc-create command. + + + + + + + + + + + See Also + + + + lxc-unfreeze + 1 + , + + + + + + + Author + Daniel Lezcano daniel.lezcano@free.fr + + + + + diff --git a/doc/lxc-wait.sgml.in b/doc/lxc-wait.sgml.in new file mode 100644 index 000000000..dc6d1e5d5 --- /dev/null +++ b/doc/lxc-wait.sgml.in @@ -0,0 +1,172 @@ + + + + + + + + @LXC_GENERATE_DATE@ + + + lxc-wait + 1 + + + + lxc-wait + + + wait for a specific container state + + + + + + lxc-wait -n name + -s states + + + + + + Description + + lxc-wait waits for a specific container state + before exiting, this is useful for scripting. + + + + + Options + + + + + + + + + Specify the container name to be waited. + + + + + + + + + + + Specify the container state(s) to wait for. The container + states can be ORed to specify several states. + + + + + + + + + + Examples + + + lxc-wait -n foo -s RUNNING + + + exits when 'RUNNING' is reached. + + + + + + lxc-wait -n 'RUNNING|STOPPED' + + + exits when 'RUNNING' or 'STOPPED' state is reached. + + + + + + + + + Diagnostic + + + + + The container was not found + + + The specified container was not created before with + the lxc-create command. + + + + + + + + + + + See Also + + + + lxc-info + 1 + , + + + + + + + Author + Daniel Lezcano daniel.lezcano@free.fr + + + + + diff --git a/lxc.spec.in b/lxc.spec.in index 96dfcfba9..3df8b7d93 100644 --- a/lxc.spec.in +++ b/lxc.spec.in @@ -135,6 +135,7 @@ fi %{_sysconfdir}/%{name}/* %{_libdir}/*.so* %{_bindir}/* +%{_mandir}/* %files devel %defattr(-,root,root) diff --git a/src/lxc/lxc-ls.in b/src/lxc/lxc-ls.in index f7dd15dd3..5809ab31e 100644 --- a/src/lxc/lxc-ls.in +++ b/src/lxc/lxc-ls.in @@ -6,4 +6,4 @@ if [ ! -r $lxcpath ]; then exit 0 fi -ls -1 $lxcpath +ls $* $lxcpath -- 2.39.5