[PATCH 1/1] lxc-ps: Nit - Avoid blank CONTAINER column

Cedric Le Goater clg at fr.ibm.com
Fri Feb 12 09:01:28 PST 2010


On 02/11/2010 05:25 AM, Sukadev Bhattiprolu wrote:
> From: Sukadev Bhattiprolu<sukadev at linux.vnet.ibm.com>
> Date: Wed, 10 Feb 2010 20:09:17 -0800
> Subject: [PATCH 1/1] lxc-ps: Nit - Avoid blank CONTAINER column
>
> The contianer name is not printed in the lxc-ps output unless the --lxc
> option is specified.  But the CONTAINER column is printed (and left
> blank) even if the --lxc option is not specified.
>
> 	$ /usr/local/bin/lxc-ps -n foo
> 	CONTAINER    PID TTY          TIME CMD
> 		   19525 pts/2    00:00:01 bash
> 		   20311 pts/2    00:00:00 lxc-ps
> 		   20312 pts/2    00:00:00 ps
>
> Like normal ps, it would be less confusing (IMHO) if the CONTAINER
> column is skipped unless the --lxc option is specified.
>
> 	$ ./lxc-ps -n foo
> 	  PID TTY          TIME CMD
> 	19525 pts/2    00:00:01 bash
> 	20339 pts/2    00:00:00 lxc-ps
> 	20340 pts/2    00:00:00 ps
>
> 	$ ./lxc-ps --lxc -n foo
> 	CONTAINER    PID TTY          TIME CMD
> 	foo        19646 pts/1    00:00:00 lxc-init
> 	foo        19647 pts/1    00:00:00 bash

it would be real nice to have but without the --lxc.

can we kill the short option '-n', which conflicts with the ps below, and make
sure that only '--name'  triggers the extra CONTAINER column ?

C.

  


More information about the Containers mailing list