This is a discussion on Disk space alert via email within the Shell scripting forums, part of the Development/Scripting category; Hi All, I am looking for some script which will mail to me when disk space is above set limit. ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| Sponsored Links | ||
|
|
|
|||
|
If you want to script this yourself you save the threshold to a variable, run 'df -m' and pipe it through awk with the devicename as searchterm, print the (space separated) fifth field and save that as a variable. Then remove the percentage sign from the variable ("VAR=${VAR//\%}"), then make the variable have a default value to take unmounted partitions into account ("${VAR:=0}"), then compare ("-ge") with your threshold value and "&& mail args".
|
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Creating the perl Backup script for hard disk to hard disk backup | vmr.gouda | CentOS / RHEL / Fedora | 2 | 05-15-2008 01:08 AM |
| Shell script to check the disk space on remote systems | vijayscripts | Shell scripting | 5 | 10-21-2007 06:29 PM |
| mod_rewrite with convertion of space and / to _ | kasimani | Networking, Firewalls and Security | 0 | 03-13-2007 11:52 AM |
| mod_rewrite with convertion of space and / to _ | kasimani | Web servers | 0 | 03-13-2007 11:51 AM |
| Replaceing [] and white space with sed | TiredOrangeCat | Shell scripting | 2 | 02-12-2007 10:58 PM |