Last active
October 31, 2017 07:41
-
-
Save artttj/a1bd6b37de458287d917bcdcc44a9568 to your computer and use it in GitHub Desktop.
check inodes disk space and mail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MAILTO="y@b.biz,e@b.biz,a@b.biz,t@b.com" | |
USAGE=90 # inode usage - value in percent | |
dui=$(df -hi | sed -n '4p' |awk '{print $5}' | grep -v U|cut -d% -f1) | |
if [ $dui -gt $USAGE ] | |
then | |
echo "Inode usage on 52.52.52.135 is exceeded - $dui%" |mailx -s "Inode usage on $(hostname)" $MAILTO | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment