Click here for "Safe Air Conditioner Repair and Proper Freon Recovery".

Ubuntu Server 20.04 : Logwatch & Disk usage check scripts

1. Introduction of disk usage check scripts

1.1 Script creation

Contents of

1.2 Run confirmation

①Check your current usage

The following is displayed

②Create a dummy file to achieve at least 80% usage(In the example, the name dummyfile is 8G)

Confirmation that the rate is above 80%.

④Run a disk usage check script

You will receive an email to your email address with the text "Disk usage alert : 98%".

⑤Delete the "dummyfile" you have created

⑥Periodic execution settings

2. Log analysis tool "Logwatch" installation

2.1 Install logwatch

2.2 Editing the logwatch configuration file

①Copy the default configuration file

②Change email address etc.

2.3 Create directory

There is no directory to use for caching, so create one.

2.4 動作確認

If you install logwatch, it will be registered as a cron by default, so you will receive daily report emails
If you want to check now, you can do the following