Logwatch messages file

I'd like to change where the logwatch directory is placed - and limit it's size.  

Right now it's going into the /var/tmp area - which is set to 500MB.  The file size, however, will often exceed that (another issue altogether) - causing the tmp directory to fill up and consequently glitching out other things like MySQL.

I'd like to redirect it to another place (any directory - suggestions?) and limit it's file size to maybe 50-80MB.

How would I go about doing that?  :)

Thanks in advance -
LVL 2
erzoolanderAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Jan SpringerConnect With a Mentor Commented:
It should be /tmp and I don't see why you can't change it.
0
 
erzoolanderAuthor Commented:
Edit -

I think I know what's going on - so need to edit the question a bit.

What's happening, I believe, is that logwatch is attempting to process the log files.  During that process - it's filling up the tmp directory, at which point it fails - and therefore can't finish the process and/or clean up after itself.  So - it's leaving all it's work-in-progress crap sitting in tmp - undeleted.

So - limiting the file size (unless I'm limiting the file size of the /var/log file being analyzed) isn't the solution (and that might be one).

Rather - the solution appears to be that it needs to output to a different directory other than /var/tmp.

...and if so - how to do that?

I see a TmpDir = /tmp variable in the logwatch.conf file.  Is it that?  (and shouldn't it be /var/tmp - or is the /var assumed?)
0
 
erzoolanderAuthor Commented:
That ended up being the solution.  I simply redirected the output for logwatch to an alternate directory (that had no file size restriction) and that cleared up the issue altogether.
0
All Courses

From novice to tech pro — start learning today.