Enable & Disable Log-watch feature in Linux server [closed]

Can anyone please share the procedure how to enable & disable the log-watch feature in Linux RHEL 5 machine.

Thanks in advance.


Solution 1:

Logwatch is usually started by cron.

Check directory /etc/cron.daily/ for a script which launches logwatch.

In RHEL there is a symlink /etc/cron.daily/0logwatch which points to /usr/share/logwatch/scripts/logwatch.pl

You can remove this link (0logwatch) from /etc/cron.daily to prevent logwatch from running every day:

rm /etc/cron.daily/0logwatch

To enable it back just create a symlink again:

ln -s /usr/share/logwatch/scripts/logwatch.pl /etc/cron.daily/0logwatch