Updated diskalert.sh with correct size 95%
This commit is contained in:
parent
d7b2ca5732
commit
27ec402ddb
@ -5,7 +5,7 @@ devnames=`df -h | grep "/dev/" | awk '{print $1}'`
|
|||||||
for devname in $devnames
|
for devname in $devnames
|
||||||
do
|
do
|
||||||
let p=`df -Pk $devname | grep -v ^File | awk '{printf ("%i", $5) }'`
|
let p=`df -Pk $devname | grep -v ^File | awk '{printf ("%i", $5) }'`
|
||||||
if [ $p -ge 1 ]
|
if [ $p -ge 90 ]
|
||||||
then
|
then
|
||||||
df -h $devname > /dev/null
|
df -h $devname > /dev/null
|
||||||
echo "Running out of space \"$devname ($p%)\" on $(hostname) as on $(date)"
|
echo "Running out of space \"$devname ($p%)\" on $(hostname) as on $(date)"
|
||||||
|
Loading…
Reference in New Issue
Block a user