cc/td/doc/product/voice/uone/srvprov/r41s
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Administering the LogRemover Application

Administering the LogRemover Application


The LogRemover application does more than remove logs. It constantly 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.

Related Topics

Prerequisites

Before you start administering LogRemover application, ensure that the following tasks have been completed.

Managing the LogRemover Application

You perform the following tasks:

Editing the LogRemover.ini File

You can make the following changes to LogRemover rules processing:

Engineering Considerations


Note The LogRemover application logs its deletions, moves, and errors in the LogRemover Sof log file
.

Step 1 Go to the GateServer where the LogRemover application resides.

Step 2 Log in as spmaster.

Step 3 Type: cd $PARMLIB/apps/LogRemover

Step 4 Edit the LogRemover.ini files and set the following attributes (Table 6-1).

[General]
PostRuleProcessingDelay=
FileBatchSize
=
FileBatchDelay=

[ActiveRules]
Rule1
Rule2

[Rule1]
FileList=
LogRetentionPeriod
=
LogRetentionUnits
=
Action
=
MovePath
=
Table 6-1: LogRemover.ini Attributes
Attribute Description Valid Values

[General]

Section label. This section controls how often the application processes all rules, how many files the application will process before delaying, and how long the application will delay after each batch of files has been processed. It should not be edited.

NA

PostRuleProcessingDelay

Indicates how long, in minutes, the delay that will be encountered from the time the current round of rule processing is complete and next round begins.

1 - 1440 minutes

FileBatchSize

Indicates how many files will be processed before a configurable delay is introduced.

1 - 60

FileBatchDelay

Indicates how long, in seconds, to delay before another FileBatchSize file is processed.

1 - 60 seconds

[ActiveRules]

Section label. This section lists which Rules Section(s) will be processed by LogRemover. It should not be edited.

NA

Rule

A listing of all the rules sections that will processed by LogRemover.

This can be any name you choose.

[Rule]

Section label. This section allows the administrator to configure which file(s) are moved or deleted, whether we should 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 listed under [ActiveRules].

FileList

Informs the application which file(s) to process for this rule.

If the application 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*Sof file:
"[Rule <Current Rule Name>] Could not expand Environment Vars."

If wildcard characters cannot be expanded, the rule will be ignored and the following message will be written to the $PARMLIB/logs/logfiles/*LogRemover*Sof file: "[Rule <Current Rule Name>] Could not expand FileList."

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.

LogRetentionPeriod

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*Sof file: "[Rule <Current Rule Name>] LogRetentionPeriod is invalid. Set LogRetentionPeriod to either zero (skip rule) or a positive value (process in n LogRetentionUnits)."

0 - 32000

0 = rule is skipped

LogRetentionUnits

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*Sof file:
"[Rule <Current Rule Name>] LogRetentionUnits
is invalid.

day, Day—Sets retention based on days

hour, Hour—Sets retention based on hours

Action

Indicates whether to delete or move the file to <MovePath>/<Current Filename>.old.

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, Move—Moves the current file.

delete, Delete—Deletes the current file.

MovePath

When Action is set to move, indicates location of directory.

If the application 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*Sof file:
"[Rule <Current Rule Name>] Could not expand Environment Vars."

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*Sof file: "Could NOT Move <Current Filename> No such file or directory."

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 filepath, starting with either a slash (/), an alphabetic character, or a single period (with nothing following the period), which tells the application where to move the file on Actions of Move.

MovePath may have environmental variables embedded within them.

If MovePath is set to a period only, the current file is moved to current file.old.

Figure 6-1 shows the default contents of the Samples/LogRemover.ini configuration file.


Figure 6-1:
Example of a LogRemover.ini File

[General]
PostRuleProcessingDelay=120
FileBatchSize
=10
FileBatchDelay=2

[ActiveRules]
AllEventLogs
AllResLogs
AllSofLogs
AllSNMPLog
ALLSNMPErr
AllEscalation
AllErrlog
ErroutFaxPrintOut
ErroutFaxPrintErr
ErroutMWIout
ErroutMWIerr
ErroutUMout
ErroutUMerr
ErroutMHout
ErroutMHerr
ErroutAmisaout
ErroutAmisaerr
ErroutReloadrules

[AllEventLogs]
FileList=logs/logfiles/*.Eve
LogRetentionPeriod
=3
LogRetentionUnits
=Day
Action
=Delete
MovePath
=.

[AllResLogs]
FileList=logs/logfiles/*.Res
LogRetentionPeriod
=3
LogRetentionUnits
=Day
Action
=Delete
MovePath
=.

[AllSofLogs]
FileList=logs/logfiles/*.Sof
LogRetentionPeriod
=3
LogRetentionUnits
=Day
Action
=Delete
MovePath
=.

[AllSNMPLog]

FileList=logs/logfiles/*.log

LogRetentionPeriod=2

LogRetentionUnits=Day

Action=Delete

MovePath=.

[AllSNMPErr]

FileList=logs/logfiles/*.err

LogRetentionPeriod=2

LogRetentionUnits=Day

Action=Delete

MovePath=.

[AllEscalation]
FileList=logs/escalation/*
LogRetentionPeriod
=3
LogRetentionUnits
=Day
Action
=Delete
MovePath
=.

[AllErrlog]
FileList=errlog/*
LogRetentionPeriod
=3
LogRetentionUnits
=Day
Action
=Delete
MovePath
=.

[ErroutUMout]
FileList=$HOME/errout/UM.out*
LogRetentionPeriod=3
LogRetentionUnits
=Day
Action
=Delete
MovePath
=.

[ErroutUMerr]
FileList=$HOME/errout/UM.err*
LogRetentionPeriod
=3
LogRetentionUnits
=Day
Action
=Delete
MovePath
=.

[ErroutFaxPrintOut]
FileList=$HOME/errout/FaxPrint.out*
LogRetentionPeriod
=0
LogRetentionUnits
=Day
Action
=Delete
MovePath
=.

[ErroutFaxPrintErr]
FileList=$HOME/errout/FaxPrint.err*
LogRetentionPeriod
=0
LogRetentionUnits
=Day
Action
=Delete
MovePath
=.

[ErroutMWIout]

FileList=$HOME/errout/MWI*out*

LogRetentionPeriod=2

LogRetentionUnits=Day

Action=Delete

MovePath=.

[ErroutMWIerr]

FileList=$HOME/errout/MWI*err*

LogRetentionPeriod=2

LogRetentionUnits=Day

Action=Delete

MovePath=.

[ErroutMHout]
FileList=$HOME/errout/MH.out*
LogRetentionPeriod
=3
LogRetentionUnits
=day
Action
=delete
MovePath
=.

[ErroutMHerr]
FileList=$HOME/errout/MH.err*
LogRetentionPeriod
=3
LogRetentionUnits
=day
Action
=delete
MovePath
=.

[ErroutAmisaout]

FileList=$HOME/errout/amisaout.*.out

LogRetentionPeriod=2

LogRetentionUnits=day

Action=delete

MovePath=.

[ErroutAmisaerr]

FileList=$HOME/errout/amisaout.*.err

LogRetentionPeriod=2

LogRetentionUnits=day

Action=delete

MovePath=.

[ErroutReloadrules]

FileList=$HOME/errout/reloadrules.*

LogRetentionPeriod=8

LogRetentionUnits=Hour

Action=delete

MovePath=.

Scheduling the LogRemover




The LogRemover application is added to Schedule.<hostname> file during the initial installation of your system. The following procedure shows how this application is manually set up in the Schedule file.

Step 1 Go to GateServer where the LogRemover application should reside and type:

$PARMLIB/parms/APP

Step 2 Add the following information to the Schedule.<hostname> file

STATIC_NOWAIT 100 1 1 1 * * LogRemover LogRemover/LogRemover

Step 3 If the system is operational and you are reloading changes to an existing LogRemover application, you must stop the application first.

Type: kill <PID>
where PID is the process ID of the application instance that you want to stop

Step 4 Reload the schedule table.Type:

umcli

resched static LogRemover


hometocprevnextglossaryfeedbacksearchhelp
Posted: Mon Sep 25 19:44:02 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.