ONTAP Discussions

Concurrent users of CIFS Shares over a time period

vadc
2,986 Views

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!

7 REPLIES 7

paul_stejskal
2,946 Views

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.

vadc
2,853 Views

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. 

paul_stejskal
2,830 Views

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

Ontapforrum
2,843 Views

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.

vadc
2,767 Views

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? 

paul_stejskal
2,735 Views

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.

Ontapforrum
2,763 Views

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.

Public