Add pid and stdio to process state
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
36eb83cb99
commit
01176f2d7f
8 changed files with 163 additions and 111 deletions
|
@ -54,6 +54,23 @@ var containersCommand = cli.Command{
|
|||
Action: listContainers,
|
||||
}
|
||||
|
||||
var stateCommand = cli.Command{
|
||||
Name: "state",
|
||||
Usage: "get a raw dump of the containerd state",
|
||||
Action: func(context *cli.Context) {
|
||||
c := getClient(context)
|
||||
resp, err := c.State(netcontext.Background(), &types.StateRequest{})
|
||||
if err != nil {
|
||||
fatal(err.Error(), 1)
|
||||
}
|
||||
data, err := json.Marshal(resp)
|
||||
if err != nil {
|
||||
fatal(err.Error(), 1)
|
||||
}
|
||||
fmt.Print(string(data))
|
||||
},
|
||||
}
|
||||
|
||||
var listCommand = cli.Command{
|
||||
Name: "list",
|
||||
Usage: "list all running containers",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue