Below can provide the disk usage from multiple hosts in a HTML format report sorted with usage percentage.
Echo “From: Deva
To: someone@mail.com
MIME-Version: 1.0
Content-Type: text/html
Subject: Disk_usage" > te12
check_lvnodes 'df -g |sed "s/^/`hostname`_/g"' > teak;check_lvwebs 'df -g|sed "s/^/`hostname`_/g"' >> teak;
\(cat te12;echo "
";sort -nr -k4 teak |awk -F" " '$4 > 50'|head -300|sed '/Mounted/d;s/ */ /g;s/ /\<
\;\/td\>\/g;s/$/\<\/td\>\<\/tr\>/g;s/^/\ | \/')|sendmail –t |
Dev | total | Free | Used | Ifree | IUsed | Mount |
No comments:
Post a Comment