LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-19-2010, 01:08 AM   #1
pradeep2002gs
Member
 
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
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 97
Code:
#!/bin/sh
use=`df -h|grep mount_point|awk '{print $5}'|tr -d '%'`
max_use=80
if [ $use -gt $max_use ]; then
    mail -s 'disk is full' 'some@where.com'
fi
Although, I would recommend monit.
 
  


Reply



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
script for disk space alert cmontr Programming 6 02-09-2019 04:05 AM
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
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:15 PM.

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