Is there a way, on a server, to discover how many clients are currently attached to a NFS file share?
I'd like to be able to see a list of the clients that have "my" NFS share mounted.
It's my understanding /usr/sbin/exportfs gives a list but it is not reliable as it depends on clients un-mounting the share properly.
I suppose the nature of NFS makes it impossible to maintain/calculate an accurate client list, but I thought I'd ask anyway.
--- John
Skunk Worx wrote:
Is there a way, on a server, to discover how many clients are currently attached to a NFS file share?
I'd like to be able to see a list of the clients that have "my" NFS share mounted.
It's my understanding /usr/sbin/exportfs gives a list but it is not reliable as it depends on clients un-mounting the share properly.
I suppose the nature of NFS makes it impossible to maintain/calculate an accurate client list, but I thought I'd ask anyway.
Have a look at /var/lib/nfs/rmtab and other files in /var/lib/nfs/
Thomas Cameron wrote:
Skunk Worx wrote:
Is there a way, on a server, to discover how many clients are currently attached to a NFS file share?
I'd like to be able to see a list of the clients that have "my" NFS share mounted.
It's my understanding /usr/sbin/exportfs gives a list but it is not reliable as it depends on clients un-mounting the share properly.
I suppose the nature of NFS makes it impossible to maintain/calculate an accurate client list, but I thought I'd ask anyway.
Have a look at /var/lib/nfs/rmtab and other files in /var/lib/nfs/
/usr/sbin/showmount will give you a list of IP's connected.
DESCRIPTION showmount queries the mount daemon on a remote host for information about the state of the NFS server on that machine. With no options showmount lists the set of clients who are mounting from that host. The output from showmount is designed to appear as though it were pro- cessed through ‘‘sort -u’’.
Steve Berg wrote:
Thomas Cameron wrote:
Skunk Worx wrote:
Is there a way, on a server, to discover how many clients are currently attached to a NFS file share?
I'd like to be able to see a list of the clients that have "my" NFS share mounted.
It's my understanding /usr/sbin/exportfs gives a list but it is not reliable as it depends on clients un-mounting the share properly.
I suppose the nature of NFS makes it impossible to maintain/calculate an accurate client list, but I thought I'd ask anyway.
Have a look at /var/lib/nfs/rmtab and other files in /var/lib/nfs/
/usr/sbin/showmount will give you a list of IP's connected.
Neither of these are reliable. They pick up new client mounts ok but do not reliably remove the entries when the clients umount the share.
Steve Berg wrote:
Thomas Cameron wrote:
Skunk Worx wrote:
Is there a way, on a server, to discover how many clients are currently attached to a NFS file share?
I'd like to be able to see a list of the clients that have "my" NFS share mounted.
It's my understanding /usr/sbin/exportfs gives a list but it is not reliable as it depends on clients un-mounting the share properly.
I suppose the nature of NFS makes it impossible to maintain/calculate an accurate client list, but I thought I'd ask anyway.
Have a look at /var/lib/nfs/rmtab and other files in /var/lib/nfs/
/usr/sbin/showmount will give you a list of IP's connected.
Hi
It seems that the table shown by showmount it is not updated, because it shows clients that are not longer mounting the partition.
Regards
Marcelo
Steve Berg wrote:
/usr/sbin/showmount will give you a list of IP's connected.
I had never heard of this program, so I ran it and got ---------------------------------------------- [tim@carrie ~]$ sudo showmount -a showmount: RPC: Program not registered ---------------------------------------------- How is one meant to "register" the program?
On Sun, 2008-11-09 at 11:30 +0000, Timothy Murphy wrote:
Steve Berg wrote:
/usr/sbin/showmount will give you a list of IP's connected.
I had never heard of this program, so I ran it and got
[tim@carrie ~]$ sudo showmount -a showmount: RPC: Program not registered
How is one meant to "register" the program?
It's been years since I knew this stuff but IIRC the "unregistered" program is either the nfs daemon (nfsd) or the mount daemon (mountd). In this context "unregistered" just means it isn't running. Check serviceconf.
poc
Patrick O'Callaghan wrote:
/usr/sbin/showmount will give you a list of IP's connected.
I had never heard of this program, so I ran it and got
[tim@carrie ~]$ sudo showmount -a showmount: RPC: Program not registered
How is one meant to "register" the program?
It's been years since I knew this stuff but IIRC the "unregistered" program is either the nfs daemon (nfsd) or the mount daemon (mountd). In this context "unregistered" just means it isn't running. Check serviceconf.
Thanks. I misunderstood the purpose of the program. I see now that one has to run it on a machine running nfsd.
On Sun, 2008-11-09 at 21:16 +0000, Timothy Murphy wrote:
Patrick O'Callaghan wrote:
/usr/sbin/showmount will give you a list of IP's connected.
I had never heard of this program, so I ran it and got
[tim@carrie ~]$ sudo showmount -a showmount: RPC: Program not registered
How is one meant to "register" the program?
It's been years since I knew this stuff but IIRC the "unregistered" program is either the nfs daemon (nfsd) or the mount daemon (mountd). In this context "unregistered" just means it isn't running. Check serviceconf.
Thanks. I misunderstood the purpose of the program. I see now that one has to run it on a machine running nfsd.
Not so. You can run it from anywhere, but you have to say which server you're interested in. From the man page: "showmount queries the mount daemon on a remote host for information about the state of the NFS server on that machine".
poc
Patrick O'Callaghan-2 wrote:
Not so. You can run it from anywhere, but you have to say which server you're interested in. From the man page: "showmount queries the mount daemon on a remote host for information about the state of the NFS server on that machine".
Do you need to have any holes in the firewalls for a remote query to work?