cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
598
Views
0
Helpful
4
Replies

Issue with Logrot script

simon.bell
Level 1
Level 1

I was noticing that the log files were growing beyond the size defined even tho the job rotation schedule was set to run daily. When I manually run the job from cli I get the following messages:

=====================================

Fri Nov 14 08:55:52 2008: INFO: Read variable backup_dir --> d:\log_files

Fri Nov 14 08:55:52 2008: INFO: Logfile = D:\PROGRA~1\CSCOpx\log\syslog.log, Backup File = d:\log_files\syslog.log

Fri Nov 14 08:55:52 2008: INFO: Not archiving D:\PROGRA~1\CSCOpx\log\syslog.log because it is not big enough.

file size = 428894481, conf size = 1073741824

Fri Nov 14 08:55:52 2008: INFO: Logfile = D:\PROGRA~1\CSCOpx\log\CSDiscovery.log, Backup File = d:\log_files\CSDiscovery.log

Fri Nov 14 08:55:52 2008: INFO: Logfile = D:\PROGRA~1\CSCOpx\log\dmgtDbg.log, Backup File = d:\log_files\dmgtDbg.log

Fri Nov 14 08:55:52 2008: INFO: Not archiving D:\PROGRA~1\CSCOpx\log\dmgtDbg.log because it is not big enough.

file size = 95940, conf size = 1048576

Fri Nov 14 08:55:52 2008: INFO: Logfile = d:\PROGRA~1\CSCOpx\log\ConfigMgmtServer.log, Backup File = d:\log_files\ConfigMgmtServer.log

Fri Nov 14 08:55:52 2008: INFO: Not archiving d:\PROGRA~1\CSCOpx\log\ConfigMgmtServer.log because it is not big enough.

file size = 28806819, conf size = 1073741824

Fri Nov 14 08:55:52 2008: INFO: Logfile = d:\PROGRA~1\CSCOpx\log\EPMServer.log, Backup File = d:\log_files\EPMServer.log

Fri Nov 14 08:55:52 2008: INFO: Not archiving d:\PROGRA~1\CSCOpx\log\EPMServer.log because it is not big enough.

file size = 423949228, conf size = 1073741824

Fri Nov 14 08:55:52 2008: INFO: Logfile = d:\PROGRA~1\CSCOpx\log\ani.log, Backup File = d:\log_files\ani.log

Fri Nov 14 08:55:52 2008: INFO: Logfile = d:\PROGRA~1\CSCOpx\log\CVDeviceSelector.log, Backup File = d:\log_files\CVDeviceSelector.log

Fri Nov 14 08:55:52 2008: INFO: Logfile = d:\PROGRA~1\CSCOpx\log\AnalyzerDebug.log, Backup File = d:\log_files\AnalyzerDebug.log

Fri Nov 14 08:55:52 2008: INFO: Not archiving d:\PROGRA~1\CSCOpx\log\AnalyzerDebug.log because it is not big enough.

file size = 551754, conf size = 1048576

Fri Nov 14 08:55:52 2008: INFO: Logfile = d:\PROGRA~1\CSCOpx\log\dbbackup.log, Backup File = d:\log_files\dbbackup.log

Fri Nov 14 08:55:52 2008: INFO: Logfile = d:\PROGRA~1\CSCOpx\log\ngdiscovery.log, Backup File = d:\log_files\ngdiscovery.log

Fri Nov 14 08:55:52 2008: INFO: Logfile = d:\PROGRA~1\CSCOpx\log\CSPortal.log, Backup File = d:\log_files\CSPortal.log

Fri Nov 14 08:55:52 2008: INFO: Not archiving d:\PROGRA~1\CSCOpx\log\CSPortal.log because it is not big enough.

file size = 38632, conf size = 1048576

=====================================

However when I run logrog.pl -c the configuration is set to the following:

=====================================

Number Logfile Name Number of Archives Max Size Compress

-----------------------------------------------------------------------------

1. D:\PROGRA~1\CSCOpx\log\syslog.log 2 1048576 gz

2. D:\PROGRA~1\CSCOpx\log\CSDiscovery.log 2 1024 gz

3. D:\PROGRA~1\CSCOpx\log\dmgtDbg.log 2 1024 gz

4. d:\PROGRA~1\CSCOpx\log\ConfigMgmtServer.log 1 1048576 gz

5. d:\PROGRA~1\CSCOpx\log\EPMServer.log 1 1048576 gz

6. d:\PROGRA~1\CSCOpx\log\ani.log 2 1048576 gz

7. d:\PROGRA~1\CSCOpx\log\CVDeviceSelector.log 1 5120 gz

8. d:\PROGRA~1\CSCOpx\log\AnalyzerDebug.log 2 1024 gz

9. d:\PROGRA~1\CSCOpx\log\dbbackup.log 1 1024 gz

10. d:\PROGRA~1\CSCOpx\log\ngdiscovery.log 2 1024 gz

11. d:\PROGRA~1\CSCOpx\log\CSPortal.log 1 1024 gz

=====================================

The conf file has the same settings so I'm not sure what the problem is... Any thoughts?

TIA,

Simon

4 Replies 4

Joe Clarke
Cisco Employee
Cisco Employee

These messages indicate that none of the log files configured are big enough for rotation (and most are 0 bytes or don't exist).

If you think this is an error, please post the output of a DIR showing the file size of one of the files not being rotated.

Volume in drive D is Data

Volume Serial Number is C894-61EE

Directory of D:\Program Files\CSCOpx\log

11/14/2008 09:09 AM

.

11/14/2008 09:09 AM

..

/////omitted small files////

11/13/2008 03:39 PM 112,989 license.log

11/14/2008 09:17 AM 124,177 EventFramework.log

09/04/2008 11:20 AM 204,711 DFMDeviceSelector.log

11/14/2008 09:17 AM 224,187 CTMJrmServer.log

11/14/2008 09:17 AM 226,903 NameServiceMonitor.log

11/11/2008 05:24 PM 234,437 ctm.log

11/11/2008 05:24 PM 237,034 DFMLogServer.log

11/13/2008 03:33 PM 244,359 ChangeAuditUI.log

11/11/2008 05:24 PM 261,114 PTMServer.log

11/14/2008 09:17 AM 460,259 EssMonitor.log

11/11/2008 05:22 PM 516,115 CampusOGSServer.log

11/14/2008 09:17 AM 535,037 configjobs.log

11/14/2008 09:47 AM 569,027 AnalyzerDebug.log

11/14/2008 09:47 AM 644,124 campusportal.log

11/14/2008 09:45 AM 705,497 wlseuhic.log

11/13/2008 03:33 PM 751,104 CSDeviceSelector.log

11/14/2008 08:06 AM 764,018 invreports.log

11/14/2008 09:47 AM 779,973 psu.log

11/14/2008 09:00 AM 827,407 smtp.log

11/14/2008 09:17 AM 971,560 rme_ctm.log

11/12/2008 12:05 PM 1,397,144 RMEOGSServer.log

11/07/2008 10:17 AM 2,148,277 netconfigclient.log

11/11/2008 05:08 PM 2,172,220 wlseuhic.log_backup

11/13/2008 03:01 PM 2,281,418 RMEHome.log

11/14/2008 08:26 AM 2,377,355 IC_Server.log

11/06/2008 03:56 PM 2,507,950 dcrclient.log

11/10/2008 11:16 AM 2,818,721 RMEDeviceSelector.log

11/11/2008 09:50 PM 3,093,266 SyslogCollector.log

11/12/2008 10:45 AM 4,045,785 cjp.log

11/14/2008 09:18 AM 4,079,432 RMEPortlets.log

11/14/2008 08:06 AM 4,185,385 cri.log

11/14/2008 02:01 AM 5,020,551 UTMajorAcquisition.log

11/14/2008 09:33 AM 5,137,977 EDS.log

11/13/2008 03:33 PM 5,354,742 ICServerUI.log

11/11/2008 05:14 PM 5,498,025 rme.log

11/14/2008 08:07 AM 6,751,542 NetShowClient.log

11/14/2008 09:43 AM 7,536,956 EssentialsDM_Server.log

11/14/2008 09:17 AM 7,835,072 dcmaclient.log

11/14/2008 08:36 AM 7,873,149 swim_debug.log

11/14/2008 09:43 AM 8,163,301 dcmaservice.log

11/13/2008 05:11 PM 9,273,371 SyslogAnalyzerUI.log

11/14/2008 09:41 AM 9,771,458 EssentialsDM.log

11/14/2008 01:43 AM 10,240,011 IC_Server.log.1

11/13/2008 05:33 PM 10,240,033 dcmaservice.log.2

11/13/2008 06:12 PM 10,240,092 dcmaservice.log.1

11/14/2008 01:28 AM 10,240,210 IC_Server.log.2

11/14/2008 09:09 AM 14,604,727 ani_debug.log

11/13/2008 06:37 PM 28,806,819 ConfigMgmtServer.log

11/14/2008 09:46 AM 34,058,072 NOSServer.log

11/14/2008 09:44 AM 229,202,511 ani_debug_new.log

11/14/2008 09:47 AM 368,077,218 jrm.log

11/14/2008 09:44 AM 423,953,818 EPMServer.log

11/14/2008 09:48 AM 432,069,582 syslog.log

134 File(s) 1,691,650,895 bytes

4 Dir(s) 80,313,647,104 bytes free

Logrot appears to be correct. Your syslog.log is ~ 432 MB, but the configured logrot size is 1 GB. The same 1 GB size is also configured for ConfigMgmtServer.log and EPMServer.log.

The logrot file sizes are specified in kilobytes.

ah... you're right. For some reason I was thinking it hit the file @ 10mb.

Sorry for the misunderstanding.

sb