public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind•com>
To: Rick Jones <rick.jones2@hp•com>, Ani Sinha <ani@arista•com>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>
Subject: Re: list of all network namespaces
Date: Thu, 17 Sep 2015 11:46:27 +0200	[thread overview]
Message-ID: <55FA8BF3.2090405@6wind.com> (raw)
In-Reply-To: <55FA0F4A.3010105@hp.com>

Le 17/09/2015 02:54, Rick Jones a écrit :
> On 09/16/2015 05:46 PM, Ani Sinha wrote:
>> Hi guys
>>
>> just a stupid question. Is it possible to get a list of all active
>> network namespaces in the kernel through /proc or some other
>> interface?
>
> Presumably you could copy what "ip netns" does, which appears to be to look in
> /var/run/netns .  At least that is what an strace of that command suggests.
This will only list netns referenced in '/var/run/netns', which is not 'all'
existing netns (most probably only netns created by iproute2).

Regards,
Nicolas

  parent reply	other threads:[~2015-09-17  9:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17  0:46 list of all network namespaces Ani Sinha
2015-09-17  0:54 ` Rick Jones
2015-09-17  9:40   ` Jiri Benc
2015-09-17  9:46   ` Nicolas Dichtel [this message]
2015-09-17  9:51   ` Rosen, Rami
2015-09-17 17:39     ` Ani Sinha
2015-09-17 18:11       ` Cong Wang
2015-09-17 18:14       ` Jiri Benc

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=55FA8BF3.2090405@6wind.com \
    --to=nicolas.dichtel@6wind$(echo .)com \
    --cc=ani@arista$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=rick.jones2@hp$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox