#!/bin/bash # Developed by k2patel@gmail.com dtm=$(date -d 'now -1 days' +%d) sar=$(which sar) perl=$(which perl) location='/root/sar' cd $location # $sar -q -b -d -u -p -r -n DEV -f /var/log/sa/sa$dtm > sa$dtm.txt $sar -f /var/log/sa/sa$dtm > sa$dtm_1.txt $sar -r -b -q -d -n DEV -I SUM -u -f /var/log/sa/sa$dtm > sa$dtm.txt $perl sar2rrd.pl -t MDY -f sa$dtm_1.txt $perl sar2rrd.pl -t MDY -f sa$dtm.txt $perl notify.pl img/*.png rm -f *.txt rm -f */{*.png,*.xml,*.rrd}