Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Feb 2009 21:39:18 +0000
From:      Freminlins <freminlins@gmail.com>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        questions@freebsd.org, Sandra Kachelmann <s.kachelmann@googlemail.com>
Subject:   Re: NFS, how to find out which files are used
Message-ID:  <eeef1a4c0902031339j7c3accdtfb405a0dd55c0262@mail.gmail.com>
In-Reply-To: <20090203170233.GM75802@dan.emsphone.com>
References:  <91b92520902030746j2256dc58y2b1447c6e4471e4@mail.gmail.com> <20090203170233.GM75802@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2009/2/3 Dan Nelson <dnelson@allantgroup.com>

> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?eeef1a4c0902031339j7c3accdtfb405a0dd55c0262>