Linux Shell 监控 的 Shell 脚本

  

EMAIL_TO = [email protected]" EMAIL_TO_B = [email protected] " EMAIL_TO_C = " [email protected]" Disk_load = 95a = (`df | awk '{print $ (NF-1)}' | sed -e 's /\\% //' g | grep -v " Montado " | grep -v " \\ /" quot `` i = 0 mientras [$ i -lt $ {# a [@]}] doif [$ {a [i]} -gt $ {Disk_load}]; thenIP_Addr = `/sbin /ifconfig | sed -n '/inet addr /s /^ [^:] *: \\ ([0-9.] \\ {7,15 \\} \\). * /\\ 1 /p' | head -1`SendMail = " 警报 , 服务器 IP: " $ {IP_Addr} "硬盘 空间 已经 使用 : " $ {a [i]}% " " MailTitle = " Alarma, la ip del servidor: " $ {IP_Addr} " se utiliza espacio en el disco duro " $ {a [i]}% " " echo $ SendMail |  mail -s " $ MailTitle " -c $ {EMAIL_TO_B} $ {EMAIL_TO} - -f $ {EMAIL_TO_C} fii = `expr $ i + 1`done
en"],null,[0.85854596],en"]]]

Copyright © Conocimiento de Windows All Rights Reserved