|
|
The LogRemover application agent does more than remove logs. It continually monitors logs and moves or deletes them as defined by the rules in the LogRemover.ini file. Default rules are automatically configured during the initial configuration of your system.
By default, LogRemover acts on logs generated by Cisco on the Gateserver. If it is necessary, System Administrators can define the LogRemover rules for individual log files, for example you might want to delete one log file and move another. They can also configure periodic delays during rules processing to minimize LogRemover's impact on CPU and I/O usage, and configure a time period that must elapse before the LogRemover utility can start rules processing again.
Before you start administering the LogRemover application agent, ensure that the following tasks have been completed.
You perform the following tasks:
You can make the following changes to LogRemover rules processing:
![]() |
Note The LogRemover application logs its deletions, moves, and errors in the LogRemover Sof log file. Deletions and moves are logged at informational severity. |
Step 2 Log in as spmaster.
Step 3 Type: cd $PARMLIB/apps/LogRemover
Step 4 Edit the LogRemover.ini files and set parameters as desired (Table 6-1).
| Parameter | Description | Valid Values |
|---|---|---|
[General] | Section label. This section controls how often the application agent processes all rules, how many files the application agent will process before delaying, and how long the application agent will delay after each batch of files has been processed. The label should not be edited. | N/A |
Indicates how long, in minutes, the delay is that will be encountered from the time the current round of rule processing is complete and next round begins. | 1 - 1440 minutes Default = 55 | |
Indicates how many files will be processed before the file batch delay is introduced. | 1 - 60 Default = 10 | |
FileBatchDelay | Indicates how long, in seconds, to delay before another batch of files is processed. | 1 - 60 seconds Default = 2 |
[ActiveRules] | Section label. This section lists which Rules Section(s) will be processed by LogRemover. The label should not be edited. | N/A |
<Rule> | The name of a rules section that will be processed by LogRemover. Several names may be listed, one per line. | This can be any name you choose. |
[<Rule>] | Section label. This section names a rule and allows the administrator to configure which file(s) are moved or deleted, whether to check the file or set of files on a daily or hourly basis, and how long to skip the files before moving or deleting them. It also allows the administrator to specify where files for a given rule should be moved. | Must match a rule name listed under [ActiveRules]. |
FileList | Informs the application agent which file(s) to process for this rule. If the application agent cannot expand any environment variable, the rule will be ignored (on the given iteration) and the following message will be written to the $PARMLIB/logs/logfiles/*LogRemover* If wildcard characters cannot be expanded, the rule will be ignored and the following message will be written to the $PARMLIB/logs/logfiles/*LogRemover* If FileList starts with any character other than / or $, then FileList will be prepended with $PARMLIB/ and then processed as if $PARMLIB/FileList were in the ini file. $PARMLIB/FileList is not written to the ini file in these cases. It is only prepended and later expanded in memory. | Valid file name(s) must start with either a backslash (/) or a dollar sign ($) or an alphabetic character. A "." or ".." are not allowed as the first character. FileList may have wildcard characters or environmental variables embedded within them. |
Indicates how long in LogRetentionUnits time intervals the file should be ignored. After the file is older than LogRetentionPeriod/LogRetentionUnit (e.g., 5 Day), the file is either deleted or moved based on Action. If LogRetentionPeriod is set to a negative value, the following message will be written to the $PARMLIB/logs/logfiles/*LogRemover* | 0 - 32000 0 = rule is skipped | |
Indicates whether the LogRetentionPeriod is based on an hourly or daily basis. If this field is set to any other value, the following message will be written to the $PARMLIB/logs/logfiles/*LogRemover* | day, DaySets retention based on days hour, HourSets retention based on hours | |
Indicates whether to delete or move the file. If this field is set to move, the file is moved to the location set in MOVEPATH. If this field is set to any other value, the following message will be written to the $PARMLIB/logs/logfiles/*LogRemover*Sof logfile: "[Rule <Current Rule Name>] Action is invalid. | move, MoveMoves the current file. delete, DeleteDeletes the current file. | |
When Action is set to move, indicates location of directory. If the application agent cannot expand any environment variable, the rule will be ignored (on the given iteration) and the following message will be written to the $PARMLIB/logs/logfiles/*LogRemover* Wildcard characters may not be included in the MovePath. If they are included, the files will not to be processed and the following message will be written to the $PARMLIB/logs/logfiles/*LogRemover* If MovePath starts with any character other than "." or "/", then MovePath will be prepended with $PARMLIB/ and then processed as if $PARMLIB/MovePath were in the ini file. $PARMLIB/MovePath is not written to the .ini file in these cases. It is only prepended and later expanded in memory. | A file path, starting with either a slash (/), an alphabetic character, or a single period (with nothing following the period), which tells the application agent where to move the file on Actions of Move. MovePath may have environmental variables embedded within them. |
Figure 6-1 shows the default contents of the Samples/LogRemover.ini configuration file.
[General] PostRuleProcessingDelay=55 FileBatchSize=10 FileBatchDelay=2 [ActiveRules] AllStdErrOutOut AllStdErrOutErr AllEventLogs AllResLogs AllSofLogs AllSNMPLog AllSNMPErr APPStdErrOutOut APPStdErrOutErr TNTStdErrOutOut TNTStdErrOutErr UMStdErrOutOut UMStdErrOutErr AllUMSofLogs AllEscalation [AllStdErrOutOut] FileList=logs/stderrout/*out LogRetentionPeriod=3 LogRetentionUnits=Day Action=Delete MovePath=. [AllStdErrOutErr] FileList=logs/stderrout/*err LogRetentionPeriod=3 LogRetentionUnits=Day Action=Delete MovePath=. [AllEventLogs] FileList=logs/logfiles/*.Eve LogRetentionPeriod=2 LogRetentionUnits=Day Action=Delete MovePath=. [AllResLogs] FileList=logs/logfiles/*.Res LogRetentionPeriod=2 LogRetentionUnits=Day Action=Delete MovePath=. [AllSofLogs] FileList=logs/logfiles/*.Sof LogRetentionPeriod=2 LogRetentionUnits=Day Action=Delete MovePath=. [AllSNMPLog] FileList=logs/logfiles/*snmp*.log LogRetentionPeriod=2 LogRetentionUnits=Day Action=Delete MovePath=. | [AllSNMPErr] FileList=logs/stderrout/*snmp*.err LogRetentionPeriod=2 LogRetentionUnits=Day Action=Delete MovePath=. [APPStdErrOutOut] FileList=logs/stderrout/APP*out* LogRetentionPeriod=1 LogRetentionUnits=Day Action=Delete MovePath=. [APPStdErrOutErr] FileList=logs/stderrout/APP*err* LogRetentionPeriod=1 LogRetentionUnits=Day Action=Delete MovePath=. [TNTStdErrOutOut] FileList=logs/stderrout/TNT*out LogRetentionPeriod=1 LogRetentionUnits=Day Action=Delete MovePath=. [TNTStdErrOutErr] FileList=logs/stderrout/TNT*err LogRetentionPeriod=1 LogRetentionUnits=Day Action=Delete MovePath=. [UMStdErrOutOut] FileList=logs/stderrout/UM*out LogRetentionPeriod=2 LogRetentionUnits=Hour Action=Delete MovePath=. [UMStdErrOutErr] FileList=logs/stderrout/UM*err LogRetentionPeriod=2 LogRetentionUnits=Hour Action=Delete MovePath=. [AllUMSofLogs] FileList=logs/logfiles/*UM*.Sof LogRetentionPeriod=2 LogRetentionUnits=Hour Action=Delete MovePath=. [AllEscalation] FileList=logs/escalation/* LogRetentionPeriod=2 LogRetentionUnits=Hour Action=Delete MovePath=. |
The LogRemover application agent is added to the Schedule.<hostname> file during the initial installation of your system. The following procedure shows how you can administer or restart this application agent.
![]() |
Note You do not have to restart the LogRemover application agent for a LogRemover.ini change to take effect because the application agent rereads that file each time the PostRule ProcessingDelay expires. If you want the changes to take effect immediately without waiting for the delay to expire, you can restart the application agent. |
Step 2 Type:
cd $PARMLIB/parms/APP
Step 3 Change the LogRemover line in the Schedule.<hostname> file as desired.
Step 4 If the system is operational and you are reloading changes to an existing LogRemover application agent, you must stop the application agent first.
Type: kill <PID>
where PID is the process ID of the application agent instance that you want to stop
Step 5 Reload the schedule table.
a. Type: umcli
b. reload sched all LogRemover (if Schedule file was changed)
or
reload sched static LogRemover (if not)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Mon Sep 25 20:05:39 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.