使用crontab定时任务实现服务器磁盘占用监控,同时把数据推送到数据库
crontabshell磁盘容量检查数据库脚本启动crontab查看crontab 运行状态遇到的坑crontab 基本使用其他使用就自行百度吧,文章多的是
shell磁盘容量检查
dbuser="root"
dbpsw="root"
localip=$(/sbin/ifconfig | grep 'ens33' -A 1 | grep 'inet' | awk '{ print $2 }')
dateTime=$(date "+%F %T")
total=$(df -lh | grep /dev/mapp
原创
2020-11-25 17:25:40 ·
571 阅读 ·
1 评论