<?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>bmc &#8211; richliu&#039;s blog</title>
	<atom:link href="https://richliu.com/tag/bmc/feed/" rel="self" type="application/rss+xml" />
	<link>https://richliu.com</link>
	<description>Linux, 工作, 生活, 家人</description>
	<lastBuildDate>Tue, 01 Nov 2022 04:06:36 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>BMC Watchdog</title>
		<link>https://richliu.com/2022/10/27/4850/bmc-watchdog/</link>
					<comments>https://richliu.com/2022/10/27/4850/bmc-watchdog/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Thu, 27 Oct 2022 04:19:57 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[bmc]]></category>
		<category><![CDATA[watchdog]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=4850</guid>

					<description><![CDATA[<p>這個時間有點久了，我也忘了很多細節，畢竟用到的次數太少，不過就將記得的寫一篇，以後可以自己回來查資料如果是有  [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2022/10/27/4850/bmc-watchdog/">BMC Watchdog</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>這個時間有點久了，我也忘了很多細節，畢竟用到的次數太少，不過就將記得的寫一篇，以後可以自己回來查資料<br />如果是有 BMC 的機器，BMC 內部有一個 watchdog 可以監視 host 系統運行的狀況，這個拿來放在遠端重啟 host 非常好用</p>



<span id="more-4850"></span>



<h3 class="wp-block-heading">使用 ipmitool 取得 watchdog information</h3>



<pre class="wp-block-preformatted"># 未啟動的機器
$ sudo ipmitool mc watchdog get
Watchdog Timer Use:     Reserved (0x00)
Watchdog Timer Is:      Stopped
Watchdog Timer Actions: Hard Reset (0x01)
Pre-timeout interval:   0 seconds
Timer Expiration Flags: 0x00
Initial Countdown:      30 sec
Present Countdown:      30 sec

# 已啟動的機器
$ sudo ipmitool mc watchdog get
Watchdog Timer Use:     SMS/OS (0x44)
Watchdog Timer Is:      Started/Running
Watchdog Timer Actions: Hard Reset (0x01)
Pre-timeout interval:   0 seconds
Timer Expiration Flags: 0x00
Initial Countdown:      900 sec
Present Countdown:      850 sec


</pre>



<h3 class="wp-block-heading">Install bmc-watchdog</h3>



<p>Debian 和 Fedora 都是叫 freeipmi-bmc-watchdog，其它 distrubtion 應該也相去不遠</p>



<pre class="wp-block-preformatted"># Debian 
$ sudo apt install freeipmi-bmc-watchdog

# Fedora 
$ sudo yum install freeipmi-bmc-watchdog
</pre>



<h3 class="wp-block-heading">bmc-watchdog 基本參數</h3>



<p>bmc-watchdog 啟動參數</p>



<pre class="wp-block-preformatted">#
$ sudo bmc-watchdog -d -u 4 -p 0 -a 1 -i 900

# Start bmc-watchdog 
$ sudo bmc-watchdog -t 
</pre>



<p>Debian 的 bmc-watchdog 設定放在 /etc/default/bmc-watchdog，不確定是不是 default configure ，但是還是放在這邊</p>



<pre class="wp-block-preformatted">OPTIONS="-d -u 4 -p 0 -a 1 -F -P -L -S -O -i 900 -e 60"</pre>



<p>設成預設啟動</p>



<pre class="wp-block-preformatted">$ sudo systemctl enable bmc-watchdog
$ sudo systemctl start bmc-watchdog
</pre>



<p>最後別忘了 enable watchdog in bmc <br />OS Watchdog Timer 那一項，如果沒事就不要開了，會一直重開</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1364" height="805" src="https://richliu.com/wp-content/uploads/2022/10/image-2.png" alt="" class="wp-image-4853" srcset="https://richliu.com/wp-content/uploads/2022/10/image-2.png 1364w, https://richliu.com/wp-content/uploads/2022/10/image-2-600x354.png 600w, https://richliu.com/wp-content/uploads/2022/10/image-2-768x453.png 768w" sizes="(max-width: 1364px) 100vw, 1364px" /></figure>
<p>The post <a rel="nofollow" href="https://richliu.com/2022/10/27/4850/bmc-watchdog/">BMC Watchdog</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2022/10/27/4850/bmc-watchdog/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
