[mythtv-users] Any way to set up a warning when logs get too big?

David Watkins watkinshome at gmail.com
Wed Apr 29 13:02:20 UTC 2009


2009/4/29 Boleslaw Ciesielski <bolek-mythtv at curl.com>:
> Ronald Frazier wrote:
>>>
>>> Is there anyway to set up a warning when my log files start getting too
>>> big?
>>
>> Logrotate is typically set to rotate out log files on a scheduled
>> basis (daily, weekly, etc). However, you can also tell it to rotate
>> out the logs when they exceed a certain size. What I don't know (since
>> I've never used that option) is how quickly logrotate detects that it
>> has exceeded size (I don't know if it checks daily, hourly, minutely,
>> etc).
>
> logrotate does not run continuously. You have to run it periodically from
> cron or something and it checks when you run it.

logwatch runs in a similar way, produces a simple to understand disk
usage summay and can be configured to send it's results to an email
address.

I suspect your biggest issue might be configuring your box as a mail server.

Do you need to email out into the big wide world, or is mailing it to
a user on your network sufficient.

For a laugh, try typing the following in a terminal and see what happens?

ls -l | mail -s "test listing" <email_address>

If it works, this will send a copy of the directory listing to the
specified mail address.

try a local user name as the email address.  Then, as that user, type

mail

and you should the new email at the bottom of the list.

If it doesn't work you need to check if you're running a mail server
(probably either sendmail or postfix)


now try a full external email address ( I doubt this will work because
you have to configure the mail server to use your ISPs mail relay
host)


More information about the mythtv-users mailing list