manual: add manual for ps command

This patch add manual for ps command, and remove remove example
for --format command, which is not necessary.

Suggested-by: Aleksa Sarai <asarai@suse.de>
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
This commit is contained in:
Zhao Lei 2016-05-24 18:52:29 +08:00
parent 935eba1cc1
commit 34d100f970
2 changed files with 14 additions and 6 deletions

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

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 {