赞
踩
ps aux |awk -F" " '{print $11,$4}'|sort -k2nr |head -10
[ -f /etc/init.d/functions ] && . /etc/init.d/functions
IP=192.168.0.
for i in {1..254};do
{
IP_New=${IP}${i}
if ping -c 1 -i 0.5 $IP_New &> /dev/null;then
action "^[[1;32m${IP_New} is connection^[[0m" true
else
action "^[[1;31m${IP_New} is unconnection^[[0m" false
fi
}
done
cat backup.sh
tar Jcvf /backup/etcbak-`date -d yesterday +%F-%H`.tar.xz /etc
[00:06:19 root@localhost data]#crontab -l
30 1 * * 1-5 /usr/bin/bash /data/backup.sh &> /dev/null
crontab -l
/10 * * * * /bin/bash /data/disk.sh
df |awk -F " +|%" '/\/dev\/sd/{if($5>20){system("mail -s 'diskwarking' root@localhost") }}'
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。