From owner-freebsd-hackers@FreeBSD.ORG Tue May 31 08:45:36 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84A4F106566C; Tue, 31 May 2011 08:45:36 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6190A8FC1C; Tue, 31 May 2011 08:45:36 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id F0F2346B2A; Tue, 31 May 2011 04:45:35 -0400 (EDT) Date: Tue, 31 May 2011 09:45:35 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Mark Saad In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, "hackers@freebsd.org" Subject: Re: Mount_nfs question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2011 08:45:36 -0000 On Mon, 30 May 2011, Mark Saad wrote: > So I am stumped on this one. I want to know what the IP of each > nfs server that is providing each nfs export. I am running 7.4-RELEASE > When I run "mount -t nfs" I see something like this > > VIP-01:/export/source on /mnt/src > VIP-02:/export/target on /mnt/target > VIP-01:/export/logs on /mnt/logs > VIP-02:/export/package on /mnt/pkg > > The issue is I use a load balanced nfs server , from isilon. So VIP-01 could > be any one of a group of IPs . I am trying to track down a network > congestion issue and I cant find a way to match the output of lsof , and > netstat to the output of mount -t nfs . Does anyone have any ideas how I > could track this down , is there a way to run mount and have it show the IP > and not the name of the source server ? Unfortunately, there's not a good answer to this question. nfsstat(1) should have a mode that can iterate down active mount points displaying statistics and connection information for each, but doesn't. NFS sockets generally don't appear in sockstat(1) either. However, they should appear in netstat(1), so you can at least identify the sockets open to various NFS server IP addresses (especially if they are TCP mounts). Enhancing nfsstat(1) to display more detailed information would, I think, be a very useful task for someone to get up to (and perhaps should appear on our ideas list). Something that would be nice to have, in support of this, is a way for file systems to provide extended status via a system call that queries mountpoints, both "portable" information that spans file systems, and file system-specific data. Morally, similar to nmount(2) but for statistics rather than setting things. The "easier" route is to add new sysctls that dump per-mountpoint state directly from NFS, but given how much other information we'd like to export, it would be great to have a more general mechanism. (The more adventurous can, with a fairly high degree of safety, use kgdb on /dev/mem (read-only) to walk the NFS stack's mount tables, but that's not much fun.) Robert