Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

Check active NFS connections

Reply
 
Thread Tools Display Modes
  #1  
Old 06-14-2007, 10:20 AM
Default Check active NFS connections



Is it possible to view active NFS/RPC connections to a server? It's a
simple task on the client to just cat mtab. At least, that the
*easiest* way. I'd like to be able to look on the server though and
determine if not which clients are connected at least how many there
are.

Thanks
Mathew



thechillien@gmail.com
Reply With Quote
  #2  
Old 06-14-2007, 01:17 PM
Chris Davies
Guest
 
Posts: n/a
Default Re: Check active NFS connections

(E-Mail Removed) wrote:
> Is it possible to view active NFS/RPC connections to a server? It's a
> simple task on the client to just cat mtab. At least, that the
> *easiest* way. I'd like to be able to look on the server though and
> determine if not which clients are connected at least how many there
> are.


showmount -a (on the server)
Chris
Reply With Quote
  #3  
Old 06-14-2007, 08:56 PM
Timothy Murphy
Guest
 
Posts: n/a
Default Re: Check active NFS connections

Chris Davies wrote:

>> Is it possible to view active NFS/RPC connections to a server? It's a
>> simple task on the client to just cat mtab. At least, that the
>> *easiest* way. I'd like to be able to look on the server though and
>> determine if not which clients are connected at least how many there
>> are.

>
> showmount -a (on the server)


I hadn't heard of this command.
When I run it I seem to get every computer connected to my server
by WiFi or ethernet, as seen below.
What exactly do the 255.255.255.0 directory entries mean?

--------------------------------
[tim@alfred ~]$ showmount -a
All mount points on alfred.murphy.ie:
192.168.2.0/255.255.255.0:/common
192.168.2.11:192.168.2.0/255.255.255.0
192.168.2.14:192.168.2.0/255.255.255.0
192.168.2.234:192.168.2.0/255.255.255.0
192.168.2.235:192.168.2.0/255.255.255.0
192.168.2.4:192.168.2.0/255.255.255.0
192.168.2.6:192.168.2.0/255.255.255.0
192.168.2.7:192.168.2.0/255.255.255.0
192.168.3.0/255.255.255.0:/common
192.168.3.11:192.168.3.0/255.255.255.0
192.168.3.2:192.168.3.0/255.255.255.0
192.168.3.6:192.168.3.0/255.255.255.0
--------------------------------

--
Timothy Murphy
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Reply With Quote
  #4  
Old 06-15-2007, 06:31 PM
Joe Beanfish
Guest
 
Posts: n/a
Default Re: Check active NFS connections

Timothy Murphy wrote:
> Chris Davies wrote:
>
>>> Is it possible to view active NFS/RPC connections to a server? It's a
>>> simple task on the client to just cat mtab. At least, that the
>>> *easiest* way. I'd like to be able to look on the server though and
>>> determine if not which clients are connected at least how many there
>>> are.

>> showmount -a (on the server)

>
> I hadn't heard of this command.
> When I run it I seem to get every computer connected to my server
> by WiFi or ethernet, as seen below.
> What exactly do the 255.255.255.0 directory entries mean?
>
> --------------------------------
> [tim@alfred ~]$ showmount -a
> All mount points on alfred.murphy.ie:
> 192.168.2.0/255.255.255.0:/common
> 192.168.2.11:192.168.2.0/255.255.255.0
> 192.168.2.14:192.168.2.0/255.255.255.0
> 192.168.2.234:192.168.2.0/255.255.255.0
> 192.168.2.235:192.168.2.0/255.255.255.0
> 192.168.2.4:192.168.2.0/255.255.255.0
> 192.168.2.6:192.168.2.0/255.255.255.0
> 192.168.2.7:192.168.2.0/255.255.255.0
> 192.168.3.0/255.255.255.0:/common
> 192.168.3.11:192.168.3.0/255.255.255.0
> 192.168.3.2:192.168.3.0/255.255.255.0
> 192.168.3.6:192.168.3.0/255.255.255.0
> --------------------------------
>


Unfortunately showmount shows everything that EVER mounted, not what's
currently mounted. Fairly useless if you ask me. I don't know of any
better alternatives
Reply With Quote
  #5  
Old 06-15-2007, 08:28 PM
Tim S
Guest
 
Posts: n/a
Default Re: Check active NFS connections

Joe Beanfish wrote:

>
> Unfortunately showmount shows everything that EVER mounted, not what's
> currently mounted. Fairly useless if you ask me. I don't know of any
> better alternatives


I was about to chip in earlier with "NFS is a stateless protocol" so it's
hard.

However, if the OP runs NFS over TCP, rather than UDP, the he could look for
stuff like the following with "netstat -apl | grep nfs" :


tcp 0 0 mothra.dionic.net:nfs genghis.dionic.net:792 ESTABLISHED-

Probably about as good as it gets.


Cheers

Tim

PS - sorry for replying to you, my newsreader lost its cache so I don't have
the earlier article...
Reply With Quote
  #6  
Old 06-19-2007, 09:56 PM
Chris Davies
Guest
 
Posts: n/a
Default Re: Check active NFS connections

> Is it possible to view active NFS/RPC connections to a server?

Chris Davies wrote:
> showmount -a (on the server)


Timothy Murphy <(E-Mail Removed)> wrote:
> When I run it I seem to get every computer connected to my server


None of these systems ever unmounted the directory. Since NFS is a
stateless protocol (well, mostly) it's impossible for the server to
distinguish between a client that's just not using the mount and one
that's gone away and forgotten about it.

Chris
Reply With Quote
  #7  
Old 06-20-2007, 12:27 PM
Timothy Murphy
Guest
 
Posts: n/a
Default Re: Check active NFS connections

Chris Davies wrote:

>> Is it possible to view active NFS/RPC connections to a server?

>
> Chris Davies wrote:
>> showmount -a (on the server)

>
> Timothy Murphy <(E-Mail Removed)> wrote:
>> When I run it I seem to get every computer connected to my server

>
> None of these systems ever unmounted the directory. Since NFS is a
> stateless protocol (well, mostly) it's impossible for the server to
> distinguish between a client that's just not using the mount and one
> that's gone away and forgotten about it.


I still don't understand the output of "showmount -a" (below).

I just rebooted the NFS server (alfred).
Most of the computers listed are not switched on,
or are not running Linux,
and have never mounted a directory on the server.

As far as I can see, if one computer on a LAN
has a directory on the server mounted
then all other computers which are on the LAN,
or have been on the LAN in the last n weeks,
are listed.

Is this normal?
It is quite possible that my NFS setup is faulty in some way,
though as far as I know it is completely standard.

------------------------
[tim@elizabeth ~]$ sudo showmount -a alfred
All mount points on alfred:
192.168.2.0/255.255.255.0:/common
192.168.2.11:192.168.2.0/255.255.255.0
192.168.2.14:192.168.2.0/255.255.255.0
192.168.2.234:192.168.2.0/255.255.255.0
192.168.2.235:192.168.2.0/255.255.255.0
192.168.2.4:192.168.2.0/255.255.255.0
192.168.2.6:192.168.2.0/255.255.255.0
192.168.2.7:192.168.2.0/255.255.255.0
192.168.3.0/255.255.255.0:/common
192.168.3.11:192.168.3.0/255.255.255.0
192.168.3.2:192.168.3.0/255.255.255.0
192.168.3.6:192.168.3.0/255.255.255.0
------------------------

--
Timothy Murphy
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Reply With Quote
  #8  
Old 06-20-2007, 05:52 PM
Joe Beanfish
Guest
 
Posts: n/a
Default Re: Check active NFS connections

Timothy Murphy wrote:
> Chris Davies wrote:
>
>>> Is it possible to view active NFS/RPC connections to a server?

>> Chris Davies wrote:
>>> showmount -a (on the server)

>> Timothy Murphy <(E-Mail Removed)> wrote:
>>> When I run it I seem to get every computer connected to my server

>> None of these systems ever unmounted the directory. Since NFS is a
>> stateless protocol (well, mostly) it's impossible for the server to
>> distinguish between a client that's just not using the mount and one
>> that's gone away and forgotten about it.

>
> I still don't understand the output of "showmount -a" (below).


showmount -a is not useful. Forget it exists.
Reply With Quote
Reply

Tags
active, check, connections, nfs

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 05:02 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.