Updated diskalert to scan /dev/
This commit is contained in:
parent
d7716edf0d
commit
d7b2ca5732
@ -1,11 +1,11 @@
|
||||
#!/bin/bash
|
||||
source /etc/profile
|
||||
|
||||
devnames="/dev/md0 / /dev/sdc1"
|
||||
devnames=`df -h | grep "/dev/" | awk '{print $1}'`
|
||||
for devname in $devnames
|
||||
do
|
||||
let p=`df -Pk $devname | grep -v ^File | awk '{printf ("%i", $5) }'`
|
||||
if [ $p -ge 95 ]
|
||||
if [ $p -ge 1 ]
|
||||
then
|
||||
df -h $devname > /dev/null
|
||||
echo "Running out of space \"$devname ($p%)\" on $(hostname) as on $(date)"
|
||||
|
Loading…
Reference in New Issue
Block a user