Hi

In Linux kernel 3.0.0, lxc-ps does not show any container names.

I think it's due to the following change:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6-stable.git;a=commit;h=1bdcd78e2445f1ef7097a3ae7ef12e8f9c4fb05f

`ns' no longer appears in /proc/*/cgroups.
Instead, blkio starts appearing now.

Here is a simple fix.

--- lxc/src/lxc/lxc-ps.in       2011-08-07 10:02:36.806150554 +0900
+++ lxc-jwh/src/lxc/lxc-ps.in   2011-08-07 10:04:00.366149817 +0900
@@ -119,7 +119,8 @@
     foreach ( @cgroup ) {
         chomp;
         # find the container name
-        if (m/[:,]ns[:,]/o) {
+        my @a = split /:/;
+        if ($a[2] =~ m/\/\S+?$/o) {
            # container name after :/
            s/.*:\///o;
             $container = $_;


Thanks.

-- 
Yamamoto - Joe's Web Hosting <yamam...@jwh.jp>


------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to