08-26-2011 05:30 AM
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?
Solved! Go to Solution.
09-09-2011 02:27 PM
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.
08-26-2011 06:16 AM
Hi,
Kindly share the screenshot how you have configured the dcmaservice.log and also how bug the file is.
Many Thanks,
Gaganjeet
08-26-2011 06:28 AM
08-26-2011 06:30 AM
Hi ,
What is the current size of the dcmaservice.log too.
Many Thanks,
Gaganjeet
08-26-2011 06:36 AM
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.
08-26-2011 06:47 AM
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
08-26-2011 07:11 AM
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.
08-26-2011 09:36 AM
Hi,
Kindly remove the dcmaservice.log from roatation and then add it back.
Many Thanks,
Gaganjeet
08-26-2011 10:49 AM
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.
08-27-2011 04:18 AM
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
08-29-2011 12:33 PM
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.
09-05-2011 01:28 AM
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
09-09-2011 02:27 PM
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.
09-11-2011 01:09 AM
Hi Joeseph Clarke,
Thanks Joe Sir for the detailed explanations on the Logrot feature.
Regards
Gaganjeet Singh
09-12-2011 08:58 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide