Active IQ Unified Manager Discussions

nfsstat -l equiv in CDOT

axsys
9,803 Views

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,
axsys

7 REPLIES 7

parisi
9,784 Views

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.

parisi
9,746 Views

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=10.63.150.161
   VserverID=10 Lif=10.193.67.218 Path=/FGlocal

axsys
9,684 Views

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.

Cheers,
axsys

parisi
9,654 Views

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. 🙂

axsys
9,580 Views

thank you parisi 🙂

For everyone that has issues getting this sort of information.

 

1. create newuser to connect with public key based auth https://practical-admin.com/blog/ssh-to-clustered-data-ontap-using-key-authentication/
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/nfs_activesessions_svmname.sh

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

Cheers,
axsys

 

parisi
9,522 Views

Nice!

 

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:

 

https://whyistheinternetbroken.wordpress.com/2017/10/25/ontap93-nfs-sneakpreview/

axsys
9,474 Views

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

 

nice weekend!

axsys

Public