COME ON, LEARN TOGETHER THROUGH THIS BLOG

Friday, May 20, 2011

SHORT SCRIPT FOR FREE SPACE

SHORT SCRIPT FOR FREE SPACE
Here comes a short script which will check from time to time that there is enough free space available on anything which shows up in mount (disks, cdrom, floppy...)
If space runs out, a message is printed every X seconds to the screen and 1 mail message per filled device is fired up.
#!/bin/sh
#

# $Id: check_hdspace,v 1.18 1996/12/11 22:33:29 root Exp root $
#

#
# Since I got mysterious error messages during compile when
# tmp files filled up my disks, I wrote this to get a warning
# before disks are full.
#
# If this stuff saved your servers from exploding,
# send praising email to zocki@goldfish.cube.net.

No comments:

Post a Comment