Run This how to helps you to learn how you can run Logwatch manually. You maybe have a system that runs logwatch automatically and you do not know how to start it manually. In this case, this how to will help you!
Index Of How To Run Logwatch Manually
Background
This How To assumes that you have installed a running and configured version of Logwatch. It further assumes, that you do not know how to start Logwatch manually, because your system potentially runs it always automatically.
If you have not installed Logwatch on your system, that please run the following command on Debian, but also on other Linux systems to install it. Please do not forget to configure Logwatch according to your needs. Install Logwatch:
apt-get install logwatch
Once you have installed and configured Logwatch, then you can run it manually. Please move to the next chapter.
How To Run Logwatch Manually
To run logwatch manually, you first need to find the logwatch executable. This you can do by running either the find or the locate commands.
The “find” command would look like the below:
sudo find / -name logwatch
This will output something like the below:
sudo find / -name logwatch /usr/sbin/logwatch /usr/share/logwatch /usr/share/doc/logwatch /etc/logwatch
The logwatch executable in the above is under /usr/sbin/logwatch. To run Logwatch manually you can now simply run:
sudo /usr/sbin/logwatch
The “locate” command would look like the below:
sudo locate logwatch
This will output something like the below:
/etc/cron.daily/00logwatch /etc/logwatch /etc/logwatch/conf /etc/logwatch/conf/logfiles /etc/logwatch/conf/services <.... MORE LOCATED LOGWATCH FILES ...> /var/lib/dpkg/info/logwatch.md5sums
The logwatch executable in the above is under /usr/sbin/logwatch. To run Logwatch manually you can now simply run:
sudo /usr/sbin/logwatch
Email Logwatch Result Manually
Emailing the Logwatch result is actually quite simple. The prerequisite is however a running email system which is not part of this How To. Therefore, this how to assumes, that you have configured email properly on your system. If this is the case, then it’s very simple to send Logwatch results by Email. Simply execute:
sudo /usr/sbin/logwatch --mailto YOUR@EMAIL-Address.com
Additional Information
If you like to read a how to for configuring your Logwatch configuration for Email notification, then I suggest to read the following How To Logwatch Email Notification. Logwatch is also excellent as part of system hardening measures. If you like to learn more about system hardening, please check out this How To that works well for Debian based Linux, but also for others.
It would be amazing if you follow my myhowto.blog. To my blog is actually easy! You can leverage on
- Click to follow me on Twitter
- Bookmark this page and comeback from time to time
I am really looking forward for you to contact me if for example you found a better option or other idea then in this how to. Also, please touch base if you found an error or anything not working or if you have something that you would love to be added to the myhowto.blog. Simply click this link to touch base with me.
Linking Or Recommending The How To Or The myhowto.blog
I would love to see you are recommending this how to or link it to your website. Also, I would love if you link or recommend the whole myhowto.blog. Please feel free to do so! In case you like to touch base regarding this topic with me, then simply click this link. I look forward!