Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-01-2006, 07:56 AM
|
#1
|
LQ Newbie
Registered: Oct 2005
Distribution: Debian
Posts: 16
Rep:
|
How to change Debian log rotation of syslog and daemon.log
Hi. I am using webalizer to generate these terrific charts of webpage hits, etc, but I need to make a change to the number of days my log files are being rotated.
Right now, syslog and daemon.log are both rotated each day for 7 days. So I end up with a syslog, syslog.0, syslog.1, ... syslog.6
My server has tons of room, and I want to change it so that I rotate these log files everyday but keeps a whole year of them. An alternative would be to rotate these logs weekly and keep 52 weeks.
I can see how my Shorewall and other software is configured for thier log files, using /etc/logrotate.d and the daily cron system. However, I can't figure out how syslog and daemon.log are configured and rotated.
Any ideas? Thanks!
|
|
|
02-03-2006, 03:00 PM
|
#2
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,762
Rep:
|
logrotate.conf usually has generic rotate configuration whereas logrotate.d is a place for individual servers/apps to put their info...so have a look in logrotate.conf.
You will want to change "rotate" from whatever figure it is to "rotate 52" if you really want a years worth. Keep your eye on disk usage as a years worth is a huge amount of logs.
|
|
|
07-31-2008, 02:27 AM
|
#3
|
LQ Newbie
Registered: Jan 2007
Location: Johor, Malaysia
Distribution: Slackware 9.2,12.2,13.0, Debian woody,sarge,etch,Centos5.3
Posts: 22
Rep:
|
Debian syslog rotation is not controlled by logrotate at all, please don't mislead the OP when you're not sure with it. You might making him going to the wrong direction in solving this and waste a lot of his time.
Debian syslog rotation is controlled by cron daily script which sit in /etc/cron.daily/sysklogd , and this script will run everyday morning depends on how your /etc/crontab define it.
And in the file /etc/cron.daily/sysklogd, you could clearly notice the rotation is done by the command 'savelog'. In default it put a cycle of 7, which will make you having syslog.0 till syslog.6
In your case, you might want to change both the /etc/cron.daily/sysklogd and /etc/cron.weekly/sysklogd , to suit to your needs. Please be aware that the mentioned script is using a command 'syslogd-listfiles' to indeed decide what log file to be handled.
What I suggest is you modify how 'syslogd-listfiles' is called in those script and as well as the 'savelog' '-c' option.
|
|
|
All times are GMT -5. The time now is 11:11 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|