Commit | Line | Data |
---|---|---|
999a7ebf CE |
1 | #!/bin/bash |
2 | # Check afs partitions for free space problems | |
3 | ||
4 | THRESHOLD=85 | |
5 | ||
6 | df -h --output=target,pcent,used,avail | grep ^/vicep | sed -e s/%// | awk "{if (\$2 > $THRESHOLD) print}" | while read partition pcent used avail; do | |
7 | echo "${used} used, ${avail} available. Consider resizing partition." | mail -s "$(hostname) AFS partition ${partition} ${pcent}% full" log+afs@hcoop.net | |
8 | done |