<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>系统运维 &#187; 负载</title>
	<atom:link href="http://www.osyunwei.com/archives/tag/%e8%b4%9f%e8%bd%bd/feed" rel="self" type="application/rss+xml" />
	<link>https://www.osyunwei.com</link>
	<description>国产化OS/AnolisOS/openEuler/RHEL/CentOS/Rocky Linux/Debian/Ubuntu Linux FreeBSD 服务器教程 &#124; Windows Server 2003/2008/2012/2016/2019/2022/2025服务器教程</description>
	<lastBuildDate>Tue, 14 Apr 2026 10:59:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Linux下Web服务器CPU负载超过阀值自动重启脚本</title>
		<link>https://www.osyunwei.com/archives/9381.html</link>
		<comments>https://www.osyunwei.com/archives/9381.html#comments</comments>
		<pubDate>Sat, 06 Feb 2016 01:13:50 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Liunx]]></category>
		<category><![CDATA[负载]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=9381</guid>
		<description><![CDATA[说明： 操作系统：CentOS web服务器：apache 问题： 搜索引擎的爬虫导致网站在某一段时间内访问量剧增，服务器压力过大，网站访问超时、页面无法打开。 解决办法： 定时监控服务器负载，超过一定阀值后，自动重启web服务。 apache安装目录：/usr/local/apache 脚本运行日志文件：/usr/local/apache/check_cpu_load.log 脚本存放目录：/home/crontab cd /home/crontab vi check_cpu_load.sh #编辑，添加以下代码 #!/bin/sh #crontab: */5 * * * * /home/crontab/check_cpu_load.sh &#62;&#62; /usr/local/apache/check_cpu_load.log TOP_SYS_LOAD_NUM=3 SYS_LOAD_NUM=`uptime &#124; awk '{print $(NF-2)}' &#124; sed 's/,//'` echo $(date +"%y-%m-%d") `uptime` if [ `echo "$TOP_SYS_LOAD_NUM &#60; $SYS_LOAD_NUM"&#124;bc` -eq 1 ] then echo "#0#" $(date +"%y-%m-%d %H:%M:%S") "pkill httpd" [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/9381.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/9381.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
