LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-18-2004, 10:35 PM   #1
MaverickApollo
Member
 
Registered: Oct 2003
Distribution: Debian
Posts: 55

Rep: Reputation: 15
Log Rotate


How do I add log files to the log rotate?

My kernal files, mail logs etc are all rotated, but I have other logs of software I would like to be rotated as well, such as Snort Logs, amavisd etc....

How do I add these logs to the list of logs to be rotated???????
 
Old 01-18-2004, 10:56 PM   #2
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Rep: Reputation: 30
Logs get rotated via cron scheduling. On my system (and it may be different from RH), there is a logrotate.conf file in /etc you can edit to configure other files. man logrotate for options. There should be a 'logrotate' file in each of your /etc/cron.* directories (hourly, daily, weekly, monthly).
 
Old 01-19-2004, 12:00 AM   #3
MaverickApollo
Member
 
Registered: Oct 2003
Distribution: Debian
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Logs get rotated via cron scheduling. On my system (and it may be different from RH), there is a logrotate.conf file in /etc you can edit to configure other files. man logrotate for options. There should be a 'logrotate' file in each of your /etc/cron.* directories (hourly, daily, weekly, monthly).
Yes, I have logrotate.conf, and can understand how cron is used to do the file work, but dont understand the syntax the logrotate.conf uses for the rotation of files. Any insite to this? I have looked at the Man Pages, but will have another look and see.
 
Old 01-19-2004, 12:12 AM   #4
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Rep: Reputation: 30
# Rotate /var/log/wtmp:
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}

Here /var/log/wtmp is getting rotated monthly as noted. The create line tells it to create a new log file. 0664 is the file's permissions. You could do 'ls -l' in the directory of the logs you want rotated and just reuse the permissions you find there. The rotate 1 means it will go through 1 monthly rotatation before the backup is removed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
lastlog - What is it, and how do I rotate it? ifm Linux - Newbie 9 04-22-2011 09:45 AM
rotate text bizshop Linux - Software 1 06-22-2005 05:17 PM
Rotate Screen Display ! santoshpatel Linux - Hardware 3 06-19-2005 09:00 AM
how do I rotate the syslog jonsag Linux - Newbie 3 12-19-2004 02:33 PM
Problem with squid and rotate chamkila Linux - General 1 05-15-2003 05:46 PM


All times are GMT -5. The time now is 08:49 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration