1825789 Members
2122 Online
109687 Solutions
New Discussion

File System Full

 
girishb
Frequent Advisor

File System Full

Hi,

I have Redhat Linux OS installed in the server and it is running sendmail.

I need to write a script which checks filesystem size and if it exceeds 90%, it mail to some user ABC.

Thanks in advance.
Girish

4 REPLIES 4
Joshua Scott
Honored Contributor

Re: File System Full

Something like this?

if [ "`df | grep -E \"9[0123456789]%\"`" != "" ]
then
df | mail someusers@example.com
fi
What are the chances...
Ivan Ferreira
Honored Contributor

Re: File System Full

Some examples:

http://bash.cyberciti.biz/monitoring/monitor-disk-space-alert.bash.php
http://www.edoceo.com/creo/syscheck.php
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
girishb
Frequent Advisor

Re: File System Full

Thanks Ivan,

The URL you have provided has worked.
Vitaly Karasik_1
Honored Contributor

Re: File System Full

RH linux provided "diskcheck" utility for long time. But for some reason I don't see it in my CentOS4.