From owner-freebsd-questions@FreeBSD.ORG Tue Feb 3 22:08:52 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B352C10656E0 for ; Tue, 3 Feb 2009 22:08:52 +0000 (UTC) (envelope-from freminlins@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.154]) by mx1.freebsd.org (Postfix) with ESMTP id 32E938FC16 for ; Tue, 3 Feb 2009 22:08:51 +0000 (UTC) (envelope-from freminlins@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so892777fgb.35 for ; Tue, 03 Feb 2009 14:08:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=4iyAhKRfKsS5EU9fRVrBKIKuEpqswS1vbf/RMDGs8SE=; b=vWCbl9bpbxTWJ/YEfBGBQCUep9jNunLMVBVOJIV7j4UfLtkyXaKF+5MbN+PJW4WtUU D5KDtwy7IeuV+Hp2/dZ1XeqN1CPu5Zs0nKMraHg7w4mVYk4/37Aai5IslGo04YPob/l6 jGjMTMWsbuQerQbWvi2asXggnS7v3iVcQPXrs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=QUfAWa8Xxe94AnoBhuQXm7gbw8GmXapAihbrUyI9RTygCrZ+8TPSrqpgI9qZ+APMha jehcRZ5BNGmB2soAOLySbHYXG0rWB1yd4gJzckwZ7n4IAgm/mq+2ajSFg1CcvDMrTbQU Nq2q466q6SJzZmucTIce0N9GvRboHDv8UhZtE= MIME-Version: 1.0 Received: by 10.86.82.16 with SMTP id f16mr599401fgb.32.1233697158426; Tue, 03 Feb 2009 13:39:18 -0800 (PST) In-Reply-To: <20090203170233.GM75802@dan.emsphone.com> References: <91b92520902030746j2256dc58y2b1447c6e4471e4@mail.gmail.com> <20090203170233.GM75802@dan.emsphone.com> Date: Tue, 3 Feb 2009 21:39:18 +0000 Message-ID: From: Freminlins To: Dan Nelson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: questions@freebsd.org, Sandra Kachelmann Subject: Re: NFS, how to find out which files are used X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 22:08:53 -0000 2009/2/3 Dan Nelson > In the last episode (Feb 03), Sandra Kachelmann said: > > I have an NFS fileserver and would like to figure out which files are > > being read/written to. Is there something to find that out? Something > > similar to samba's 'smbstatus' command. > > The best you can do currently is run tcpdump/wireshark and watch the remote > file operations as they happen... NFS doesn't access files by filename, > but > by NFS filehandle (basically device+inode number), so a remote client first > looks up the filename to get the filehandle, and all accesses are done via > the filehandle at that point. Theoretically, one could write a dtrace > script that watches calls to nfs_namei, nfsrv_read, and nfsrv_write, and > then matches read/write ops with the filenames that were looked up > beforehand. Solaris NFS has a logging option, which does exactly what Sandra is asking for. It's al reason why I prefer to use Solaris for NFS servers. F.