Friday, March 8, 2013

Disk related counters not showing in PerfMon on Windows 2008 Server where SQL Server instance is running



Default counters like physical disk, logical disk are overridden by SQL server perfmon config files which are in *.INI files under following location

C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\

You will have to manually rebuild performance counter library values to include other non-SQL counters

Please refer to following link for rebuilding counter library

Here are the steps from the above link (In case link breaks in future)
Rebuild the base performance counters
Extensible counter information is stored in both of the following locations:
·         The following registry subkey:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current Version\Perflib\009
·         The %Systemroot%\System32\Perfc009.dat file and the %Systemroot%\System32\Perfh009.dat file
To rebuild the base performance counter libraries manually, follow these steps:
1.       Expand the Perfc009.dat file and the Perfh009.dat file. These files are located on the Windows Installation Disc. The compressed files are found at DriveLetter:\i386\perfc009.da_ and at DriveLetter:\i386\perfh009.da_. Replace the files that are in the %Systemroot%\System32 folder.
2.       Start Registry Editor, and then locate the following key in the registry:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Perflib
3.       In the registry, change the Last Counter value to 1846 (decimal), and change the Last Help value to 1847 (decimal).
4.       Locate the following registry key to search for services that have a Performancesubkey:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services
5.       Remove the following values from the Performance subkey (if they exist):
o    First Counter
o    First Help
o    Last Counter
o    Last Help
You can also use the Exctrlst.exe tool to locate the performance counter dynamic-link library files (DLLs) that are installed, and then access the registry to remove the DWORD values. You now have a workable performance registry that contains only system base counters.

Note
 Removing the values from the Performance subkey in the registry may cause any installed .NET Framework applications not to work the next time that they are started. If this occurs, use the lodctr /R command in the "Re-add the extensible counters" section to rebuild the Performance counters. If you continue to have problems when you start a .NET Framework application, see the "Reinstall any custom .NET Framework assembly performance counters" section in this article.

No comments:

Post a Comment