[Lxc-users] Hiding container processes from Host/HN's 'ps'

2011-05-03 Thread ian sison (mailing list)
Hi all - In openvz, a certain sysctl parameter, kernel.pid_ns_hide_child = 1 when executed at HN system startup will hide any processes that run inside the running containers from appearing in the output of 'ps'. This makes for a cleaner 'ps' output in the hardware node, and prevents

Re: [Lxc-users] Hiding container processes from Host/HN's 'ps'

2011-05-03 Thread Greg Kurz
On Tue, 2011-05-03 at 18:53 +0800, ian sison (mailing list) wrote: Hi all - In openvz, a certain sysctl parameter, kernel.pid_ns_hide_child = 1 when executed at HN system startup will hide any processes that run inside the running containers from appearing in the output of 'ps'. This

Re: [Lxc-users] Hiding container processes from Host/HN's 'ps'

2011-05-03 Thread Greg Kurz
On Tue, 2011-05-03 at 09:47 -0500, Serge Hallyn wrote: Quoting ian sison (mailing list) (ian.si...@gmail.com): Hi all - In openvz, a certain sysctl parameter, kernel.pid_ns_hide_child = 1 when executed at HN system startup will hide any processes that run inside the running

Re: [Lxc-users] Hiding container processes from Host/HN's 'ps'

2011-05-03 Thread ian sison (mailing list)
Thanks all for your answers. At least I won't need to scrape any more google results for answers to this. As mentioned, it would certainly be a useful patch if ever it gets implemented in mainline. I hope someone from the lxc kernel developers are listening to this thread... :) - Ian On Tue,

Re: [Lxc-users] mapping host PID - container PID

2011-05-03 Thread Greg Kurz
On Thu, 2011-04-28 at 09:41 -0500, Serge Hallyn wrote: Quoting Ulli Horlacher (frams...@rus.uni-stuttgart.de): Is there a way to get the corresponding host PID for a container PID? For example: inside the the container the process init has always PID 1. But what PID has this process

Re: [Lxc-users] mapping host PID - container PID

2011-05-03 Thread Serge Hallyn
Quoting Greg Kurz (gk...@fr.ibm.com): On Thu, 2011-04-28 at 09:41 -0500, Serge Hallyn wrote: Quoting Ulli Horlacher (frams...@rus.uni-stuttgart.de): Is there a way to get the corresponding host PID for a container PID? For example: inside the the container the process init has

Re: [Lxc-users] mapping host PID - container PID

2011-05-03 Thread Daniel Lezcano
On 05/03/2011 05:36 PM, Greg Kurz wrote: On Thu, 2011-04-28 at 09:41 -0500, Serge Hallyn wrote: Quoting Ulli Horlacher (frams...@rus.uni-stuttgart.de): Is there a way to get the corresponding host PID for a container PID? For example: inside the the container the process init has always PID

Re: [Lxc-users] mapping host PID - container PID

2011-05-03 Thread Serge Hallyn
Quoting Daniel Lezcano (daniel.lezc...@free.fr): On 05/03/2011 05:36 PM, Greg Kurz wrote: On Thu, 2011-04-28 at 09:41 -0500, Serge Hallyn wrote: Quoting Ulli Horlacher (frams...@rus.uni-stuttgart.de): Is there a way to get the corresponding host PID for a container PID? For example: inside

Re: [Lxc-users] mapping host PID - container PID

2011-05-03 Thread Serge Hallyn
Quoting Daniel Lezcano (daniel.lezc...@free.fr): Yes. And I think the positive side effect is we can determine if the pid belongs to the same pid namespace than the current one when the container_init is 1, no ? Yup. (Presumably if one happens to access a /proc for a non-descendent