All of lore.kernel.org
 help / color / mirror / Atom feed
From: Balbir Singh <balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: Ian jonhson <jonhson.ian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org,
	Daniel Lezcano <dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
Subject: Re: container userspace tools
Date: Fri, 12 Dec 2008 19:55:29 +0530	[thread overview]
Message-ID: <20081212142529.GD4365@balbir.in.ibm.com> (raw)
In-Reply-To: <8f34198c0812120202t39582a27k47c98b88246f18ce-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

* Ian jonhson <jonhson.ian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> [2008-12-12 18:02:22]:

> >
> > OK, so this is not an lxc kernel, but a mainline kernel.
> >
> 
> So, what is the lxc kernel you meat? Is it different from the
> 2.6.27-rc8. I use that version  recommended by Daniel.
> 
> >>
> >> > 1. Can you see the memory.usage_in_bytes corresponding to the control
> >> > group where you run the container
> >>
> >> How can I know the number correspond to the control group?
> >
> > From outside the container, figure out the process id of init and then
> > do a cat /proc/<pid>/cgroup. Then go to that directory and cat
> > memory.usage_in_bytes, memory.stat and memory.limit_in_bytes to verify
> > the setup
> >
> 
> OK, I have done the checking, but I don't understand what is meaning of
> "corresponding". The content is shown as follows:
> 
> $ cat /proc/4506/cgroup
> 255:freezer,devices,memory,cpuacct,cpu,ns,debug,cpuset:/
> $ cat memory.usage_in_bytes
> 223932416

OK, so memory.usage_in_bytes is 223932416 for the root cgroup. You
process 4506, which is (I assume) a container process is running in
"/" or the root cgroup. By default root cgroups are unlimited. You can
verify by reading memory.limit_in_bytes

> 
> 
> >>
> >> > 2. Check tasks file to see that the container tasks are indeed in the
> >> > container.
> >> >
> >>
> >> My program forks a child and its child (grandson of previous process) call the
> >> the /bin/bash to open a shell. I just can find the parent process is
> >> in container
> >> tasks file, but its child and grandson process are not.
> >>
> >
> > Hmmm.. but the child and grandson are alive right?
> yes... I can see them by a container-outside bash running with ps
> 
> > Do a cat
> > /proc/<pid>/cgroup on them to see where they went or where they are.
> >
> 
> They are all there, similar with pid=4506.
> 
> $ cat /proc/4506/cgroup
> 255:freezer,devices,memory,cpuacct,cpu,ns,debug,cpuset:/
> $ cat /proc/4507/cgroup
> 255:freezer,devices,memory,cpuacct,cpu,ns,debug,cpuset:/4507
> $ cat /proc/4508/cgroup
> 255:freezer,devices,memory,cpuacct,cpu,ns,debug,cpuset:/4506
>

Are there three containers on the system

Can you send me the output of <cgroup mount point>/4507/memory.* and
4506/memory.*. cgroup mount point can be obtained from /proc/mounts.
 

-- 
	Balbir

  parent reply	other threads:[~2008-12-12 14:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-10 11:01 container userspace tools Daniel Lezcano
     [not found] ` <8f34198c0810150033p42b74badrf194e66433e32cd5@mail.gmail.com>
     [not found]   ` <48F5BE23.1060602@fr.ibm.com>
     [not found]     ` <8f34198c0810150351n7549a1dcx63547746344fce25@mail.gmail.com>
     [not found]       ` <48F5DB43.70003@fr.ibm.com>
     [not found]         ` <8f34198c0810150602w70d31453je6fd8811799a3857@mail.gmail.com>
     [not found]           ` <48F5EBF3.1070204@fr.ibm.com>
     [not found]             ` <48F5EBF3.1070204-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-10-25 11:06               ` Ian jonhson
     [not found]                 ` <8f34198c0810250406s4f1c9337ha2bccc10faed1948-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-10-25 13:08                   ` Daniel Lezcano
     [not found]                     ` <49031A54.70806-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-10-25 14:39                       ` Ian jonhson
     [not found]                         ` <8f34198c0810250739s77ad8271u93992c0bcf61345c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-10-25 15:47                           ` Daniel Lezcano
     [not found]                             ` <49033F90.8090201-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-10-27 14:50                               ` Serge E. Hallyn
     [not found]                                 ` <20081027145058.GA9724-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-10-27 15:07                                   ` Ian jonhson
     [not found]                                     ` <8f34198c0810270807k52fa15b8x6402ea262ae2ddc6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-10-27 16:00                                       ` Serge E. Hallyn
     [not found]                                         ` <20081027160003.GB9724-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-10-27 16:29                                           ` Ian jonhson
     [not found]                                             ` <8f34198c0810270929g3ce890e5l91f21523247cf169-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-10-27 16:49                                               ` Serge E. Hallyn
2008-10-27 16:23                               ` Ian jonhson
     [not found]                                 ` <8f34198c0810270923s40ee505ay214bc9dd8ebae26d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-10-27 16:53                                   ` Serge E. Hallyn
2008-10-27 20:28                                   ` Daniel Lezcano
     [not found]                                     ` <49062482.7070006-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-10-28  8:10                                       ` Ian jonhson
     [not found]                                         ` <8f34198c0810280110s6a7fd98dm355b4747a26ff895-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-11-05 20:33                                           ` Daniel Lezcano
2008-12-12  7:33                       ` Ian jonhson
     [not found]                         ` <8f34198c0812112333k6c1474f3hb67e963b39a0d0d6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-12-12  8:12                           ` Balbir Singh
     [not found]                             ` <20081212081238.GA4365-SINUvgVNF2CyUtPGxGje5AC/G2K4zDHf@public.gmane.org>
2008-12-12  9:06                               ` Ian jonhson
     [not found]                                 ` <8f34198c0812120106k390a1097ub31905cd2bc44676-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-12-12  9:18                                   ` Balbir Singh
     [not found]                                     ` <20081212091829.GB4365-SINUvgVNF2CyUtPGxGje5AC/G2K4zDHf@public.gmane.org>
2008-12-12 10:02                                       ` Ian jonhson
     [not found]                                         ` <8f34198c0812120202t39582a27k47c98b88246f18ce-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-12-12 14:25                                           ` Balbir Singh [this message]
     [not found]                                             ` <20081212142529.GD4365-SINUvgVNF2CyUtPGxGje5AC/G2K4zDHf@public.gmane.org>
2008-12-13  8:18                                               ` Ian jonhson
     [not found]                                                 ` <8f34198c0812130018j27b5ee34r15eed114013dfba4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-12-13  8:20                                                   ` Ian jonhson
2008-12-12  9:21                                   ` Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081212142529.GD4365@balbir.in.ibm.com \
    --to=balbir-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org \
    --cc=jonhson.ian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.