Merge pull request #843 from zhaoleidd/update_manuals

Update manuals
This commit is contained in:
Qiang Huang 2016-05-28 14:10:43 +08:00
commit 392a659733
13 changed files with 30 additions and 27 deletions

View File

@ -16,7 +16,8 @@ var deleteCommand = cli.Command{
ArgsUsage: `<container-id>
Where "<container-id>" is the name for the instance of the container.
EXAMPLE:
For example, if the container id is "ubuntu01" and runc list currently shows the
status of "ubuntu01" as "destroyed" the following will delete resources held for
"ubuntu01" removing "ubuntu01" from the runc list of containers:

View File

@ -22,6 +22,7 @@ var execCommand = cli.Command{
Where "<container-id>" is the name for the instance of the container and
"<container command>" is the command to be executed in the container.
EXAMPLE:
For example, if the container is configured to run the linux ps command the
following will output a list of processes running in the container:

View File

@ -56,7 +56,8 @@ var killCommand = cli.Command{
Where "<container-id>" is the name for the instance of the container and
"<signal>" is the signal to be sent to the init process.
EXAMPLE:
For example, if the container id is "ubuntu01" the following will send a "KILL"
signal to the init process of the "ubuntu01" container:

View File

@ -16,7 +16,7 @@ import (
"github.com/opencontainers/runc/libcontainer/utils"
)
const formatOptions = `table or json`
const formatOptions = `table(default) or json`
// containerState represents the platform agnostic pieces relating to a
// running container's status and state
@ -40,12 +40,7 @@ var listCommand = cli.Command{
cli.StringFlag{
Name: "format, f",
Value: "",
Usage: `select one of: ` + formatOptions + `.
The default format is table. The following will output the list of containers
in json format:
# runc list -f json`,
Usage: `select one of: ` + formatOptions,
},
cli.BoolFlag{
Name: "quiet, q",

View File

@ -1,7 +1,7 @@
# NAME
runc checkpoint - checkpoint a running container
# USAGE
# SYNOPSIS
runc checkpoint [command options] <container-id>
Where "<container-id>" is the name for the instance of the container to be

View File

@ -1,5 +1,5 @@
# NAME
runc events - display container events such as OOM notifications, cpu, memory, IO and network stats
runc events - display container events such as OOM notifications, cpu, memory, and IO usage statistics
# SYNOPSIS
runc events [command options] <container-id>
@ -13,4 +13,3 @@ information is displayed once every 5 seconds.
# OPTIONS
--interval "5s" set the stats collection interval
--stats display the container's stats then exit

View File

@ -26,3 +26,4 @@ following will output a list of processes running in the container:
--apparmor set the apparmor profile for the process
--no-new-privs set the no new privileges value for the process
--cap, -c [--cap option --cap option] add a capability to the bounding set for the process
--no-subreaper disable the use of the subreaper used to reap reparented processes

View File

@ -4,12 +4,6 @@
# SYNOPSIS
runc list [command options] [arguments...]
# DESCRIPTION
The default format is table. The following will output the list of containers
in json format:
# runc list -f json
# OPTIONS
--format, -f select one of: table or json.
--format, -f select one of: table(default) or json.
--quiet, -q display only container IDs

13
man/runc-ps.8.md Normal file
View File

@ -0,0 +1,13 @@
# NAME
runc ps - ps displays the processes running inside a container
# SYNOPSIS
runc ps [command options] <container-id> <ps options>
# OPTIONS
--format, -f select one of: table(default) or json
The default format is table. The following will output the processes of a container
in json format:
# runc ps -f json

View File

@ -22,3 +22,5 @@ using the runc checkpoint command.
--bundle, -b path to the root of the bundle directory
--detach, -d detach from the container's process
--pid-file specify the file to write the process id to
--no-subreaper disable the use of the subreaper used to reap reparented processes
--no-pivot do not use pivot root to jail process inside rootfs. This should be used whenever the rootfs is on top of a ramdisk

View File

@ -14,7 +14,7 @@ parameter that is initially set to call the "sh" command when the container is
started. Calling "sh" may work for an ubuntu container or busybox, but will not
work for containers that do not include the "sh" program.
EXAMPLE:
# EXAMPLE
To run docker's hello-world container one needs to set the args parameter
in the spec to call hello. This can be done using the sed command or a text
editor. The following commands create a bundle for hello-world, change the

7
ps.go
View File

@ -21,12 +21,7 @@ var psCommand = cli.Command{
cli.StringFlag{
Name: "format, f",
Value: "",
Usage: `select one of: ` + formatOptions + `.
The default format is table. The following will output the processes of a container
in json format:
# runc ps -f json`,
Usage: `select one of: ` + formatOptions,
},
},
Action: func(context *cli.Context) error {

View File

@ -32,7 +32,8 @@ The accepted format is as follow (unchanged values can be omitted):
"limit": 0,
"reservation": 0,
"swap": 0,
"kernel": 0
"kernel": 0,
"kernelTCP": 0
},
"cpu": {
"shares": 0,