Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

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

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.

Everyone's tags (5)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

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

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

5 REPLIES
Cisco Employee

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

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

Community Member

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

Thanks for the reply.

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

Cheers,

Vineet

Cisco Employee

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

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).

Community Member

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

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.

Cisco Employee

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

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.

1284
Views
0
Helpful
5
Replies
CreatePlease to create content