Bagikan melalui


How to unload/reload performance counters on Exchange 2010

 

Previously I had wrote a set of steps for fixing/repairing broken Exchange 2007 counters at https://blogs.technet.com/b/mikelag/archive/2009/10/21/how-to-fix-repair-broken-exchange-2007-counters.aspx. These set of steps have been replaced with an easier way of loading the counters using Powershell for Exchange 2010. This new method applies mainly for managed code services in Exchange 2010 as some of the previous lodctr/unlodctr commands still work for services such as MSExchangeIS and ESE.

In this example, I am going to use the same ESE missing counters as an example.

The important values that we are interested are the following. These values must exist prior to loading the ESE performance counters.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ESE\Performance]
"Close"="ClosePerformanceData"
"Collect"="CollectPerformanceData"
"Library"="C:\\Program Files\\Microsoft\\Exchange Server\\V14\bin\\perf\\%PROCESSOR_ARCHITECTURE%\\eseperf.dll"
"Open"="OpenPerformanceData"
"PerfIniFile"="eseperf.ini"

Here is a screenshot of what it will look like:

clip_image002

Again, verify if the name Disable Performance Counters is set in the registry and if so, is the value set to a value other than 0? If this is set to a value of 4, those counters had a problem at one point and were disabled. If this is set to 4, then change it to 0 and then reopen Performance Monitor to see if the counters can be seen now. If that works, life is good and you can either stop reading here or continue on to reloading the counters if they are still not available.

If the values First Counter, First Help, Last Counter and Last Help are listed, then it is recommended to unload the performance counters first before attempting to reload them again.

To unload performance counters for ESE, perform the following steps:

  • Close down any running versions of Performance Monitor and stop any other monitoring services that might be attempting to use those counters
  • Open the Exchange Management Shell
  • Type add-pssnapin Microsoft.Exchange.Management.PowerShell.Setup and hit enter
  • Type remove-perfcounters –definitionfilename “C:\Program Files\Microsoft\Exchange Server\V14\Bin\perf\AMD64\eseperf.xml” and hit enter
    Note: Ensure that the path is changed to the correct location of eseperf.xml on your server

To reload performance counters for ESE, perform the following steps

  • Close down any running versions of Performance Monitor and stop any other monitoring services that might be attempting to use those counters
  • Open the Exchange Management Shell
  • Type add-pssnapin Microsoft.Exchange.Management.PowerShell.Setup and hit enter
  • Type new-perfcounters –definitionfilename “C:\Program Files\Microsoft\Exchange Server\V14\Bin\perf\AMD64\eseperf.xml” and hit enter
    Note: Ensure that the path is changed to the correct location of eseperf.xml on your server

This will reload the appropriate performance counters for ESE. Once that is done, check the application event log to ensure that they were loaded OK and no Perflib errors exist. Open Performance monitor again to see if the counters are available.

If you are looking to reload any of the Exchange counters, you can substitute the appropriate XML in the command with any of the available XMLs from the \Program Files\Microsoft\Exchange Server\V14\Setup\Perf directory.

Here is a screenshot of some of the available performance counters

image

I hope this helps in your performance counter monitoring in Exchange 2010.

Comments

  • Anonymous
    January 01, 2003
    Excellent! Thanks!

  • Anonymous
    April 29, 2011
    Thank you! Your previous rebuilding Exchange 2007 counters article has also been very helpful!

  • Anonymous
    October 09, 2013
    Works great.  We had to do this because Solarwind/Orion was not able to detect those counters, so we kept seeing an error that the database status counter was unknown.  Thanks again.

  • Anonymous
    March 04, 2014
    where can I find the complete list of Exchange 2013 performance counters documentation?

  • Anonymous
    March 26, 2014
    Second Thairs question here. Seems that this issue is just as present on exchange 2013 cu3

  • Anonymous
    May 20, 2014
    I have installed a 3rd Exchange 2010 SP1 server and all is well but when coming to add the monitoring to our monitoring system some counters seem to be missing? When you go to Database we have HealthService as an instance on the other 2 servers but seems to be missing on the 3rd server?

  • Anonymous
    May 23, 2014
    Nice, Thanks

  • Anonymous
    June 03, 2014
    Pingback from loading and unloading peformance counter in Exchange 2010 | IT bits and pieces

  • Anonymous
    March 31, 2015
    Thanks mike! This procedure also/still works for Exchange 2013 CU8!

  • Anonymous
    June 15, 2015
    Why do these perofrmance counters seem to go missing again after a bit of time? We use SolarWinds Server Application Monitor and it works well for some time and then I notice that the performance counters become unavailable again. "Performance counter not found."

  • Anonymous
    September 28, 2015
    Mike,

    This procedure applies to Exchange 2013 CU9 ???

    Thank You

  • Anonymous
    October 01, 2015
    A small PowerShell script will reload all counters:

    add-pssnapin Microsoft.Exchange.Management.PowerShell.Setup
    Get-ChildItem -path "C:Program FilesMicrosoftExchange ServerV14Setupperf" -Filter *.xml | Foreach-Object{
    echo $.FullName
    new-perfcounters –definitionfilename $
    .FullName
    }