[Tfug] Automatic Update?

Bexley Hall bexley401 at yahoo.com
Mon Sep 18 10:32:20 MST 2006


--- Jim Secan <jim at nwra.com> wrote:

> At 09:54 AM 9/18/2006 -0700, you wrote:
> >> I guess the fix is to divide the yum.log up into
> >> years, unless there's a
> >> way to add the year so that Logwatch sees it.
> >
> >Setup a crontab entry to cat 'date' to the end
> >of the logfile every new year's eve (or, every
> >month if you'd prefer a belts-and-braces approach!)
> 
> So, this would trigger Logwatch to use the correct
> year?  The band-aid fix

No.  It would manually inject a line of the form:

"all entries beyond this one occur in the year xxxx"

> I put in was to modify the yum entry for logrotate
> to rotate that log annually.

That also gets rid of the problem -- by "disposing"
of (i.e. rotating out) the old records.  You just then
have to remember that the log contains no entries
prior to the current year.

I guess it depends on how busy the log files are.
E.g., the MARK facility to syslog generates copious
activity so quickly makes big log files.  Those
you wouldn't mind discarding regularly.

OTOH, if this just logs software updates at the
rate of "a few per month", then *I* would prefer
to keep the entire log intact to simplify scanning
it for ALL updates (instead of having to remember to
"check last year's log").  YMMV.

The "'date' > logfile" approach has the benefit
that the entry is *there* if you keep the log file
and disappears if you decide to opt for a "rotate
log out at end of year" approach.

Of course, you can also just patch the sources and
get the behaviour you want...  

"Use the source, Luke..."

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the tfug mailing list