Re: installation date and time



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
.



Relevant Pages

  • Re: Logrotate appends extra numbers to logfiles
    ... extra numbers to logfiles on a system I've been accessing. ... The sysadmin who set this up is a Windows admin, ... # rotate log files daily - added by QB ...
    (comp.os.linux.setup)
  • Logrotate appends extra numbers to logfiles
    ... extra numbers to logfiles on a system I've been accessing. ... admin access to change anything but I really wanted to get it figured ... # rotate log files daily - added by QB ...
    (comp.os.linux.setup)
  • Re: problem in log files
    ... Do you like to stop the log's rotate? ... Because the logrotate is your friend, if you stop the logrotate your ... I have a great problem in my log files, ... # RPM packages drop log rotation information into this directory ...
    (RedHat)
  • Squid and logrotate
    ... I am trying to configure logrotate, but I am having a lot of problems. ... # rotate log files daily ... # create new log files after rotating old ones ... # RPM packages drop log rotation information into this directory ...
    (comp.os.linux.misc)
  • Squid and Logrotate
    ... I am trying to configure logrotate, but I am having a lot of problems. ... # rotate log files daily ... # create new log files after rotating old ones ... # RPM packages drop log rotation information into this directory ...
    (comp.os.linux.misc)