cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1970
Views
0
Helpful
5
Replies

syslog.log and log rotation - what is going on???

vineetsheoran
Level 1
Level 1

I am sure this has been asked before but in CW syslog.log just keeps on getting bigger and bigger. I have set the log rotation parameters to 2GB with no backups. The file is currently 2.5G (it can get upto 10G before we notice problems with CW and have to manually delete the file).

From some of the threads I have read on this topic at CSC it seems once we have configured the maximum file size we then also have to set a periodical surge policy to empty the file - is this correct? If so, then this two stage procedure seems counter productive. Isn't the whole point of specifying a file size is that once it reaches that limit the contents are cleared and the counter reset to zero hence the name 'log rotation'. And if we have to set a periodical surge policy seperately then the file size limit should become irrelevant because the file is being surged regardless of its current size. Am I right or am I missing something?

We are using LMS 3.2.

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

Log rotation alone should take care of syslog.log.  Post the NMSROOT/objects/logrot/logrot.conf file, and the output of the following command when the syslog.log file is above your configured threshold:

NMSROOT/bin/perl NMSROOT/bin/logrot.pl -v

View solution in original post

5 Replies 5

Joe Clarke
Cisco Employee
Cisco Employee

Log rotation alone should take care of syslog.log.  Post the NMSROOT/objects/logrot/logrot.conf file, and the output of the following command when the syslog.log file is above your configured threshold:

NMSROOT/bin/perl NMSROOT/bin/logrot.pl -v

Thanks for the reply.

The output of the "logrot.pl -v" command and logrot.conf file attached.

Cheers,

Vineet

According to this syslog.log was rotated properly.  After running it, it should have been pretty close to 0 bytes, and a new archive was created in D:\PROGRA~1\CSCOpx\log (e.g. syslog.log.0.gz).

Hi Joe,

Thanks for your help on this one. Running the perl script did clear the log and the file is now again building up slowly but still within the maximum file size limit specified which is good but few questions though:

1. What specific part of the perl script causes the syslog.log to flush its content?

2. Do we have to run the perl script manually everytime syslog.log exceeds its limit?

Thanks,

Vineet

P.S. Apologies for the late response.

The Perl script has code which truncates the file.  You need to schedule logrot.pl to run.  On Windows, this is done with the DOS AT command.  If you are using LMS 3.2, you can schedule logrot to run in the GUI under Common Services > Server > Admin > Log Rotation.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: