Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Feb 2014 06:56:41 -0800
From:      Vijay Singh <vijju.singh@gmail.com>
To:        Marko Zec <zec@fer.hr>
Cc:        FreeBSD Net <net@freebsd.org>
Subject:   Re: netstat for vnets
Message-ID:  <BABCE0F0-6E48-4636-A9FD-C06BDA7D9E27@gmail.com>
In-Reply-To: <20140211114329.43bda628@x23>
References:  <C8467D00-8CF0-4737-B261-DCB4C3A87146@gmail.com> <20140211114329.43bda628@x23>

next in thread | previous in thread | raw e-mail | index | archive | help

On Feb 11, 2014, at 2:43 AM, Marko Zec <zec@fer.hr> wrote:

> On Mon, 10 Feb 2014 21:24:52 -0800
> Vijay Singh <vijju.singh@gmail.com> wrote:
>=20
>> How does "jexec <jid> netstat -an" get its data from the kernel? I
>> know that netstat uses kvm, but I'm not sure how it works with
>> vnet-jails. Any pointers would be much appreciated.
>=20
> I think these days libkvm first tries to find "native" symbols via
> kldsym(), and if it fails, attempts to prepend a "vnet_entry_" prefix
> in front of the search key, which then get resolved to the proper
> addres in _kvm_vnet_validaddr() in lib/libkvm/kvm_vnet.c.  In the early
> days of VIMAGE it was the kernel who was responsible for resolving the
> symbol address in the proper vnet, honestly I do not recall when the
> magic moved to the userland and why...
>=20
> Btw. Vijay - did the patch I posted here:
> http://lists.freebsd.org/pipermail/freebsd-net/2014-February/037769.html
> resolve the panics you complained about?

Marco, I got a chance to test it yesterday and it seems to work. Are you goi=
ng to commit it? I think that there is still an issue with the V_loif pointe=
r in the mbuf and it seems to me that we should add a refcount for that. It w=
ould also help wit the interface hot plug case that Adrian has mentioned in t=
he past. Anyhow, this change could go in. Please let me know when you've com=
mitted it.

-vijay=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BABCE0F0-6E48-4636-A9FD-C06BDA7D9E27>