[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Monitor file system free space



On Tue, Dec 22, 2009 at 08:24:25AM -0500, mark@neidorff.com wrote:
> I had a problem with my (small) disk filling up and crashing my mail
> server.  So, I wrote a simple perl script to take the output of 'df -h'
> and look for a % full that is greater than 97% and send me an e-mail if
> the % is greater than 97.  I run the script daily from crontab.  It works
> fine.

97% seems very high.

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              56G  7.4G   45G  15% /
tmpfs                 1.5G   12K  1.5G   1% /lib/init/rw
udev                   10M  940K  9.1M  10% /dev
tmpfs                 1.5G     0  1.5G   0% /dev/shm
/dev/sda9              56G   35G   18G  66% /home/osamu/Desktop/data

As you can see, I am putting some parts of home in different partition.
There I have ISO etc.

I think 80% is high enough. (This is just guts feeling....)

> Yesterday I downloaded an iso image (which brought the file system fill
> from 93% to 100% so that the mail server could not send me the e-mail
> warning.  Is there another way to approach this problem (a different
> tool?)so that I can be notified BEFORE the file system is too full?

Anyway, please read basics:

 http://www.debian.org/doc/manuals/debian-reference/index.en.html
 http://www.debian.org/doc/manuals/debian-reference/ch01.en.html
 http://www.debian.org/doc/manuals/debian-reference/ch09.en.html#_data_storage_tips

Osamu


Reply to: