Quoting Ulli Horlacher ([email protected]):
> 
> 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 in the host process table?
> 
> ps aux | grep ... is not what I am looking for, I want more robust solution.

There is nothing that gives you a 100% guaranteed correct race-free
correspondence right now.  You can look under /proc/<pid>/root/proc/ to
see the pids valid in the container, and you can relate output of
lxc-ps --forest to ps --forest output.  But nothing under /proc that I
know of tells you "this task is the same as that task".  You can't
even look at /proc/<pid> inode numbers since they are different
filesystems for each proc mount.

It's tempting to say that we should put a per-task unique id under
/proc/<pid> for each task.  However that would likely be nacked because
it introduces a new namespace of its own.

-serge

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Lxc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to