Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-19-2010, 01:08 AM   #1
Registered: Apr 2006
Location: india->tamilnadu->madurai
Distribution: fedora,suse,ubuntu
Posts: 84

Rep: Reputation: 15
Smile Script to alert about mount point space via sendmail to user.

Hi all
i'm in search of Script that sends a mail to the user if the mount point goes beyond 80% of its full space.
send mail is configured in the system so that it can communicate with mail server.
if any have idea pls guide me.
thanks in advance.
Happy day
Old 03-19-2010, 01:31 AM   #2
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 96
use=`df -h|grep mount_point|awk '{print $5}'|tr -d '%'`
if [ $use -gt $max_use ]; then
    mail -s 'disk is full' ''
Although, I would recommend monit.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mount point space jayraj005 General 15 05-29-2009 08:31 AM
Increase space for mount point . . . eng_mohammedmostafa Linux - Software 7 03-26-2009 12:12 AM
script for disk space alert cmontr Programming 2 01-12-2009 12:27 PM
LXer: Perl script to monitor disk space and send an email alert LXer Syndicated Linux News 1 02-23-2007 01:12 PM
Need more space to a mount point salmjuh Linux - Software 0 10-18-2004 05:03 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:31 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration