[lxc-devel] [PATCH] lxc-ps: display process when container is frozen
Serge Hallyn
serge.hallyn at ubuntu.com
Mon Jun 10 12:11:37 UTC 2013
Quoting Weng Meiling (wengmeiling.weng at huawei.com):
>
> From: Weng Meiling <wengmeiling.weng at huawei.com>
>
> When we use lxc-ps to show the process, it's more appropriate to
> show process when container is frozen.
>
> Signed-off-by: Weng Meiling <wengmeiling.weng at huawei.com>
Makes sense to me.
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
> ---
> src/lxc/lxc-ps.in | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/lxc/lxc-ps.in b/src/lxc/lxc-ps.in
> index 29e8097..4d5bd69 100644
> --- a/src/lxc/lxc-ps.in
> +++ b/src/lxc/lxc-ps.in
> @@ -116,7 +116,7 @@ for container in ${containers}; do
> container_field_width=${#container}
> fi
>
> - if lxc-info -P $lxc_path -t RUNNING -n $container; then
> + if ! lxc-info -P $lxc_path -t STOPPED -n $container; then
> initpid=`lxc-info -P $lxc_path -p -n $container | awk -F: '{ print $2 }' | awk '{ print $1 }'`
> cgroup=`head -n 1 /proc/$initpid/cgroup | awk -F: '{ print $3}'`
> if [ -f "$parent_cgroup/$cgroup/tasks" ]; then
> -- 1.7.1
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel
More information about the lxc-devel
mailing list