LinuxQuestions.org
Visit Jeremy's Blog.
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 10-16-2008, 09:02 PM   #1
investmentbnker75
Member
 
Registered: Oct 2007
Location: Eastern Seaboard
Distribution: CentOS
Posts: 162

Rep: Reputation: 15
New logrotate entry help


Can someone with logrotation experience please check my work? I want to add this to /etc/logrotate.d to rotate this access or error log based on a 2GB size and then restart httpd gracefully. Anyone know if the date can be added to the rotated log file from an entry here so it reads access.log.daterotated.gz?

Also can logrotate email an address if there any errors?

Thanks!


/local/stanford.edu/log/*log {
missingok
rotate 52
size=4096M
notifempty
sharedscripts
postrotate
/sbin/service httpd graceful > /dev/null 2>/dev/null || true
endscript
 
  


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
Why we use logrotate ? shipon_97 Linux - Newbie 4 01-09-2008 09:15 AM
Logrotate - did I get it right? Swakoo Linux - General 1 06-20-2006 05:14 AM
Logrotate Help! MaverickApollo Linux - Software 3 02-19-2004 12:09 PM
logrotate dominant Linux - Newbie 1 02-13-2004 09:28 AM
hosts entry for a lan unit with no dns entry linxtc Linux - Networking 1 10-03-2003 08:05 AM

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

All times are GMT -5. The time now is 11:32 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