FIM 2010 Troubleshooting: EventID 6313 - Unable to Load Performance Counters for Management Agent

Symptoms

Errors in the application event log stating that the performance counters for a given management agent were unable to load.

Event ID:      6313

Task Category: Server

Level:         Error

Keywords:      Classic

User:          N/A

Computer:      FIMSync

Description:

The server encountered an unexpected error creating performance counters for management agent "Active Directory MA".

Performance counters will not be available for this management agent.

Solution

Option 1. Perform a change mode install.

Option 2. Running the following commands from an elevated command prompt, we were able to reload the performance counters for the version of FIM\ADSync in question:

  1. Delete registry key:
    1. FIM:               [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\FIMSynchronizationService\Performance]
    2. ADConnect:  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ADSync\Performance]
  2. Recreate the necessary 'Performance' registry key.
  3. unlodctr.exe
    1. FIMSynchronizationService
    2. ADSync
  4. lodctr.exe
    1. "C:\Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\Bin\mmsperf.ini"
    2. "C:\Program Files\Microsoft Azure AD Sync\Bin\mmsperf.ini"

This executable is installed on all servers and is used to unload and re-load performance counters.

Credits

Joe Zamora : c--shark.blogspot.com/.../fixed-fim-sync-hangcrash-and.html