惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threatpost
Latest news
Latest news
N
News | PayPal Newsroom
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
TaoSecurity Blog
TaoSecurity Blog
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
O
OpenAI News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Securelist
小众软件
小众软件
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
Cisco Talos Blog
Cisco Talos Blog
云风的 BLOG
云风的 BLOG
AWS News Blog
AWS News Blog
GbyAI
GbyAI
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
美团技术团队
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
博客园 - 聂微东
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
SecWiki News
SecWiki News
S
Secure Thoughts
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
腾讯CDC
H
Heimdal Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed

博客园 - ttyp

火苗-批量改名最新V1.0.5 喂来猫-超强工具集最新版 V1.0.9.0 使用MemberShip时,用HttpWebRequest抓数据 ASP.NET图形化的曲线图类 JS写的一个功能齐备的treeview控件 输入自动完成类 code collection 0.44版 发布 JS代码的格式化和压缩 JS代码混淆初步 OUTLOOK菜单类 WEB打印分页类(JS) - ttyp - 博客园 自动配置IE代理脚本 XP下IIS不能添加扩展名映射的BUG js编写的语法高亮引擎 js写的Hashtable类 INF文件格式小结 自动提示效果 超强的WEB表格组件 关于设置WebControls里的treeview控件的图片路径
定时检查网站是否掉线的批处理
ttyp · 2006-09-22 · via 博客园 - ttyp

连日来,托管服务器每天老是掉线,重起一下又好了,似乎没有死机,不像是硬件的问题.怀疑有木马或病毒,但是找了几天没找到,没办法,还是先治治标吧,慢慢找吧.下面是写的批处理checktoreboot.bat,原理是定期每小时ping一次自己的域名,如果不通则重起机器.

@echo 每小时检查主机是否能Ping通自己的域名,如果不能,则重新启动机器,如装防火墙过滤,请考虑其他办法,或开放ICMP协议
@echo 检查中......
@echo off
echo execute-date:>>c:\checktoreboot.log
date /t>>c:\checktoreboot.log
echo execute-time:>>c:\checktoreboot.log
time /t>>c:\checktoreboot.log

set hh=%time:~0,2%
set /a hh +=1
if /i %hh% GEQ 24 set /a hh = 0
at %hh%:00 C:\CheckToReboot.bat
ping -n 1 www.yourname.com|find "Request" && shutdown -r
echo ==============================================>>c:\checktoreboot.log
@echo on
@echo 检查完毕!

然后在autoexec.bat中加入Call CheckToReboot.bat