The results of the below command are not real time. I imagine there is a cache? Does anyone know how this can be cleared? If it can? Is there a plan to make this command real-time? Having this command and it not being real-time, is not really that helpful and confuses matter in my opinion.
They are real time as of the time of connection. Meaning, if you have a client that connects and then run the command, you'll see the client in the list.
Otherwise, they are cached for I believe 24 hours, if the clients are not actively using the mounts. If there are keepalives or IOPS, the mount stays in the connected-clients output. I don't know of a way to flush that cache and there are no current plans to have that cache flush more often (caches save resources).
You can filter the command by idle time if you want more useful output.
For example, if you only want to see clients newer than 2.5 hours:
ontap9-tme-8040::*> nfs connected-clients show -node ontap9-tme-8040-0* -vserver DEMO -idle-time <2h30m
Thanks, this was very helpful! Especially sorting by idle time. I will also test how long mounts are cached for.
I have inherited systems with a lot of legacy volumes that don't have any tracking back to a server or owner. I really want to use this command to trace back to individual volumes and show they are not being mounted.