I suppose I can snoop NFS traffic on the NFS server for a week or so,
looking for client connections, but there has to be a more elegant way
to do this. Any suggestions?
Hi Jim,
The command that provides information about clients that are
accessing NFS resources is dfmounts.
The syntax is like this:
# dfmounts nfs-server-name
Thanks,
Cindy
showmount (see the man page for details)
"If dfmounts is entered without arguments, remote resources
currently mounted on the local system are displayed, regard-less of
file system type. However, the dfmounts command does not display the
names of NFS Version 4 clients."
My clients are NFSv4 so they are not showing up. Is there an
alternative?
"The showmount command does not display the names of NFS Version 4
clients." My clients are NFSv4.
Are there alternatives?
I apologize. I was logged into a S11 system when I tested dfmounts an
showmount.
It looks to me like both commands display NFSv4 client info because we
run mostly
S10/S11 NFSv4 here.
I see that the man page that says otherwise but I also see a fixed CR
that makes
me unsure. I will look into this.
Thanks,
Cindy
For reference, the systems I'm trying to attempt this on are sparc
S10u6.
I've never known showmount to be reliable nor up-to-date with valid
information. It's always been a mystery to see accurate info on
mounted clients.
You can always try Eric Kustarz's get_nfs_clients.d DTrace scrip if that
does the job for you:
http://blogs.sun.com/erickustarz/entry/dscript_to_retrieve_active_nfs
Downside is that it only lists active nfs sessions.
Sami
There are several NFS-related DTrace scripts up at
<http://www.dtracebook.com/> that may help, though I'm not sure if
they'll work on such an "old" version of Solaris.
--
Chris
I was about to reply from summary when I saw the other DTrace script
mentions, here is another, looks like a different blog entry so it may
or may not be the same script... http://blogs.sun.com/erickustarz/date/20050503
"dscript to get active NFS clients / nfstop"
Tim, didn't you get those dtrace script links from me? :-)
I think we should be able to get NFS client info without having to
resort to
a dtrace script.
I never got a response about any recent changes with showmount and
NFSv4
client info but on a current Solaris 10 system, I can use showmount to
see
s11 client systems. When I log into the client system, its running the
S11
release and nsstat says its running NFSv4. See below.
Sometimes, running showmount results in a rpcbind failure. I can't
figure out
what causes this.
On one S10 system, nothing is shared, but all the rcp services are
running.
I didn't make any changes and showmount works to see S11 NFSv4
clients.
See below.
However, I can't see S10/NFSv4 client info between two S10 systems nor
can I see S10/NFSv4 client info from an S11 NFSv4 system.
It looks to me like something in S11 NFS is providing this info, but I
don't
know for sure what it is.
Not much help...
Cindy
# share
# svcs | grep rpc
online Feb_11 svc:/network/rpc/bind:default
online Feb_11 svc:/network/rpc/keyserv:default
online Feb_11 svc:/network/rpc/gss:default
online Feb_11 svc:/network/rpc/rstat:default
online Feb_11 svc:/network/rpc/cde-calendar-manager:default
online Feb_11 svc:/network/rpc/cde-ttdbserver:tcp
online Feb_11 svc:/network/rpc/smserver:default
online Feb_11 svc:/network/rpc/rusers:default
online Feb_11 svc:/network/rpc-100235_1/
rpc_ticotsord:default
# showmount server-name
client-1
client-2
client-3
# ssh client-1
Last login: Thu May 5 15:20:29 2011 from sr1-ubrm-17.us.
Oracle Corporation SunOS 5.11 April 2011
# nfsstat -m | grep vers
Flags:
vers=4,proto=tcp,sec=sys,hard,intr,link,symlink,acl,rsize=1048576,wsize=1048576,retrans=10,timeo=600
Flags:
vers=4,proto=tcp,sec=sys,hard,intr,llock,link,symlink,acl,rsize=1048576,wsize=1048576,retrans=5,timeo=600
Flags:
vers=4,proto=tcp,sec=sys,hard,intr,link,symlink,acl,rsize=1048576,wsize=1048576,retrans=10,timeo=600
Flags:
vers=4,proto=tcp,sec=sys,hard,intr,link,symlink,acl,mirrormount,rsize=1048576,wsize=1048576,retrans=10,timeo=600
Flags:
vers=4,proto=tcp,sec=sys,hard,intr,link,symlink,acl,rsize=1048576,wsize=1048576,retrans=10,timeo=600
Flags:
vers=4,proto=tcp,sec=sys,hard,intr,link,symlink,acl,mirrormount,rsize=1048576,wsize=1048576,retrans=10,timeo=600
Flags:
vers=4,proto=tcp,sec=sys,hard,intr,link,symlink,acl,mirrormount,rsize=1048576,wsize=1048576,retrans=10,timeo=600
>On May 5, 2:19=A0pm, Jim Leonard <mobyga...@gmail.com> wrote:
>> On May 5, 12:56=A0pm, cindy <cindy.swearin...@oracle.com> wrote:
>>
>> > I apologize. I was logged into a S11 system when I tested dfmounts an
>> > showmount.
>> > It looks to me like both commands display NFSv4 client info because we
>> > run mostly
>> > S10/S11 NFSv4 here.
>>
>> For reference, the systems I'm trying to attempt this on are sparc
>> S10u6.
>I've never known showmount to be reliable nor up-to-date with valid
>information. It's always been a mystery to see accurate info on
>mounted clients.
For nfsv2/3 you can use nfslogd; for nfsv4 I'm not sure, but I think
there should be some DTrace probe points you can use and agregate over
the clients.
Casper
--
My workaround has been to record the output of "netstat -an | grep
2049" once a minute, and hope that all the clients that need access
will do so during my sampling period.