LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-26-2014, 08:40 AM   #1
Lop3
Member
 
Registered: Aug 2013
Posts: 48

Rep: Reputation: Disabled
Question NFS metering/beancounting/traffic measurement/write counts - stats per client


I want to be able to check how many MB each NFS client has read and written.

Running Debian 7 Wheezy (updated)

So far the most suitable method I've found is
nfsiostat

However when I run it, my NFS server only shows a SINGLE client and it's stats. (the problem is all of the other connected clients are missing) Even though I have multiple NFS clients connected. For example my dev machine, I've been using the NFS for weeks reading and writing files all day but somehow it doesn't list my dev machine. I even wrote a 10MB test file right now from my dev machine (not shown) and confirmed it exists on the server via SSH, so my dev machine is not imagining it's there.

I've got the same IPTABLES rules governing all connected clients.
These are the relevant IPTABLES rules
:INPUT DROP [9750:1434843]
:FORWARD DROP [3684:954036]
:OUTPUT DROP [107:44964]
-A INPUT -i lo -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 111 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 2049 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 4002 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 32767 -j ACCEPT
-A INPUT -i eth0 -p udp -m udp --dport 111 -j ACCEPT
-A INPUT -i eth0 -p udp -m udp --dport 2049 -j ACCEPT
-A INPUT -i eth0 -p udp -m udp --dport 4002 -j ACCEPT
-A INPUT -i eth0 -p udp -m udp --dport 32767 -j ACCEPT
-A INPUT -m state --state ESTABLISHED -j ACCEPT

nfsiostat --version shows 0.2

nfsstat -m has the exact same problem. The dev machine is connected, but not showing.

On the client that is visible, the mount looks like this:
192.168.0.1:/tmp/foo on /mnt/foo type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sy s,mountaddr=192.168.0.1,mountvers=3,mountport=32767,mountproto=udp,local_lock=none,addr=192.168.0.1)

On the dev machine the mount looks like this
192.168.0.1:/tmp/bar on /mnt/bar type nfs (rw,vers=4,addr=192.168.0.1,clientaddr=192.168.0.99)

I even dismounted the dev machine and forced it to mount as NFSv3. Now `mount` on the dev machine shows
192.168.0.1:/data on /mnt/bar type nfs (rw,nfsvers=3,addr=192.168.0.1)

It's fully functional but still not showing up with nfsiostat or nfsstat -m

Linux server is:
Linux bob 2.6.32-openvz-042stab093.5-amd64 #1 SMP Wed Sep 10 17:47:17 MSK 2014 x86_64 GNU/Linux

Any ideas?


EDIT
So ChrisH from #debian on Freenode helped me.
He informed me that nfsstat -m and nfsiostat are infact CLIENT commands.
Maybe because my server is running OpenVZ, those two commands got confused and gave me the results from one of the containers, fooling me into thinking it was a server command, that was just not showing the stats of all clients.

====================

So this problem remains unresolved. I still don't have a way to determine on the server, if any clients are abusing the NFS server (how many MB they've read/written).

Last edited by Lop3; 11-26-2014 at 10:07 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Attansic L2: traffic measurement not working KarlW Linux - Hardware 0 08-19-2008 02:42 PM
Traffic Measurement from different network portion shipon_97 Linux - Networking 0 05-10-2006 02:07 AM
NFS client hangs when write ziobudda Linux - Networking 5 04-14-2006 10:40 PM
NFS client write permissions tireseas Linux - Networking 5 05-03-2005 07:52 AM
traffic measurement Baltasar Linux - Software 5 03-10-2005 11:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration