Results 1 to 5 of 5
Hi,
i want to preparing a shell script. I want that the script check for all the mount points on my server and if any mount point have disk space ...
- 01-02-2008 #1Just Joined!
- Join Date
- Jan 2008
- Posts
- 20
To check disk space if it filled more that 90%
Hi,
i want to preparing a shell script. I want that the script check for all the mount points on my server and if any mount point have disk space full more than or equal to 90%, it alert me. so that i can take appropriate action. please help. Thanks .
- 01-02-2008 #2
Use output of df -h command to check used space of all mounted partitions.
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 01-02-2008 #3Just Joined!
- Join Date
- Jan 2008
- Posts
- 20
That's Okay, thanks for it.. But how the script will check and tell me that this particular partition filled more that 90%. Let i have these mount point /inder,/mnt/home and / . Let only /inder is filled upto95%, rest is fine and is not in critical state. How can the script check and print a message for me that /inder has 95% space filled ????
- 01-02-2008 #4
Extract Mounted On and Use% columns from each line of df -h output using grep, sed or awk.
Just compare Use% value and display appropriate message. Check the manual of grep and sed.
Code:man grep man sed
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 01-02-2008 #5Just Joined!
- Join Date
- Jan 2008
- Posts
- 20
Thanks...


Reply With Quote