Network and Storage Protocols

is there any command equivalent to cifs sessions for nfs stats/ export ?

FABRICEMORIN
11,366 Views

A public nfs export has been defined with no IP restriction on a virtual filer I have to manage,

I am searching for a way to identify which host(s) has(ve) mounted this export and which users are working on it.

nfsstat does not give me any IP address, as it needs ip address to work.

the equivalent of cifs sessions for cifs shares would be helpful.

Could you help ?

thank you.

2 REPLIES 2

aborzenkov
11,366 Views

NFS does not really have notion of session. So you can see which hosts performed mount request (which does not mean that they are actually accessing anything; and it is in principle possible to access without doing mount if client knows NFS handle); and you may see current nfsd connections with netstat. But that’s it. User information is transmitted with each request, so monitoring it is basically impossible.

Probably your best bet is combination of “showmount -e” from other Unix host and netstat on NetApp (look for connections to port 2049).

GARDINEC_EBRD
11,366 Views

Not really, as NFS(v3) is a stateless protocol.  The closest you can get, at least that I'm aware of, is the nfs per client stats.  This will show you active NFS clients using your vfiler, but not which exports they are mounting, or which users are accessing them, I'm affraid:

vfiler context <vfilername>

options nfs.per_client_stats.enable on

nfsstat -l

options nfs.per_client_stats.enable off

vfiler context vfiler0

WARNING: make sure you turn client stats off afterwards, and don't leave running for more than a minute or so as it has a performance cost.

Public