From owner-freebsd-net@FreeBSD.ORG Tue Feb 11 10:42:57 2014 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A46F1FDE for ; Tue, 11 Feb 2014 10:42:57 +0000 (UTC) Received: from mail.fer.hr (mail.fer.hr [161.53.72.233]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 386D212E8 for ; Tue, 11 Feb 2014 10:42:57 +0000 (UTC) Received: from x23 (161.53.63.210) by MAIL.fer.hr (161.53.72.233) with Microsoft SMTP Server (TLS) id 14.2.342.3; Tue, 11 Feb 2014 11:42:48 +0100 Date: Tue, 11 Feb 2014 11:43:29 +0100 From: Marko Zec To: Vijay Singh Subject: Re: netstat for vnets Message-ID: <20140211114329.43bda628@x23> In-Reply-To: References: Organization: FER X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.19; amd64-portbld-freebsd9.1) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [161.53.63.210] Cc: FreeBSD Net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 10:42:57 -0000 On Mon, 10 Feb 2014 21:24:52 -0800 Vijay Singh wrote: > How does "jexec 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. 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... 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? Cheers, Marko