The script will keep requesting a status page (can be any page served by the application server), if the request timed out or error occurs, it will try to restart application server, if restart failed few times, it will stop trying and send you an alert email.
To run it: nohup ./sitechk.pl &
Note: use it at [...]
Posts Tagged ‘原创’
A simple perl script to mintor java application server
Posted in 网站技术, tagged Java, perl, resin, 原创 on 2009/01/07 | 1条评论»
一段简单的mysql备份脚本
Posted in 网站技术, tagged backup, mysql, shellscript, 原创 on 2009/01/07 | Leave a Comment »
适用于小型网站或开发环境的数据库备份,其他场合请考虑用mysqlhotcopy或其他被推荐的方案(如:master/slave)
#!/bin/bash
cd /home/hugo/bin/backup
eval $(date "+MABB=’%B’ WEEK=’%u’ DAY=’%d’ MON=’%m’ YEAR=’%Y’")
case $WEEK in
1)
OUT=1
;;
2)
OUT=2
;;
3)
OUT=3
;;
4)
OUT=4
;;
5)
OUT=5
;;
6)
OUT=6
;;
7)
OUT=7
;;
*)
OUT=0
;;
esac
/usr/bin/mysqldump -uroot –all-database > fullbackup$OUT.sql
My name is Hugo Zhu.



