[lxc-devel] PATCH: lxc-ps: blkio instead of ns in /proc/*/cgroup
Yamamoto - Joe's Web Hosting
yamamoto at jwh.jp
Sun Aug 7 01:33:55 UTC 2011
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 <yamamoto at jwh.jp>
More information about the lxc-devel
mailing list