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

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

博客园 - 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