LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-25-2012, 07:00 AM   #1
anishkumarv
Member
 
Registered: Feb 2010
Location: chennai - India
Distribution: centos
Posts: 294

Rep: Reputation: 10
Logs not Rotating Properly.


Hi all,

i configured logrotate for my application, this is my config file .

Quote:
/opt/logs/R2R-OTE {
daily
dateext
rotate 365000
missingok
notifempty
create 0644 nbc apache
}

i put this entry in this file /etc/logrotate.d/epp

but when i try to forceful logrotate using this option

Code:
/usr/sbin/logrotate -v -f /etc/logrotate.d/epp

i am getting this message only and its not rotating my logs.

Quote:
reading config file /etc/logrotate.d/epp
reading config info for /opt/logs/R2R-OTE

Handling 1 logs

rotating pattern: /opt/logs/R2R-OTE forced from command line (365000 rotations)
empty log files are not rotated, old logs are removed
kindly guide me to solve this issue.
 
Old 11-26-2012, 01:38 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
run
Code:
ls -l
on your logfiles

PS are you REALLY sure about 'rotate 365000'; that's a hell of a lot of logfiles to leave lying around...

Last edited by chrism01; 11-26-2012 at 01:40 AM.
 
Old 11-26-2012, 07:57 PM   #3
anishkumarv
Member
 
Registered: Feb 2010
Location: chennai - India
Distribution: centos
Posts: 294

Original Poster
Rep: Reputation: 10
Quote:
-rwxrwxr-x 1 nbc apache 138309341 Nov 27 01:52 aeroeppproxy.log
-rw-r----- 1 nbc nbc 1251912 Nov 10 08:51 bharateppproxy.log
-rwxrwxr-x 1 nbc apache 33027401 Nov 27 01:53 bizproxy.log
-rwxrwxr-x 1 nbc apache 116036381 Nov 27 01:52 bzeppproxy.log
-rwxrwxr-x 1 nbc apache 139629119 Nov 27 01:52 cctldeppproxy.log
-rwxrwxr-x 1 nbc apache 29472420 Nov 27 01:53 comepp_proxy.log
-rwxrwxr-x 1 nbc apache 118894102 Nov 27 01:52 glis_coopeppproxy.log
-rwxrwxr-x 1 nbc apache 29204092 Nov 27 01:53 glis-teleppproxy.log
-rwxrwxrwx 1 nbc nbc 7874 Oct 22 11:46 hneppproxy.log
-rwxrwxr-x 1 nbc apache 175984414 Nov 27 01:52 ineppproxy.log
-rwxrwxr-x 1 nbc apache 90395608 Nov 27 01:52 infoeppproxy.log
-rwxrwxr-x 1 nbc apache 96557519 Nov 27 01:52 mobieppproxy.log
-rwxrwxr-x 1 nbc apache 71028039 Nov 27 01:52 nameeppproxy.log
-rwxrwxr-x 1 nbc apache 30294311 Nov 27 01:53 namestore_proxy.log
-rwxrwxr-x 1 nbc apache 103610534 Nov 27 01:52 nbc-asiaeppproxy.log
-rwxrwxr-x 1 nbc apache 30279548 Nov 27 01:53 nbc_cneppproxy.log
-rwxrwxr-x 1 nbc apache 93469194 Nov 27 01:52 nbc_coopeppproxy.log
-rwxrwxr-x 1 nbc apache 93944156 Nov 27 01:52 nbc-meeppproxy.log
-rwxrwxr-x 1 nbc apache 28768539 Nov 27 01:53 nbc-proeppproxy.log
-rwxrwxr-x 1 nbc apache 28897651 Nov 27 01:53 nbc-teleppproxy.log
-rwxrwxr-x 1 nbc apache 26802131 Nov 27 01:53 nbc-useppproxy.log
-rw-r----- 1 nbc nbc 4040852 Aug 31 05:41 org11-dnsseceppproxy.log
-rwxrwxr-x 1 nbc apache 35869267 Nov 27 01:52 org-dnsseceppproxy.log
-rwxrwxr-x 1 nbc apache 81435782 Nov 27 01:52 orgeppproxy.log
-rw-r----- 1 nbc nbc 325 Aug 21 07:20 orggp-dnsseceppproxy.log
-rwxrwxr-x 1 nbc apache 33592413 Nov 27 01:53 travelproxy.log
-rwxrwxr-x 1 nbc apache 102752911 Nov 27 01:52 xxxeppproxy.log

Thanks for the reply , ya thats not a problem friend because i don't want to delete the logs, i just want to rotate the logs.
 
Old 11-26-2012, 08:04 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Your entry inside the logrotate file must match the name of the logs to be rotated eg
Code:
cat syslog

/var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
{
    sharedscripts
    postrotate
	/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
    endscript
}
This '/opt/logs/R2R-OTE' does not match the name of any of the logfiles you've listed ...
 
2 members found this post helpful.
Old 11-27-2012, 08:39 PM   #5
anishkumarv
Member
 
Registered: Feb 2010
Location: chennai - India
Distribution: centos
Posts: 294

Original Poster
Rep: Reputation: 10
Quote:
/opt/logs/R2R-OTE/*log {
daily
dateext
rotate 365000
missingok
notifempty
create 0644 nbc apache
}
Thanks its works like charm after changing the config like this.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Logs not rotating anon091 Linux - Newbie 5 08-17-2012 06:16 AM
Logs not rotating Arty Ziff Linux - Server 5 01-04-2011 01:51 AM
Rotating Apache logs and Webalizer xMeta4x Linux - Software 5 03-20-2009 12:42 AM
Problem rotating Postfix logs keyF Linux - Software 3 08-30-2006 07:56 AM
problems rotating logs uros678 Linux - Software 0 12-15-2003 02:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration