Recently I had a customer interested in checking how many concurrent calls a particular OCS Mediation Server was handling. The challenge with this is that separate perfmon counters exist for inbound calls and for outbound calls, but there is not a built-in counter which measures both. So while we could monitor the peak capacity of each we had no guarantee that these peak values were occurring at the same time.
In order to track this usage I’ve come up with a Powershell script which grabs these two counters, parses their values, adds them together, and dumps the output into a CSV file. At the end of the monitoring period you can take this CSV into Excel and easily find the peak total call count.
Here are some notes on the behavior:
- The CSV output is date and time, inbound calls, outbound calls, and total calls.
- Data is output to the console and to CSV for real-time monitoring.
- The default values track usage for a week, polling the counters every 15 seconds. You can change the total number of loops in the script to your liking if you need a longer track record.
- If you run the script again it will detect if previous data exists and rename the old file so you don’t lose anything.
- I’ve run this as a logged in user account, but I imagine you could set it up as a scheduled task to run in the background.
- In order to run the script you should first run Set-ExecutionPolicy Unrestricted
The caveat with the Lync version is now that a Mediation server can use multiple gateways we can’t see which gateway is being used for each inbound or outbound call. But this still gives an idea of concurrent call capacity flowing through each Mediation role.
I hope to improve this in the future, but wanted to make it available for everyone sooner than later.