FSCK Check
Added by astuffedtiger on May 16, 2017 19:46
#!/bin/bash
echo ":: Kernel Information ::" > /tmp/fsck_check
uname -a >> /tmp/fsck_check
echo "" >> /tmp/fsck_check
echo ":: Uptime ::" >> /tmp/fsck_check
uptime >> /tmp/fsck_check
echo "" >> /tmp/fsck_check
echo ":: Disk Status ::" >> /tmp/fsck_check
set `/sbin/tune2fs -l /dev/hda1 |grep state`
echo /boot $* >> /tmp/fsck_check
set `/sbin/tune2fs -l /dev/hda2 |grep state`
echo / $* >> /tmp/fsck_check
SERVERNAME=$(hostname -f)
mail -s "Disk Status - $SERVERNAME" email@address.com < /tmp/fsck_check ;
rm -f /tmp/fsck_check

Comments