cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2751
Views
5
Helpful
17
Replies

LMS3.2.1 - should my custom log rotation settings override log4j properties?

d.land
Level 1
Level 1

For LMS 3.2.1 on Windows, I have configured log rotation settings for dcmaservice.log but the settings are ineffective, even after stop/start CW daemon manager.  Other posts on this forum state that dcmaservice.log rotation is managed by log4j but can also be configured in logrot.  Is this incorrect or have I encountered a bug in logrot?

1 Accepted Solution

Accepted Solutions

1. log4j does manage dcmaservice.log as well as most of the LMS logs.  However, for RME logs, log4j is setup a bit differently.  The configuration is split across multiple files.  To control the file size of all RME logs, you need to edit the

MDC/tomcat/webapps/rme/WEB-INF/classes/com/cisco/nm/rmeng/util/logger/base.property file.

2. See above.  Both settings are maintained in base.property.

3. No.  Logrot is independent of log4j.

View solution in original post

17 Replies 17

Gaganjeet Chug
Level 4
Level 4

Hi,

Kindly share the screenshot how you have configured the dcmaservice.log and also how bug the file is.

Many Thanks,

Gaganjeet

Hi ,

What is the current size of the dcmaservice.log too.

Many Thanks,

Gaganjeet

Directory of E:\CSCOpx\log

08/26/2011  04:07 AM         9,373,826 dcmaservice.log

08/25/2011  08:07 PM        10,288,983 dcmaservice.log.1

08/25/2011  08:07 PM        10,353,541 dcmaservice.log.2

               3 File(s)     30,016,350 bytes

Note that my logrot path is F:\MLISNETMONA_FTP and this directory does not contain any dcmaservice.log backups.

Hi,

Kindly run the following command (It will trigger the logrotation) and share the output.

C:\Progra~1\CSCopx\bin>perl logrot.pl

Many Thanks,

Gaganjeet

I ran logrot.pl - 9 files copied (4 spun off plus 5 prior backups) including syslog.log etc but not dcmaservice.log. No change to the dcmaservice.log.X files in the \CSCOpx\log directory.

Hi,

Kindly remove the dcmaservice.log from roatation and then add it back.

Many Thanks,

Gaganjeet

Hi Gaganjeet.

OK, deleted/added from/to rotation. I should point out that dcmaservice.log was only added to log rotation yesterday. When that was not immediately effective I stopped LMS daemons, deleted dcmaservice.log (and log.1 log.2) then restarted daemons.  Still no effect.  I'm trying to get debug logs for a sync archive problem but the dcmaservice logs are wrapping (several times) during the sync.  Also, log rotation is scheduled daily at midnight (primarily to spin off syslog for collection by CNC). Thanks, Dick.

Hi,

So, after deleting and adding the dcmaservice.log its still not rotate to the backup location. Kindly run the command :-

CSCOpx\bin> perl logrot.pl -s (It's offline rotation i.e will stop the daemon manager and then rotate the logs if they exceeded the specified limit).

Many Thanks,

Gaganjeet

Gaganjeet,

I'd like definitive answers to the following questions before continuing down this path.

1) does log4j subsystem manage dcmaservice.log?

2) if so, is there a log4j properties file for dcmaservice which can be edited to change log file size and number of versions to keep (eg. see the forum entry https://supportforums.cisco.com/message/664225#664225 re license.log)?

3) can Common Services user-configurable log rotation override the parameters for logs managed by log4j subsystem?

Thanks.

Hi ,

There is no unified list.But you can go through each log4j*.properties file, and pick the logs out of there.

Files that are managed by log4j will auto-rotate based on the log4j properties file associated with them
To configure centralized log rotation,its better to use Logrot.

logrot.pl -c manipulates the CSCOpx/objects/logrot/logrot.conf file. You can directly modify that file but
you need to be careful and must understand what changes you made.

Many Thanks,
Gaganjeet Singh

1. log4j does manage dcmaservice.log as well as most of the LMS logs.  However, for RME logs, log4j is setup a bit differently.  The configuration is split across multiple files.  To control the file size of all RME logs, you need to edit the

MDC/tomcat/webapps/rme/WEB-INF/classes/com/cisco/nm/rmeng/util/logger/base.property file.

2. See above.  Both settings are maintained in base.property.

3. No.  Logrot is independent of log4j.

Hi Joeseph Clarke,

Thanks Joe Sir for the detailed explanations on the Logrot feature.

Regards

Gaganjeet Singh

Hi Joe.  Thanks very much for your response - I now have the debug logs I need.

Does the Ciscoworks daemon manager have to be cycled to pick up the change to base.property or is there a less disruptive way to implement the change?

Thanks again!   Dick.