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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Log rotation not working

I have set up log rotation to roate almost every log file in var/adm/CSCOpx/log and I set it to keep zero archive. It was working until last week. I have noticed that my log rotation is now keeping several version of the log file and filling var/adm/CSCOpx/log utpo 88%.

/dev/md/dsk/d112 14449643 12485252 1861185 88% /var/adm/CSCOpx

Anyone can tell me what I could be doing wrong?

I'm on RME4.0.6 and solaris9

  • Network Management
5 REPLIES
Cisco Employee

Re: Log rotation not working

Please post your /opt/CSCOpx/objects/logrot/logrot.conf file. If you have configured logrot to maintain multiple versions of archived logs, then what you're seeing is expected. You have two choices: either specify an archive directory in which logrot can store these archives, or disable archiving old log files.

New Member

Re: Log rotation not working

I have configured to NOT keep multiple versions of archives but appears that I have multiple version of archive, here is the logrot.conf file and output from var/adm/CSCOpx/log directory

Cisco Employee

Re: Log rotation not working

Some of these numbered files are created by the log4j subsystem which is independent from logrot. In order to disable that, you would have to edit the numerous log4j properties files used by LMS, and set MaxBackupIndex to 0. Alternatively, you can configure a cron job (or add something to your logrot cron job) which purges all *.[0-9] files from /var/adm/CSCOpx/log.

New Member

Re: Log rotation not working

There are several files that are not numbered and in my logrot list but still not being rotated as they used to be? Secondly,I haven't seen those numbered files until now, what you think may have broken, I haven't made any updates to the OS or the CiscoWorks in several months. Can I manually delete those log file? Do I have to have casuser password to do that? I saw log4j under opt/CSCOpx/object but I couldn't find its properties file.

Thanks.

Cisco Employee

Re: Log rotation not working

Yes, you can manually delete the numbered archives as root. As I said, you can add a cron job to do it automatically.

The various LMS applications have different log4j settings, but in general, the archived log files get created when the main log file reaches as certain size.

Some log files cannot be rotated properly while dmgtd is running. That is, they will get truncated to 0 bytes, but due to the way they are opened, they will immediately jump back to their previous size as soon as they are written to again. The only workaround for this is to perform an offline rotation (i.e. run logrot.pl with the -s flag).

238
Views
0
Helpful
5
Replies
This widget could not be displayed.