<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "閏秒導致CPU使用率飆高"]]></title>
		<link>https://forum.andowson.com/posts/list/9.page</link>
		<description><![CDATA[Latest messages posted in the topic "閏秒導致CPU使用率飆高"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>閏秒導致CPU使用率飆高</title>
				<description><![CDATA[ 最近收到Linode VPS主機CPU使用率達272.5%的告警通知信: 
<br>
[quote]Your Linode has exceeded the notification threshold (90) for CPU Usage by averaging 272.5% for the last 2 hours. [/quote] 
<br>
<br>
檢查/var/log/messages可以發現這一行: 
<br>
[quote]Jul 1 07:59:59 www kernel: Clock: inserting leap second 23:59:60 UTC[/quote] 
<br>
<br>
我先將所有的服務停止(httpd, tomcat, postgresql), 然後依序重啟服務: postgresql-&gt;tomcat-&gt;httpd 
<br>
經過不斷的重啟服務，發現只要一啟動Tomcat，CPU使用率就開始飆高 
<br>
<br>
起先以為是記憶體不足所以需要作swap，後來感覺不太像，火大了，乾脆給它 reboot，一次痛快。 
<br>
<br>
沒想到，重開後就好了。 
<br>
<br>
想到一個多喝水的廣告: 
<br>
多喝水沒事，沒事多喝水...(repeat) 
<br>
<br>
心中OS: 
<br>
重開機搞定，搞定重開機...(repeat) 
<br>
<br>
不想/能重開機的話，網路建議的解法，可以參考下列這篇: 
<br>
http://blog.wpkg.org/2012/07/01/java-leap-second-bug-30-june-1-july-2012-fix/ 
<br>
先將ntp停止，然後重新設定系統日期給Linux, 等過了一天之後再重新啟動ntp: 
<br>
[code]/etc/init.d/ntpd stop 
<br>
date -s "$(date)"[/code] 
<br>
<br>
參考資料: 
<br>
http://iphone4.tw/forums/showthread.php?t=185855]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/585/1233.page</guid>
				<link>https://forum.andowson.com/posts/preList/585/1233.page</link>
				<pubDate><![CDATA[Tue, 10 Jul 2012 01:18:21]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
	</channel>
</rss>