nfsstat -l equiv in CDOT

Hello Guys,


Need your help again ;-)


I've actually misused nfsstat -l in 7-mode to find out which systems connect to a mountpath / vfiler... but this thing doesn't exist anymore in CDOT so the most likely thing I have is:


network connections active show -vserver <vserver> -service NFS*


Problem with it is it only shows me current connections... so a Server that connects to the mounthpath once a day for a transfer / backup job, will drop and I won't see. Secondly what was really useful about nfsstat is that it would show me the exact OPS that were done since started and that's also not covered.


I can do that with:

statistics start -object volume|nfs -sample-id volnfs_sample
statistics show -sample-id volnfs_sample -counter vserver_name|nfs_read_latency|nfs_read_ops|nfs_total_ops

but it's very ugly and I need to scroll down through all the svms to find the one I need. On top it doesn't show me the nfs clients that connected to it...

There is as well:


statistics top client show


Fantastic thing, shows me what's going on right now! but yet again it fails to show me reported information so I can figure out the essential thing... which is which nfs client connects to my svm?

It thought of getting the information with pktt start interface but the problem there is that it's just way too much information and to sort uniq ip's in a 10GB file... plus I might have several SVMs connection on one interface... so not really the one either...

If you have any ideas, your input would be much appreciated!

Thank you,

Re: nfsstat -l equiv in CDOT

There is no easy way to do this in ONTAP currently. I'm working on a possible solution using OnCommand Insight, but for ONTAP, you're stuck with network connections active show and tracking down the clients for now.

Re: nfsstat -l equiv in CDOT

I will say that ONTAP 9.3 adds semi-functionality for this with mount tracing.


You can enable mount trace and see mount success and failures. This gives LIF info, as well as volume info.


For example:


ontap9-tme-8040::*> debug log sktrace show -node ontap9-tme-8040-02 -module-level
  <text>                      Module_Level

ontap9-tme-8040::*> debug log sktrace show -node ontap9-tme-8040-02 -module-level MntTrace_8
Time                  TSC                      CPU:INT  Module_Level
--------------------- ------------------------ -------  -------------------
2017-10-24T19:27:38Z  2737015766666445         7:0      MntTrace_8
   LogMountTrace: Mount access granted for Client=
   VserverID=10 Lif= Path=/FGlocal

Re: nfsstat -l equiv in CDOT

Thanks for your input parisi, mount trace sounds promising.

is netapp insight worth the money...? right now with ocum I do have a very limited view & granularity wondering if insight would help me with these kinda things.


Re: nfsstat -l equiv in CDOT

Disclaimer: I'm a NetApp employee, so, naturally, I'd say "YES BUY IT!!!"


Kidding. I don't have enough info about the product to give you info about if it's worth it. I'd suggest asking for a trial license from your SE and seeing if you like it. Smiley Happy

Re: nfsstat -l equiv in CDOT

[ Edited ]

thank you parisi :-)

For everyone that has issues getting this sort of information.


1. create newuser to connect with public key based auth
2. create a shell script similar to this:
ssh -i /home/userhome/privatekey newuser@filerhostname/ip "set advanced -confirmations off ; rows 0 ; net connections active show -vserver svmname -service NFS*" >> /your/folder/nfs_activesessions_svmname.out

This will add your network connection active show output into a file


3. add this to cronjob that runs every 2 minutes:
3a. crontab -e
3b. */2 * * * * /your/folder/

4. create a for loop to get all the unique hostnames/ips out of the .out file
for i in {1..16} ; do echo "nodes connected to interface interfacename$i" ; grep "\interfacename$i\b" nfs_activesessions_svmname.out | grep 2049 |  cut -d " " -f3 | cut -d ":" -f1 | sort -n | uniq ; done

this assuming you have 16 lifs...

parisi, any idea if I could get active sessions per junction-path? Doesn't look like... I'm missing something like cifs sessions show like :-S



Re: nfsstat -l equiv in CDOT



The junction paths are the exported paths, so you'd need to access the clients and see what is mounted to get those. Nothing from the cluster does that - yet.


I did write up a blog on the new mount trace functionality, however:

Re: nfsstat -l equiv in CDOT

thought so. interesting read... generally speaking your website helped me alot, so much appreciated!


nice weekend!