Had to perform an unplanned IIS Reset to fix an issue in production SharePoint Farm. But executing IISReset breaks ongoing user sessions and give "Service Unavailable" error message, isn't it? Wouldn't it be a good idea to find the No. of users currently connected with the SharePoint site and do the IISReset for a minimal impact? Sure!
How to find how many users connected with SharePoint sites? use Performance Monitor!
- Go to Start >> Run >> Type "Perfmon", to fire up Performance Monitor.
- Click on "Performance Monitor" , Right click "Add Counters" in Graph window
- Under the available Counters, Pick "Web Service" expand the node and select "Current Connections"
- Under "Instances of Selected object" You can either select "Total" or pick a particular web application
- Click on Add button to add the selected counter, and click "OK" button
Please not, this gives only the no of user sessions currently ongoing. But not the one already completed (Doesn't count the users already opened the site and left it idle!) There are possibilities that users may hit the SharePoint URL meanwhile and receive "Service Unavailable" message since IIS is reset!
We can also use PowerShell to get number of users connected:
$servername = "Server.FQDN" Get-Counter -Counter 'web service(_total)\current connections' -ComputerName $servername
You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.