echo "$HOSTNAME" >datereport
echo "----------------------------------------------------">>datereport
#检查超过75%分区
echo "over 75%" >>datereport
echo "---------------------------------------------------">>datereport
df -h |grep '[7-9][5-9]%'>>datereport
echo -e "-----------------------------------------------\n">>datereport
#检查服务启动情况
echo "service status">>datereport
echo "----------------------------------------------------">>datereport
service dhcpd status >>datereport
echo -e "--------------------------------------------------\n">>datereport
#显示用户最后登陆时间
echo "user login last time" >>datereport
echo "------------------------------------------------------">>datereport
lastlog | grep -v \* >>datereport
echo -e "--------------------------------------------------\n">>datereport
#查看内存使用情况
free >>datereport
echo -e "--------------------------------------------------\n">>datereport
vmstat >>datereport
echo -e "----------------------------------------------------\n">>datereport
发邮件给管理员
mail -s day-report user