Mailinglist Archive: opensuse (4237 mails)

< Previous Next >
Re: [SLE] confirming logrotate has occured
  • From: Patrick Shanahan <paka@xxxxxxxxxxxxxxx>
  • Date: Mon, 30 Aug 2004 10:01:51 -0500
  • Message-id: <20040830150151.GT28637@xxxxxxxxxxxxxxx>
* Hylton Conacher (ZR1HPC) <hylton@xxxxxxxxxxxx> [08-30-04 04:02]:
>
> How would I check, besides viewing the cron_daily etc scripts, that the
> logrotated had run and compressed any of my logs?
...
> P.S.: Anything besides 'man logrotate' Pat?

:^)

why not look at the config files for logrotate and see which files
should have compression/rotation performed, then display the
directories where those files exist? ie:

partial view of /etc/logrotate.d/syslog

/var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall {
compress
dateext
maxage 365
rotate 99
missingok
notifempty
size +4096k
create 640 root root
sharedscripts
postrotate
/etc/init.d/syslog reload
endscript
}




so logrotate/digest will perform on /var/log/warn, /var/log/messages....

so on commandline or in your file browser of choice look in /var/log
for warn*

In my system I see (abreviated):

/var/log/warn
.....
/var/log/warn-20040814.gz
/var/log/warn-20040817.gz
/var/log/warn-20040819.gz
/var/log/warn-20040821.gz
/var/log/warn-20040824.gz
/var/log/warn-20040825.gz
/var/log/warn-20040827.gz




so I may conclude that files are being condensed/compressed and rotated.

Now, that wasn't so hard, was it? The thing to learn is not what was
done, but how it was approached.

:^)



ps: man logrotate *is* the correct answer. If you will look in man
logrotate, for 'CONFIGURATION FILE', you will see an example of what I
just went thru and an explanation. Man files may be somewhat obtuse,
but a quick scan, then a more cursory look at the particular items that
appear to apply, *usually* will give enough direction to solve a
problem or, at least, give understanding.

NOTE: The manner you posed your question deserved the *long*
explanation rather than the exemplary 'RTFM'.
--
Patrick Shanahan Registered Linux User #207535
http://wahoo.no-ip.org @ http://counter.li.org
HOG # US1244711 Photo Album: http://wahoo.no-ip.org/photos

< Previous Next >