Chapter 3 Configuring the Server
Maintaining Log Files
3-82
User Guide for CiscoWorks Common Services
78-16571-01
Step 5
Specify the maximum file size. The log will not be rotated until this size is
reached. The unit is in kilobytes (KB). The default is 1024 KB or 1 MB.
Step 6
Specify the file compression type to be used. It can be:
•
Z—UNIX
•
gz—GNU gzip (available by default on Windows only)
•
bz2—bzip2 (available by default on Solaris8 and above only).
When deleting logfiles, you can choose to delete an individual file, a list of files,
or a all files matching a certain pattern.
For example, 1-3 means delete files numbered 1 through 3. a list of
comma-separated file numbers, for example, 1,21, means delete files numbered 1
and 21. A pattern string
*.log
means delete all files that match the pattern
*.log
.
You can also specify the special pattern,
*
, which means delete all logfiles in the
configuration.
Running Logrot
To run Logrot enter either of the following:
On Windows:
Enter NMSROOT
\bin\perl.exe
NMSROOT
\bin\logrot.pl
On Unix:
Run
/opt/CSCOpx/bin/logrot.pl
You can schedule log rotation so that the utility works on a specified time and day.