|
|
|
|
UGU: Unix Guru Universe - Unix Tip #4026- February 19, 2012
- Home : Help
: Today's Tip
Unix Tip #4026- February 19, 2012
FILE SYSTEM CAPACITY ALERT
#!/bin/sh
# This script can be used to
# warn the users that
# the file system is getting full
#
# Script needs adjusted for your
# needs. Below is set to monitor
# all the file systems mounted and report to
# RECEIVER
#
# Usage: as a cron entry for best use.
RECEIVER=nachiappan.ramanathan@aig.com
for fs in `df -k|awk '{print $1}'|sed -n "3,14 p"`
do
x=`df -kl | grep $fs | awk '{ print $5 }'`
y=50%
if [ $x -gt $y ]
then
message="File System `df -k |grep $fs |awk '{print $6\",
\"$5}'` Full!!!"
echo $subject
echo $message | mailx -s "`hostname` - File System Full
Warning !!!" $RECEIVER
fi
done
This tip generously supported by:
Nachiappan.Ramanathan@aig.com
NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted
by various unix admins around the globe. UGU suggest you read and
test each tip in a non-volitile environment before placing into
production.
LAST 5 TIPS
4025
- Tru64 STTY DEC
4024
- ELIMINATING MULTIPLE SPACES
4023
- FINDING PCI DEVICES
4022
- HANGING TIME ON HPUX
4021
- FINDING MAC ADDRESS ON HP
I want to
SUBSCRIBE
and get a UGU Tip everyday.
I want to
UNSUBSCRIBE
and NOT get a UGU Tip everyday.
If you have a UNIX TIP let us know, we just may use it:
(All tips become the property of the Unix Guru Universe)
|
|
|
Copyright 1994-2024 Unix Guru Universe |
|
|
|
|