From: Weng Meiling <wengmeiling.w...@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.w...@huawei.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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to