- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: logrotate question/problem
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2006 04:48 AM
06-27-2006 04:48 AM
logrotate question/problem
# see "man logrotate" for details
# rotate log files weekly
#weekly
# commented out weekly and changed to size due to e-mail errors
size 100M
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
#compress
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2006 05:47 AM
06-27-2006 05:47 AM
Re: logrotate question/problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2006 05:57 AM
06-27-2006 05:57 AM
Re: logrotate question/problem
I don't have a specific file/stanza for mail in my /etc/logrotate.d directory. /var/log/maillog is included in /etc/logrotate.d/syslog. Shouldn't that be enough?
I can't seem to find any documentation on how logs specified in the /etc/logrotate.d/syslog are treated. thx. -joe-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2006 07:12 AM
06-27-2006 07:12 AM
Re: logrotate question/problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2006 07:48 AM
06-27-2006 07:48 AM
Re: logrotate question/problem
Ivan,
Correct me if I'm wrong... and I very well could be... but I thought it went as follows:
1. start crond
2. crond searches /etc/crontab and /etc/cron.d for programs to run.
3. run-parts in root's crontab executes cron.daily/hourly/weekly etc...
4. logrotate runs out of /etc/cron.daily
5. /etc/logrotate.conf is read by /etc/cron.daily/logrotate
6. /etc/logrotate.conf includes files that are in /etc/logrotate.d directory
7. /etc/logrotate.d/syslog specifies /var/log/maillog
...so I'm pretty sure it is running? + this is from my /var/lib/rotate.status.
"/var/log/maillog" 2006-6-26
thx. joe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2006 08:02 AM
06-27-2006 08:02 AM
Re: logrotate question/problem
1. start crond
2. crond searches /etc/crontab and /etc/cron.d for programs to run.
3. run-parts in root's crontab executes cron.daily/hourly/weekly etc...
4. logrotate runs out of /etc/cron.daily
5. /etc/logrotate.conf is read by /etc/cron.daily/logrotate
6. /etc/logrotate.conf includes files that are in /etc/logrotate.d directory
7. /etc/logrotate.d/syslog specifies /var/log/maillog
***8. If the logrotate.conf is configured to be executed in daily basis with the daily parameter, or if there are some log files configured to be rotated daily, then continues, if not, waits until the next run.
Anyway, you can use logrotate -f to "force" and test the rotation of the log files. Also, consider that the files may grow beyond the 100 MB because logrotate runs only once at the day, and won't monitor the file so when exactly 100 MB is reached will be rotated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2006 10:49 AM
06-27-2006 10:49 AM
Re: logrotate question/problem
Based on a thorough reading of the thread, I'd suggest changing the cron schedule for logrotate.
If 100 MB is important to you than run logrotate more often. All its going to do is nothing if the parameters are not met.
We like to run it on a fixed schedule so we know the time span of log contents. Its not like its from Mount Sinai or anything, you can do what you want.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2006 12:02 PM
06-27-2006 12:02 PM
Re: logrotate question/problem
I agreep with SEP though.
If the 100MB is important, then run logrotate more regularly than once-a-day. 'logrotate' will handle the logs correctly, as it keeps it's own records as to when it's rotated something.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2006 03:17 AM
06-29-2006 03:17 AM
Re: logrotate question/problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2006 04:22 AM
06-29-2006 04:22 AM