Monday 9 January 2012

BlackBerry Perf. Counters missed on server

Performance of Any application we can observe using Performance counters on windows server. These counters will install while installing the application on the server. If we install active Directory on the server it will install performance counters too.

Most of the cases we will face Performace counters which are related to the BlackBerry on Windows server with 64 bit. While installing black berry application on the server it will install 32 bit counters on the server. If the server is with 32 bit we can see tha counters with out any issue. If it is 64 bit we will need to uninstall 32 bit counters and install 64 bit counters.

1. Un-installtion of 32 Bit counters:

Open CMD(Run as administrator) on the server and go to the path " C:\Program Files (x86)\Research In Motion\BlackBerry Enterprise Server\". After that type the below commands to unregister 64 bit counters.

Regsvr32 /U AgentPerfSession.dll and press ENTER
After go to the path "C:\Program Files (x86)\Research In Motion\BlackBerry Enterprise Server\BypassRouter" and type the below commands
Regsvr32 /U RouterPerfClient.dll and press ENTER
Regsvr32 /U RouterPerfSession.dll and press ENTER

This will complete the unregistration of 32 bit counters on the server. Then we need to install 64 counters.

Type cd "C:\Program Files" and press ENTER
Type mkdir "Research In Motion\BlackBerry Enterprise Server" and press ENTER
Type cd "C:\Program Files\Research In Motion\BlackBerry Enterprise Server\" and press ENTER
Copy AgentPerfSession.dll into this folder from the "[the extracted installer folder]\tools\WMI\x64\"
Copy AgentWMIPerf.mof into this folder from the "[the extracted installer folder]\tools\WMI\"
Type regsvr32 AgentPerfSession.dll and press ENTER
Type mofcomp.exe AgentWMIPerf.mof and press ENTER
Type mkdir BypassRouter and press ENTER
Type cd BypassRouter and press ENTER
Copy RouterPerfClient.dll and RouterPerfSession.dll into this folder from C:\Program Files (x86)\Research In Motion\BlackBerry Enterprise Server\BypassRouter"
Copy RouterClientPerf.mof and RouterSessionPerf.mof into this folder from C:\Program Files (x86)\Research In Motion\BlackBerry Enterprise Server\BypassRouter"
Type Regsvr32 RouterPerfClient.dll and press ENTER
Type Regsvr32 RouterPerfSession.dll and press ENTER
Type Mofcomp RouterClientPerf.mof and press ENTER
Type Mofcomp RouterSessionPerf.mof and press ENTER
Restart the computer
Launch the Performance Monitor using Start > Run > Perfmon /wmi

Active Directory Performance Counters Issue

Performance of Any application we can observe using Performance counters on windows server. These counters will install while installing the application on the server. If we install active Directory on the server it will install performance counters too.

Few cases we did not find the perf. counters on the servers. Most of the cases the issue withe enable or disable counters registry in registry keys. We have that option where we can enable/Disable performance counters in the registry keys. Registry path for the AD is as below:

HKLM\System\CurrentControlSet\Services\NTDS: in this registry we have one sub registry "DisablePerformanceCounters" key to enable or disable counters. If the value is set to 0 that means counters were enabled. We need to make sure that the value should be Zero to enable counters.

Once we done with the above registry we need reload the counters to Performance counters using the command "lodctr.exe /r" in Windows\System32 folder. Once we done with the loading counters we can see the counters in the performance counters.

To transfer these counters to WMI repository we need to use "WMIADAP.EXE /F" command. This ADAP (AutoDiscovery/AutoPurge) process will load the counters to WMI repository forcefully. Once we done with the above process we must restart the WMI service on the server. If you fail to restart the WMI service go for reboot and check.

Solution 2: If you are unable to find the above registry on the server we can export from any other Domain controller and import on the target server. These counters will differ based on the OS version of the server. We need to Import windows 2003 server AD registry keys to Windows 2003 server only. same for 2008 servers also.

Once you done with the above steps you will get missed performance counters on the server.