ONTAP Discussions

Concurrent users of CIFS Shares over a time period


Hi All,


I have a few CIFS shares configured, I do see that the "Max Users" attribute value is set to a very high number.  


Trying to gather the average number of concurrent users over a period of time. I am running Clustered Data ONTAP 8.x and hence trying to figure out a way via CLI or ONTAPI interface so that it can be gathered programmatically or via script. Would like to monitor this info on regular basis. 


For example: On an average (or 95th percentile) how many concurrent users were seen over the last 1 week or 1 month?


Thanks in advance!



perfstat for obtaining cifs connections data, may be too much. I may be wrong here but it is designed for diagnostic purpose and it has different set of commands pre-packed, also Perfstat is no longer supported ONTAP 9.5 and later. I guess, just a simple script will do the job for you.


Thank you, @Ontapforrum and @paul_stejskal . This is the data I was looking for. One follow-up question, instead of a *.bat file or a script, is it possible to get the connection-count via one of the perfstat commands at time t1 and t2? 


Technically yes, but perfstat is not supported since 9.5. It still runs, but we use perf archives for troubleshooting. Honestly, perfstat is just a fancy batch file or similar when you think about it, and its data is saved in a text file anyway.


The most basic command from the cluster shell that you could use to find out the number of CIFS users connected to share is:


"vserver cifs session show -vserver <vserver> -fields connection-id,address,windows-user,auth-mechanism,session-id,connection-count"


You can simply create a *.bat' file with the above command and place it in the Windows Task scheduler and set the repeating schedule. This will create the desired outputs and based on that you can access the number of users connected for a given time/hour of the day.


I would just create a SSH key login honestly. That seems to be the best way from a Linux host. Then you could use a crontab script to monitor that.


Hi Paul, not sure I really understood the approach suggested. What would be the crontab script to monitor that. Would really ease my job if there was a command which I could run when needed. 


Sorry I had a brain fart and forgot the command. Looks like Ontapforrum came through so I thank him!

Register for Insight 2021 Digital

INSIGHT 2021 Digital: Meet the Specialists 2

On October 20-22, gear up for a fully digital, totally immersive virtual experience with a downright legendary lineup of world-renowned specialists. Tune in for visionary conversations, solution deep dives, technical sessions and more.

NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner