From: Stuart Anderson on
How can I determine what files are being accessed by nfsd read and write
calls?

I would like to be able to profile a busy NFS server and determine which
NFS clients are accessing what files on the server.

Thanks.
From: Ceri Davies on
On 2010-03-03, Michael Vilain <vilain(a)NOspamcop.net> wrote:
> In article <slrnhor7c1.9q2.sba(a)gwave-170.ligo.caltech.edu>,
> Stuart Anderson <sba(a)nospam.ligo.caltech.edu> wrote:
>
>> How can I determine what files are being accessed by nfsd read and write
>> calls?
>>
>> I would like to be able to profile a busy NFS server and determine which
>> NFS clients are accessing what files on the server.
>>
>> Thanks.
>
> You can't realistically. You'd have to run a debugging version of nfs
> that logs all accesses or use Solaris 10's Dtrace feature to trap access
> to specific files somehow.

Well, you can. DTrace is exactly the tool for the job.

Start with the DTrace Toolkit from http://www.brendangregg.com/dtrace.html
and the nfswizard.d script therein.

Ceri
--
That must be wonderful! I don't understand it at all.
-- Moliere
From: Casper H.S. Dik on
Ceri Davies <ceri_usenet(a)submonkey.net> writes:

>On 2010-03-03, Michael Vilain <vilain(a)NOspamcop.net> wrote:
>> In article <slrnhor7c1.9q2.sba(a)gwave-170.ligo.caltech.edu>,
>> Stuart Anderson <sba(a)nospam.ligo.caltech.edu> wrote:
>>
>>> How can I determine what files are being accessed by nfsd read and write
>>> calls?
>>>
>>> I would like to be able to profile a busy NFS server and determine which
>>> NFS clients are accessing what files on the server.
>>>
>>> Thanks.
>>
>> You can't realistically. You'd have to run a debugging version of nfs
>> that logs all accesses or use Solaris 10's Dtrace feature to trap access
>> to specific files somehow.

>Well, you can. DTrace is exactly the tool for the job.

In Solaris 9 and before, there's "nfslog" and it also is able to
determine which files are accessed (for NFS version 2 and 3)

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
From: Julian Macassey on
On Tue, 2 Mar 2010 23:21:37 +0000 (UTC), Stuart Anderson i
<sba(a)nospam.ligo.caltech.edu> wrote:
> How can I determine what files are being accessed by nfsd read and write
> calls?
>
> I would like to be able to profile a busy NFS server and determine which
> NFS clients are accessing what files on the server.

Have a look at /etc/rmtab .

It will show you the client machine connected and what
directories (files) are mounted from the server.

Look at /etc/nfs/nfslog.conf . It will show you where the
nfslogs live (usually /var/nfs).

The command # dfmounts shows you what server directories
are mounted and what systems are connected. This may be what you
are after.

Here is an example output:
--------
# dfmounts stars
RESOURCE SERVER PATHNAME CLIENTS
- stars /vol/exports
172.16.4.74,172.16.5.6,devlin1sba.lco.gtn
- stars /vol/exports/
172.16.4.107,172.16.4.85,jmacassey-kubuntu.lco.gtn,
lagavulin.lco.gtn
- stars /vol/exports/archive

172.16.4.103,172.16.4.104,172.16.4.111,172.16.4.113,
172.16.4.138,172.16.4.141,172.16.4.143,172.16.4.144,172.16.4.151,
172.16.4.157,172.16.4.175,172.16.4.184,172.16.4.191,172.16.4.69,
172.16.4.72,172.16.4.73,172.16.4.74,172.16.4.89,172.16.4.98,
172.16.5.36,1j64h2j.lco.gtn,ADBUP,baliber-linux.lco.gtn,
bjfulton-linux.lco.gtn,bunnyview.lco.gtn,data1sba,
fbianco-linux-phys.lco.gtn,gparedes-linux.lco.gtn,
jbarton-linux.lco.gtn,jdv-test4.lco.gtn,kvanderhorst.lco.gtn,
lenovo-a13e37cc,luca,nbrooks-lap-xp,portadooberii,
si119.lco.gtn,your-a9279112e3

- stars /vol/shares 172.16.5.36,172.16.5.6
- stars /vol/shares/ 172.16.4.111
- stars /vol/vol0 172.16.5.6
- stars /vol/vol0/home 172.16.5.6
#

-----



The command # dfshares {remote server} will show the
server name and directories.


------
# dfshares stars
RESOURCE SERVER ACCESS
TRANSPORT
stars:/vol/shares stars - -
stars:/vol/vol0/home stars - -
stars:/vol/vol0 stars - -
stars:/vol/exports stars - -
#

------


--
"The right to be let alone is indeed the beginning of all
freedom." - Justice William O. Douglas

From: Stuart Anderson on
Ceri Davies wrote:
> On 2010-03-03, Michael Vilain <vilain(a)NOspamcop.net> wrote:
>> In article <slrnhor7c1.9q2.sba(a)gwave-170.ligo.caltech.edu>,
>> Stuart Anderson <sba(a)nospam.ligo.caltech.edu> wrote:
>>
>>> How can I determine what files are being accessed by nfsd read and write
>>> calls?
>>>
>>> I would like to be able to profile a busy NFS server and determine which
>>> NFS clients are accessing what files on the server.
>>>
>>> Thanks.
>>
>> You can't realistically. You'd have to run a debugging version of nfs
>> that logs all accesses or use Solaris 10's Dtrace feature to trap access
>> to specific files somehow.
>
> Well, you can. DTrace is exactly the tool for the job.
>
> Start with the DTrace Toolkit from http://www.brendangregg.com/dtrace.html
> and the nfswizard.d script therein.


Exactly what I am looking for except for the server rather than the
client, which is what nfswizard.d profiles.

Has anyone written the dtrace equivalent NFS server tool?

To state the problem another way, I want to be able to answer the
question: the NFS server is busy, what is it doing?

I know how to break this down by total network traffic, nfsstat,
server device monitoring, and determine what NFS clients are possibly
generating the load, but I would like to also be able to
slice the problem with a filesytem aware tool, e.g., 250MByte/s
of data being served from the local file /data/file42 on the
NFS server. Even better would to be able identify the NFS client
and remote user ID for the top data streams.

Thanks.
 |  Next  |  Last
Pages: 1 2
Prev: device entries
Next: Disk type and fdisk