cat disk.sh
#!/bin/bash
df -h > /root/disk.txt
mail -s "171_disk" 895463785@qq.com < /root/disk.txt
cat free.sh
#!/bin/bash
free -h > /root/free.txt
mail -s "171_free" 895463785@qq.com < /root/free.txt
cat uptime.sh
#!/bin/bash
uptime > /root/uptime.txt
mail -s "171_uptime" 895463785@qq.com < /root/uptime.txt
添加计划任务
00 9 * * * /root/disk.sh
*/30 * * * * /root/free.sh
*/30 * * * * /root/uptime.sh