PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

logrotate time to execute


Your Ad Here

Your Ad Here

helge Myetc-crontab file looks like this:

$ catetc-crontab SHELL=-bin-bash PATH=-sbin:-bin:-usr-sbin:-usr-bin HOME=

# M is minute to start: 00 - 59 # H is hour to start; 00 - 23 # D is day of month to start: 01 - 31 # m is month to start: 01 - 12 -- 01 is January, etc. # d is day of week to start: 00 - 06 -- 00 is Sunday, etc.

Why newbies don't RTFM
Hi guys. Even though I've used Linux before, I've never had to do any admin tasks until recently when I had to install a dual boot system at...

# run-parts # cron.daily is run Monday - Saturday. # cron.weekly is run Sunday only.

# Do not start things from 01:00 to 02:59 because they will run twice # when the fall switch from daylight savings time to standard time occurs, # and may be skipped in the spring when 2:00 AM is skipped.

#M H D m d user program arguments 01 * * * * root run-partsetc-cron.hourly 17 1,5,9,13,17,21 * * * root run-partsetc-cron.6Xdaily 03 3 1 * * root run-partsetc-cron.monthly

The stuff in cron.daily gets run Monday-Saturday a little after 1AM. The stuff in cron.weekly gets run Sundays a little after 5AM. Sunday is different from the other days to avoid Daylight Savings Time change problems, and to ensure that I am least likely to be running the computer at that time.

cron.weekly is mostly symbolic links to cron.daily. Among other things in there, I do backups and it is setup so I could do incremental backups during the week and full backups once a week on Sundays. As a practical matter, I can doo a full backup onto a single tape, so I do all full backups.

Now inetc-cron.daily, there are:

$ ls -l * ..-log.d-scripts-logwatch.pl -rwxr-xr-x 1 root root 418 Aug 27 2003 makewhatis.cron -rwxr-xr-x 1 root root 1603 May 5 2004 prelink -rwxr-xr-x 1 root root 104 Mar 2 2005 rpm -rwxr-xr-x 1 root root 132 Jan 21 2004 slocate.cron -rwxr-xr-x 1 root root 100 Feb 18 2005 tetex.cron -rwxr-xr-x 1 root root 193 Feb 10 2003 tmpwatch -rwxr-xr-x 1 root root 315 Jan 25 2003 tripwire-check -rwxr-xr-- 1 root root 273 Feb 24 2005 up2date.trim -rwxr-xr-- 1 root root 2441 Nov 13 2004 zBackup.cron

... and logrotate contains:

$ cat logrotate #!-bin-sh

usr-sbin-logrotateetc-logrotate.conf EXITVALUE=$? if $EXITVALUE != 0 ; then usr-bin-logger -t logrotate "ALERT exited abnormally with $EXITVALUE" fi exit 0

So now you want to seeetc-logrotate.conf

$ catetc-logrotate.conf # see "man logrotate" for details # rotate log files weekly

# 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 includeetc-logrotate.d

# no packages own wtmp -- we'll rotate them herevar-log-wtmp { monthly create 0664 root utmp rotate 1 }

# system-specific logs may be also be configured here.

once a week, it rotates (normally) only once a week.

-- .~. Jean-David Beyer Registered Linux User 85642. V PGP-Key: 9A2FC99A Registered Machine 241939. ^^-^^ 21:15:00 up 88 days, 15:11, 3 users, load average: 4.42, 4.17, 4.05



Your Ad Here

List | Previous | Next

Why newbies don't RTFM

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

NVidia or ATI cards more Linux friendly