Edit

Share via


How and when to clear the cache

In System Center Operations Manager, when you troubleshoot an issue with the Operations console or with an agent, you might see recommendations to clear the cache. For more information on troubleshooting an issue with an agent, see Not monitored and gray agents.

Operations Console

You might need to clear the Operations Console cache to fix errors that occur when you access data in views, such as ObjectNotFoundExceptions. You might also need to clear the cache to free up disk space when the cache file becomes too large.

Important

Before you proceed, close any open consoles.

Depending on your organization policy, you might need to run this command from an Administrator PowerShell console.

# Option 1: This will read the console install directory from registry and then execute. Useful if installed in a non-default directory
Start-Process ((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\System Center Operations Manager\12\Setup\Console").InstallDirectory + "Microsoft.EnterpriseManagement.Monitoring.Console.exe") -ArgumentList "/clearCache"

# Option 2: This will start the process in the default ProgramFiles directory
Start-Process "$Env:ProgramFiles\Microsoft System Center\Operations Manager\Console\Microsoft.EnterpriseManagement.Monitoring.Console.exe" -ArgumentList "/clearCache"

Management servers

One of the last steps in troubleshooting is to clear the cache. This step removes any unsaved data along with the current configuration and management packs. After clearing the cache, you receive a new configuration from the database, which includes updated management packs, and the server reconnects with clients. This step can help if a management server has faulty or missing management packs that cause workflow errors or if the server is delayed in sending data to the database.

  1. In the Monitoring workspace, expand Operations Manager, and then expand Management Server.
  2. Select Management Server State.
  3. In the Management Server State column, select one or several servers.
  4. In the Tasks pane, select Flush Health Service State and Cache.
  5. In the prompt window, enter the credentials for this task, or use default credentials and select Run.

Note

This task works differently than that of an agent. It stops all the workflows that run under the HealthService on the management server (which could be in the tens of thousands). This process can take time, and the task might time out or throw an error. If this problem occurs, consider manually clearing the cache.

Gateway servers

One of the last steps in troubleshooting is clearing the cache. Sometimes, the gateway doesn't communicate with the management server and appears greyed out in the System Center Operations Manager console. In such cases, clear the cache for gateways. Also clear the cache when the gateway has outdated or unusable management packs or data that can't be inserted into the database.

  1. In the Monitoring workspace, expand Operations Manager, and then expand Management Server.
  2. Select Management Server State.
  3. In the Gateway Management Server State column, select one or several servers.
  4. In the Tasks pane, select Flush Health Service State and Cache.
  5. In the prompt window, enter the credentials for this task, or use default credentials and select Run.

Client servers

You can fix problems with workflows or communication between the agent on a client server and the management group by clearing the cache and restarting the agent. Use this troubleshooting step as a last resort, but it can resolve some problems effectively.

  1. In the Monitoring workspace, expand Operations Manager, and then expand Agent Details.
  2. Select Agent Health State.
  3. In the Agent State column, select one or several agents.
  4. In the Tasks pane, select Flush Health Service State and Cache.
  5. In the prompt window, enter the credentials for this task, or use default credentials and select Run.

Note

This action deletes the cached data in the health service store files, including the record of this task itself. Because of this deletion, the console doesn't report any true task status when the task finishes. The task always shows as "Succeed" as long as the command is sent.

Next steps