Re: installation date and time
- From: Jean-David Beyer <jdbeyer@xxxxxxxxxxx>
- Date: Wed, 21 Dec 2005 16:22:06 -0500
spike1@xxxxxxxxxxxxx wrote:
> Cinder6 <cinder6@xxxxxxxxx> did eloquently scribble:
>
>>
>>
>>spike1@xxxxxxxxxxxxx wrote:
>>
>>>Part of the standard cron settings, usually daily or weekly, although the
>>>script might check on the size of a log and only rotate it when it hits a
>>>certain size...
>>>
>>>Never really looked into it.
>>
>>Interesting, my cron folders have no such event there. Must be why
>>I've never seen it!
>>
>
> Not too sure of that...
> check /var/log
>
> If you have things like
> messages-20050615.gz
> in there, you have log rotation.
>
Even if you don't ...
On Red Hat systems, there is a file in /etc/cron.daily that says:
$ cat logrotate
#!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0
I have never sen the ALERT message. But /etc/logrotate.conf tells it what to
do. Mine says:
$ cat logrotate
#!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0
trillian:jdbeyer[/etc/cron.daily]$ cd ..
trillian:jdbeyer[/etc]$ c
trillian:jdbeyer[/etc]$ cat logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
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
include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}
--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 16:15:00 up 25 days, 2:46, 5 users, load average: 4.28, 4.17, 4.06
.
- References:
- installation date and time
- From: sanky
- Re: installation date and time
- From: Cinder6
- Re: installation date and time
- From: spike1
- Re: installation date and time
- From: Cinder6
- Re: installation date and time
- From: spike1
- Re: installation date and time
- From: Cinder6
- Re: installation date and time
- From: spike1
- installation date and time
- Prev by Date: Re: Opinion on best system to run Linux
- Next by Date: Re: Opinion on best system to run Linux
- Previous by thread: Re: installation date and time
- Next by thread: Re: installation date and time
- Index(es):
Relevant Pages
|
|