The Event and Statistics cache can get corrupted at time due to various incidents such as an abrupt shut down of the PATROL Agent. You can fix the corrupted cache in two ways:
- [Recommended] Run
- Set the /AgentSetup/integration/GDD/enableEventFixCache and /AgentSetup/integration/GDD/enableStatFixCache configuration variables to "yes" to automatically run recovery when the agent restarts.
This method should not be used as default. Fixing the cache is a resource intensive process and if automatic cache fixing is set by default, during the PATROL Agent start-up there might be cyclic abnormalities.
This topic provides information about repairing the corrupted Event and Statistics cache using
Before running the
- Create a backup of the existing cache files prior to running the
fix_cacheutility. The files are located at:
- On Windows system: %PATROL_HOME%\log\streamcache\<HOSTNAME>\<PORTNUMBER>
- On UNIX system: $PATROL_HOME/log/streamcache/<HOSTNAME>/<PORTNUMBER>
- Set the PATROL_HOME environment variable.
- On UNIX system running Korn and Bourne shell: ../patrolrc.sh
- On UNIX system running C shell: source.patrolrc
- On older Windows systems Start > Settings > Control Panel > System > Environment; and type the variable name (PATROL_HOME) and value (the path), and click Set.
- On newer Windows system Start > Settings > Control Panel > System > Advance, and click Environment Variables. Click New and type the variable name (PATROL_HOME) and value (the path). Then, click OK.
fix_cache utility requires shutting down the PATROL agent for the entire duration of running the fix_cache utility. The length of the down time is directly related to the size of the cache. If these files are very large or any down time for the agent is undesirable, consider automatic recovery instead of running the
Ensure that adequate disk space is available on the system. A minimum of ten times the size of the cache will be required. During the cache repair, if the system runs out of disk space, all PATROL files will become inaccessible and other applications might also stop running.
Stop the PATROL Agent.
- At the command line, run the
fix_cacheutility and monitor the output.
Issue the following command to get the return code of the process:
See Return values for fix_cache utility section below for more information about return values.
- Repeat Step 3 and 4 till no more errors are reported.
Return values for the
fix_cache utility exits with one of the following values:
- 0 — fix_cache completed successfully
- 1 — fix_cache was aborted because of an error
Syntax for the
fix_cache utility has the following format:
The following table lists and defines the options recognized by the
Options recognized by the
This option specifies which PATROL Agent's cache is used. If -host option is not specified, then the name of the host, where the
|-queue_size||This option specifies the queue size used by the utility. Queue size indicates the number of elements in the queue. If no value is specified or the value is invalid, then value 100 is set as default.|
|-rebuild_cache||This option rebuilds the cache from the buffer. No value is needed for this option.|
This option specifies which PATROL Agent's cache is used. Combined with the -host option, -port specifies a unique PATROL Agent. The value of this option must be the port number to which the specified PATROL Agent is listening. The default value is 3181.
This option displays version information.
Sample usage of the
The following examples illustrate how to use the
- To repair cache for an agent on a specific port
This command fixes the cache and creates a backup of the cache file at port 5000.
- To rebuild the cache
This command fixes the cache and rebuilds it.
- To repair cache at a particular host
This command fixes the cache for host host123 at port 3181.