A Guide to Checking How Many Active Connections There are on Your IIS Website

A Guide to Checking How Many Active Connections There are on Your IIS Website

When checking for performance and issues, you must figure out how many active connections there are to your IIS website. If it’s too high, you should know that it’s time to work on your server.

To check the number of active connections, there’s a really useful tool called Performance Monitor. Here, you’d have to set the number of counters. Another technique for checking the connections is PowerShell. In this article, learn more about the techniques.

Using the Performance Monitor Tool

Here are the steps you need to follow:
  • Press Windows+R
  • Search for ‘Perfmon’ and click Enter
  • Located the ‘+’ green button on the toolbar and click on it. Doing so will add the counters. These will count and show you the number of user sessions that are active
  • Next, expand the Web Service group and you’ll see a list of available counters. You can select as many counters as you want, but we recommend using the following three counters at the bare minimum:
    • Current Anonymous Users
    • Current Non-Anonymous Users
    • Current Connections
  • To start adding the counters, select the desired counter. Then, for the field ‘Instances of selected objects’, select the IIS website.
Click on the ‘Add>>’ button to add that counter.
  • Repeat the above step for other counters
Now navigate to the Performance Manager console. Here, you’ll see the counters in action in graphs and numbers.


Using Powershell

Powershell is another way you can see the number of active connections. Here are the steps to follow:
  • Open Powershell by clicking on the icon
  • Insert this command -
(Get-Counter -ListSet 'Web Service').counter
  • Then, write the following line to check the number of active sessions -
Get-Counter "web service(Site1)current connections" -ComputerName web-srv01
  • Or, you can use this command if you want to check the number of connections on your local website -
Get-Counter "web service(Site1)current connections" -ComputerName $env:COMPUTERNAME
  • To know the number of active connections on your IIS server, use this line -
((Get-Counter -Counter 'web service(_total)current connections' -computer $env:COMPUTERNAME) | Select-Object -Expand countersamples).Cookedvalue
So that’s how you check for the number of connections on your IIS website.
First release
Last update
0.00 star(s) 0 ratings

More resources from kumkumsharma