[Lxc-users] Viewing a container's /proc mount from the host

Ken Elkabany Ken at elkabany.com
Thu Sep 6 22:04:21 UTC 2012


Thank you! That's exactly what I needed.

Ken

On Thu, Sep 6, 2012 at 2:05 PM, Stéphane Graber <stgraber at ubuntu.com> wrote:

> On 12-09-06 04:55 PM, Ken Elkabany wrote:
> > Hi,
> >
> > We're trying to find the ports that a container is currently listening
> > on. This information is available from /proc/net/tcp and /proc/net/udp.
> > However, as far as I can tell, the host cannot view a container's /proc
> > mount due to namespacing. We would prefer to view those files from the
> > host, rather than connecting to the container's tty, and viewing it from
> > within the container.
> >
> > As an aside, we do not want to use port scanning.
> >
> > Best,
> > Ken
>
> The net entries can be accessed using /proc/<pid on host>/net/{udp|tcp},
> no need to actual access the /proc of the container.
>
> lxc-netstat -n <container> may also help you get what you want.
>
>
> --
> Stéphane Graber
> Ubuntu developer
> http://www.ubuntu.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120906/393975f3/attachment.html>


More information about the lxc-users mailing list