TW201209422A - Power failure detection system and method of a server - Google Patents

Power failure detection system and method of a server Download PDF

Info

Publication number
TW201209422A
TW201209422A TW99128172A TW99128172A TW201209422A TW 201209422 A TW201209422 A TW 201209422A TW 99128172 A TW99128172 A TW 99128172A TW 99128172 A TW99128172 A TW 99128172A TW 201209422 A TW201209422 A TW 201209422A
Authority
TW
Taiwan
Prior art keywords
server
shutdown
value
power failure
flag
Prior art date
Application number
TW99128172A
Other languages
Chinese (zh)
Other versions
TWI458995B (en
Inventor
Jian Peng
Original Assignee
Hon Hai Prec Ind Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Priority to TW099128172A priority Critical patent/TWI458995B/en
Publication of TW201209422A publication Critical patent/TW201209422A/en
Application granted granted Critical
Publication of TWI458995B publication Critical patent/TWI458995B/en

Links

Landscapes

  • Power Sources (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a power failure detection system of a server. The system is run in a baseboard management controller (BMC) of the server. The system includes a setup module, a first modification module, a second modification module, a read module, and a determination module. The setup module sets a shutdown flag stored in a non-volatile storage of the BMC as a first value when the server is turned on for the first time. The first modification module modifies the shutdown flag into a second value when the server is turned off. The second modification module modifies the shutdown flag into a third value when the server is turned on for the second time. The read module reads the shutdown flag from the non-volatile storage. The determination module determines if an AC power failure or a DC power failure of the server has occurred according to the shutdown flag. A related method is also disclosed.

Description

201209422 六、發明說明: 【發明所屬之技術領城】 _]本發明涉及〆種故_測系統及方法,尤其關於一種伺 服器掉電偵測系統及方法。 【先前技術】 [0002]伺服器有時候會由於交流電掉電或直流電掉電的原因造 成關機。交流電掉電是指外部提供給伺服器的交流電中 斷,例如伺服器的電源插頭被意外拔下而發生交流電掉 電。直流電掉電是指伺服器的電源設備提供給伺服器主 機板的直流電中斷,例如何服器的電源設備出現故障而 無法將外部提供的交流電轉換為伺服器所需的直流電。 目前,伺服器利用BIOS可以偵測由於交流電掉電而導致 的關機。B10S透過南橋偵測交流電掉電,將交流電掉電 資訊記錄到CMOS ’當系統再次開機時,BI〇s&CM〇s讀取 乂流電掉電資訊,並控制伺服器的基板管理控制器記錄 掉電日誌。然而’上述利用“热儀測交流電掉電的方法 需要依賴南橋、CMOS、BMC等多種設備,實現起來較為複 雜。並且’利用BIOS無法對直紐電掉電造成的關機進行 谓測。 【發明内容】 []鑒於以上内谷,有必要提供一種伺服器掉電偵測系統及 方去’能夠方便有效地偵測伺服器的交流電掉電與直流 電掉電。 闺—種舰n掉電仙H運行於舰器的基板管理控 制器中,該基板管理控制器包括非易失性儲存器,該系 099128172 表單鵠號A0101 第4頁/共】7頁 0992049532-0 201209422 Ο 統包括:設置模組,用於當檢測到伺服器首次開機時, 在非易失性儲存器上儲存關機標誌,並將該關機標誌設 置為第一關機值;第一修改模組,用於當檢測到伺服器 關機時,將儲存於非易失性儲存器的關機標誌修改為第 二關機值;第二修改模組,用於在伺服器關機且經過指 定時間後,將儲存於非易失性儲存器的關機標誌修改為 第三關機值;讀取模組,用於當檢測到伺服器再次開機 時,從非易失性儲存器讀取關機標誌的數值;及判斷模 組,用於在讀取的關機標誌的數值為第一關機值時判斷 伺服器是由於直流電掉電而關機並記錄直流電掉電日誌 至非易失性儲存器,在讀取的關機標誌的數值為第二關 機值時判斷伺服器是由於交流電掉電而關機並記錄交流 電掉電日誌至非易失性儲存器。 [0005] Ο 一種伺服器掉電偵測方法,執行於伺服器的基板管理控 制器中,該基板管理控制器包括非易失性儲存器,該方 法包括步驟:當檢測到伺服器首次開機時,在非易失性 儲存器上儲存關機標誌,並將該關機標誌設置為第一關 機值;當檢測到伺服器關機時,將儲存於非易失性儲存 器的關機標誌修改為第二關機值;在伺服器關機且經過 指定時間後,蔣儲存於非易失性儲存器的關機標誌修改 為第三關機值;當檢測到伺服器再次開機時,從非易失 性儲存器讀取關機標誌的數值;若讀取的關機標誌的數 值為第一關機值,則判斷伺服器是由於直流電掉電而關 機並記錄直流電掉電日誌至非易失性儲存器;及若讀取 的關機標誌的數值為第二關機值時,則判斷伺服器是由 099128172 表單編號A0101 第5頁/共17頁 0992049532-0 201209422 [0006] [0007] [0008] [0009] [0010] 於交流電掉電而關機並記錄交流電掉電日誌至非易失性 儲存器。 本發明根據伺服器正常關機、交流電掉電而關機、直流 電掉電而關機三種情況下電源設備提供給基板管理控制 器的直流電的持續時間的不同,在基板管理控制器的非 易失性儲存器中寫入不同數值的關機標誌,根據該關機 標誌的數值有效地偵測伺服器的交流電掉電與直流電掉 電。 【實施方式】 參閲圖1所示,係本發明伺服器掉電偵測系統較佳實施例 的應用環境示意圖。所述伺服器掉電偵測系統10運行於 伺服器11的基板管理控制器F2中,用於偵測伺服器"的 交流電掉電與直流電掉電。伺服器]^還包括主機板13與 電源設備14。電源設備14將外部提供的交流電轉換為主 機板13與基板管理控制器12所需的直流電。基板管理控 制器12還包括非易失性儲存器15 (例如快閃記憶體)。 參閱圖2所示,係圖1中伺服器掉電偵測系統的功能模組 圖。所述伺服器掉電偵測系統10包括設置模組2〇〇、第一 修改模組210、第二修改模組220、讀取模組230及判斷 模組240。 所述设置模組2〇〇用於當首次檢測到伺服器u開機時,在 非易失性儲存器15上儲存關機標誌,並將該關機標誌設 置為第-關機值。在本實施例中,所述第—關機值為丄。 所述第一修改模組210用於當檢測到伺服器11關機時將 099128172 表單編號A0101 第6頁/共17頁 0992049532-0 201209422 Ο 關機標誌、修改為第二關機值。在本實施例中,所述第一 關機值為2。需要說明的是,若伺服器η由於直流電掉電 而關機,則電源設備14在直流電掉電時立即中斷提供外 基板管理控制器12的直流電,基板管理控制器12立即關 機,此時第一修改模組210不能檢測到伺服器u關機,不 會將關機標誌修改為第二關機值。若伺服器丨丨由於交流 電掉電而關機,則電源設備14提供給基板管理控制器12 的直流電會持續一段時間(通常為2-4秒)才中斷,基板 管理控制器12在交流電掉電後綠過該段時間才關機,第 一修改模組21 0在該段時間内檢測到飼服辱11關機,將關 機標誌修改為第二關機值。若伺服器正常關機,則電 源設備1 4在伺服器11正常赇機後不㈣知地為基板管理控 制器12提供直流電’第一修改模組210檢測到伺服器11關 機後,將關機標誌修改為第二關機值。 [0011] ❹ 所述第二修改模組220用於在伺服器11關機且經過指定時 間後’將關機標誌修改為第三關機值。在未實施例中, 所述第三關機值為〇 »如前所述,若伺服器11由於交流電 掉電而關機,則電源設備14提供給基板管理控制器12的 直流電會持續一段時間才中斷,基板管理控制器12會在 交流電掉電後經過該段時間才關機;若伺服器11是正常 關機,則電源設備14在伺服器11正常關機後不間斷地為 基板管理控制器12提供直流電。所述指定時間大於該段 時間,例如為5秒,用來區分伺服器11是正常關機還是由 於交流電掉電而關機。因此,若伺服器11由於交流電掉 電而關機,則基板管理控制器12在伺服器11關機後的指 099128172 表單編號A0101 第7頁/共17頁 0992049532-0 201209422 定時間内已經關機,第二修改模組22〇不會將關機標誌修 改為第三關機值。若伺服器11正常關機,第二修改模組 2 2 0在伺服器11關機且經過指定時間後將關機標諸修改為 第三關機值。 [0012] [0013] [0014] [0015] 所述讀取模組230用於當檢測到伺服器u再次開機時,從 非易失性儲存器1 5讀取關機標諸的數值。例如,讀取的 關機標諸的數值為1 ’即第一關機值。又如,讀取的關機 標誌的數值為2,即第二關機值。再如,讀取的關機標誌 的數值為0,即第三關機值。 所述判斷模組240用於根據讀取的關機標誌的數值,判斷 伺服器11是由於直流電掉電而關機、由於交流電掉電而 關機還是正常關機’並相對應地記錄直流電掉電日該或 交流電掉電日誌至非易失性儲存器15。具體地,若關機 標誌的數值為第一關機值,則判斷模組24〇判斷伺服器11 由於直流電掉電而關機(即飼服器'1.1出現.了直流電掉電 ),並記錄直流流電掉電曰誌至非易失性儲存器15 ;若 關機標誌的數值為第二關機值,則;判斷模組24〇判斷伺服 器11由於交流電掉電而關機(即伺服器U出現了交流電 掉電),並記錄交流電掉電日誌至非易失性儲存器15 ; 若關機標誌的數值為第三關機值,則判斷模組24〇判斷伺 服器11正常關機。 參閲圖3所示,係本發明伺服器掉電偵測方法較佳實施例 的流程圖。 步驟S301,將伺服器11接上外部提供的交流電。 099128172 表單煸號A0101 第8頁/共17頁 0992049532-0 201209422 [0016] 當檢測到伺服器11首次開機時,步驟S302,設置模組 200在非易失性儲存器15上儲存關機標誌,並將該關機標 誌設置為第一關機值。在本實施例中,所述第一關機值 為1。 [0017] Ο ο [0018] 當檢測到伺服器11關機時,步驟S303,第一修改模組 210將關機標誌修改為第二關機值。在本實施例中,所述 第二關機值為2。需要說明的是,若伺服器11由於直流電 掉電而關機,則電源設備14在直流電掉電時立即中斷提 供給基板管理控制器12的直流電,基板管理控制器12立 即關機,此時第一修改模組210不能檢測到伺服器11關機 ,不會將關機標誌修改為第二關機值。若伺服器11由於 交流電掉電而關機,則電源設備14提供給基板管理控制 器12的直流電會持續一段時間(通常為2-4秒)才中斷, 基板管理控制器12在交流電掉電後經過該段時間才關機 ,第一修改模組210在該段時間内檢測到伺服器11關機, 將關機標誌修改為第二關機值。若伺服器11正常關機, 則電源設備14在伺服器11正常關機後不間斷地為基板管 理控制器12提供直流電,第一修改模組210檢測到伺服器 11關機後,將關機標誌修改為第二關機值。 在伺服器11關機且經過指定時間後,步驟S304,第二修 改模組220將關機標誌修改為第三關機值。在本實施例中 ,所述第三關機值為0。如前所述,若伺服器11由於交流 電掉電而關機,則電源設備14提供給基板管理控制器12 的直流電會持續一段時間才中斷,基板管理控制器12會 在交流電掉電後經過該段時間才關機;若伺服器11是正 099128172 表單編號Α0101 第9頁/共17頁 0992049532-0 201209422 常關機,則電源設備14在伺服器11正常關機後不間斷地 為基板管理控制器12提供直流電。所述指定時間大於該 段時間,例如為5秒,用來區分伺服器11是正常關機還是 由於交流電掉電而關機。因此,若伺服器11由於交流電 掉電而關機,則基板管理控制器12在伺服器11關機後的 指定時間内已經關機,第二修改模組220不會將關機標誌 修改為第三關機值。若伺服器11正常關機,第二修改模 組220在伺服器11關機且經過指定時間後將關機標誌修改 為第三關機值。 [0019] 當檢測到伺服器11再次開機時,步驟S305,讀取模組 230從非易失性儲存器15讀取關機標誌的數值,判斷該關 機標誌的數值是第一關機值、第二關機值還是第三關機 值。例如,若讀取的關機標誌的數值為1,則是第一關機 值;若讀取的關機標誌的數值為2,則是第二關機值;若 讀取的關機標誌的數值為0,則是第三關機值。 [0020] 若關機標誌的數值為第一關機值,步驟S306,判斷模組 2 4 0判斷伺服器11由於直流電掉電而關機並將直流電掉電 日誌記錄到非易失性儲存器1 5,流程結束。 [0021] 若關機標誌的數值為第二關機值,步驟S307,判斷模組 240判斷伺服器11由於交流電掉電而關機並將交流電掉電 日誌記錄到非易失性儲存器1 5,流程結束。 [0022] 若關機標誌的數值為第三關機值,步驟S308,判斷模組 240判斷伺服器11正常關機,流程結束。 [0023] 上述流程是針對伺服器11的一次關機偵測該次關機是否 099128172 表單編號A0101 第10頁/共17頁 0992049532-0 201209422 由於交流電掉電或直流電掉電而發生,如果需要繼續偵 測,則返回步驟S302,重新將關機標誌設置為第一關機 值。 [0024] 應當能夠理解,所述第一關機值(例如1 )、第二關機值 (例如2)與第三關機值(例如0)分別對應於交流電掉 電而造成的關機、直流電掉電而造成的關機與正常關機 ,該第一關機值、第二關機值與第三關機值可以取任意 三個能夠相互區分的數值,例如分別取7、8、9。 Q [0025] 綜上所述,本發明符合發明專利要件,爰依法提出專利 申請。惟,以上所述者僅為本發明之較佳實施例,本發 明之範圍並不以上述實施例為限,舉凡熟悉本案技藝之 人士援依本發明之精神所作之等效修飾或變化,皆應涵 蓋於以下申請專利範圍内。 【圖式簡單說明】 [0026] 圖1係本發明伺服器掉電偵測系統較佳實施例的應用環境 示意圖。 〇 [0027] 圖2係圖1中伺服器掉電偵測系統的功能模組圖。 [0028] 圖3係本發明伺服器掉電偵測方法較佳實施例的流程圖。 【主要元件符號說明】 [0029] 伺服器掉電偵測系統:1 0 [0030] 伺服器:11 [0031] 基板管理控制器:12 [0032] 主機板:13 099128172 表單編號A0101 第11頁/共17頁 0992049532-0 201209422 [0033] 電源設備:14 [0034] 非易失性儲存器:15 [0035] 設置模組:20 0 [0036] 第一修改模組:210 [0037] 第二修改模組:220 [0038] 讀取模組:230 [0039] 判斷模組:240 0992049532-0 099128172 表單編號A0101 第12頁/共17頁201209422 VI. Description of the Invention: [Technology Leading City of the Invention] _] The present invention relates to a system and method for detecting a seed, and more particularly to a system and method for detecting a power failure of a servo. [Prior Art] [0002] The server sometimes shuts down due to AC power loss or DC power failure. AC power loss refers to an external AC interrupt that is supplied to the server. For example, the power plug of the server is accidentally unplugged and AC power is lost. DC power failure refers to the DC power interruption provided by the power supply device of the server to the servo host board. For example, if the power supply device of the server fails, the externally supplied AC power cannot be converted into the DC power required by the server. Currently, the server uses the BIOS to detect shutdowns caused by AC power loss. B10S detects AC power loss through the South Bridge, and records AC power loss information to CMOS. 'When the system is turned on again, BI〇s&CM〇s reads the 掉current power loss information and controls the server's baseboard management controller record. Power down log. However, the above method of using the "thermal meter to measure AC power loss" relies on a variety of devices such as South Bridge, CMOS, BMC, etc., and is complicated to implement. And 'the BIOS cannot be used to test the shutdown caused by the DC power failure. 】 [] In view of the above, there is a need to provide a server power failure detection system and to 'can easily and effectively detect the AC power failure and DC power failure of the server. 闺 种 种 种 种 种 种 种 种In the baseboard management controller of the shipboard, the baseboard management controller includes a non-volatile storage, the system 099128172 form nickname A0101 page 4/total] 7 pages 0992049532-0 201209422 包括 system includes: setting module, When the server is detected to be powered on for the first time, the shutdown flag is stored in the non-volatile storage, and the shutdown flag is set to the first shutdown value; the first modification module is configured to detect when the server is powered off , the shutdown flag stored in the non-volatile storage is modified to a second shutdown value; and the second modification module is configured to store the non-volatile storage after the server is shut down and after a specified time The shutdown flag of the memory is modified to a third shutdown value; the reading module is configured to read the value of the shutdown flag from the non-volatile storage when detecting that the server is powered on again; and the determining module is configured to When the value of the read shutdown flag is the first shutdown value, it is determined that the server is shut down due to the DC power failure and the DC power failure log is recorded to the non-volatile storage, and the value of the shutdown flag read is the second shutdown value. The server is determined to be powered off due to the AC power failure and the AC power down log is recorded to the non-volatile memory. [0005] Ο A server power failure detection method is implemented in the server management controller of the server, The baseboard management controller includes a non-volatile storage, the method includes the steps of: when detecting that the server is powered on for the first time, storing the shutdown flag on the non-volatile storage, and setting the shutdown flag to the first shutdown value; When it is detected that the server is powered off, the shutdown flag stored in the non-volatile storage is changed to the second shutdown value; after the server is shut down and the specified time has elapsed, Chiang stores it in a non-volatile state. The shutdown flag of the storage is modified to a third shutdown value; when it is detected that the server is powered on again, the value of the shutdown flag is read from the non-volatile storage; if the value of the read shutdown flag is the first shutdown value, then Determining that the server is shut down due to DC power failure and recording the DC power down log to the non-volatile memory; and if the value of the read shutdown flag is the second shutdown value, the server is judged to be 099128172 Form No. A0101 Page 5 of 17 0992049532-0 201209422 [0006] [0009] [0009] [0010] Shut down and record the AC power down log to the non-volatile memory when the AC power is lost. The present invention is based on the servo Different durations of DC power supplied to the baseboard management controller by the power supply device during normal shutdown, AC power failure, shutdown, DC power failure, and shutdown. Write different in the non-volatile memory of the baseboard management controller. The value of the shutdown flag effectively detects the AC power loss and DC power loss of the server according to the value of the shutdown flag. [Embodiment] Referring to Figure 1, there is shown a schematic diagram of an application environment of a preferred embodiment of the server power failure detection system of the present invention. The server power failure detection system 10 operates in the baseboard management controller F2 of the server 11 for detecting the AC power down and DC power down of the server. The server also includes a motherboard 13 and a power supply unit 14. The power supply device 14 converts the externally supplied alternating current into the direct current power required by the main board 13 and the base management controller 12. The substrate management controller 12 also includes a non-volatile storage 15 (e.g., a flash memory). Referring to Figure 2, it is a functional block diagram of the server power failure detection system in Figure 1. The server power failure detection system 10 includes a setting module 2, a first modification module 210, a second modification module 220, a reading module 230, and a determination module 240. The setting module 2 is configured to store the shutdown flag on the non-volatile storage 15 when the server u is detected to be powered on for the first time, and set the shutdown flag to the first-off value. In this embodiment, the first-down value is 丄. The first modification module 210 is configured to modify the shutdown flag of the 099128172 form number A0101 page 6/17 page 0992049532-0 201209422 修改 to the second shutdown value when the server 11 is detected to be powered off. In this embodiment, the first shutdown value is 2. It should be noted that if the server η is powered off due to DC power failure, the power supply device 14 immediately interrupts the supply of the DC power of the external substrate management controller 12 when the DC power is lost, and the substrate management controller 12 immediately shuts down. The module 210 cannot detect that the server u is powered off, and does not modify the shutdown flag to the second shutdown value. If the server 关机 is powered off due to the AC power failure, the DC power supplied from the power supply device 14 to the baseboard management controller 12 will be interrupted for a period of time (usually 2-4 seconds), and the baseboard management controller 12 is powered off after the AC power is turned off. After the green time is turned off, the first modification module 21 0 detects the feeding service 11 shutdown during the period, and changes the shutdown flag to the second shutdown value. If the server is normally shut down, the power supply device 14 does not (four) knowably provide DC power to the baseboard management controller 12 after the server 11 is normally down. The first modification module 210 detects that the server 11 is turned off, and then changes the shutdown flag. Is the second shutdown value. [0011] The second modification module 220 is configured to modify the shutdown flag to the third shutdown value after the server 11 is powered off and after a specified time has elapsed. In the non-embodiment, the third shutdown value is 〇» as described above. If the server 11 is powered off due to the AC power failure, the DC power supplied by the power supply device 14 to the baseboard management controller 12 will be interrupted for a period of time. The baseboard management controller 12 will shut down after a period of time after the AC power is turned off; if the server 11 is normally shut down, the power supply device 14 continuously supplies DC power to the baseboard management controller 12 after the servo 11 is normally turned off. The specified time is greater than the period of time, for example, 5 seconds, to distinguish whether the server 11 is normally shut down or powered off due to AC power loss. Therefore, if the server 11 is powered off due to the AC power failure, the baseboard management controller 12 is turned off after the server 11 is turned off. 099128172 Form No. A0101 Page 7 / 17 page 0992049532-0 201209422 has been shut down for a certain period of time, second The modification module 22 does not modify the shutdown flag to the third shutdown value. If the server 11 is normally shut down, the second modification module 220 changes the shutdown flag to the third shutdown value after the server 11 is powered off and the specified time has elapsed. [0012] [0015] The reading module 230 is configured to read the value of the shutdown target from the non-volatile storage 15 when it is detected that the server u is powered on again. For example, the value of the shutdown indicator read is 1 ’, the first shutdown value. For another example, the value of the read shutdown flag is 2, which is the second shutdown value. For another example, the value of the read shutdown flag is 0, which is the third shutdown value. The determining module 240 is configured to determine, according to the value of the read shutdown flag, that the server 11 is powered off due to DC power failure, shut down due to AC power failure, or shut down normally and correspondingly record the DC power failure date or The AC power down log is sent to the non-volatile storage 15. Specifically, if the value of the shutdown flag is the first shutdown value, the determination module 24 determines that the server 11 is powered off due to the DC power failure (ie, the feeder '1.1 appears. The DC power is lost), and the DC current is recorded. If the value of the shutdown flag is the second shutdown value, the determination module 24 determines that the server 11 is powered off due to the AC power failure (ie, the server U has an AC power drop). And the AC power down log is recorded to the non-volatile memory 15; if the value of the shutdown flag is the third shutdown value, the determining module 24 determines that the server 11 is normally shut down. Referring to Figure 3, there is shown a flow chart of a preferred embodiment of the server power failure detection method of the present invention. In step S301, the server 11 is connected to an externally supplied alternating current. 099128172 Form nickname A0101 Page 8 of 17 0992049532-0 201209422 [0016] When it is detected that the server 11 is turned on for the first time, in step S302, the setting module 200 stores the shutdown flag on the non-volatile storage 15, and Set the shutdown flag to the first shutdown value. In this embodiment, the first shutdown value is 1. [0017] When it is detected that the server 11 is powered off, in step S303, the first modification module 210 modifies the shutdown flag to the second shutdown value. In this embodiment, the second shutdown value is 2. It should be noted that if the server 11 is powered off due to DC power failure, the power supply device 14 immediately interrupts the DC power supplied to the substrate management controller 12 when the DC power is lost, and the substrate management controller 12 immediately shuts down. The module 210 cannot detect that the server 11 is powered off and does not modify the shutdown flag to the second shutdown value. If the server 11 is powered off due to the AC power failure, the DC power supplied from the power supply device 14 to the substrate management controller 12 will be interrupted for a period of time (usually 2-4 seconds), and the substrate management controller 12 passes after the AC power is lost. During this period of time, the first modification module 210 detects that the server 11 is turned off during the period of time, and changes the shutdown flag to the second shutdown value. If the server 11 is normally shut down, the power supply device 14 continuously supplies DC power to the baseboard management controller 12 after the server 11 is normally shut down. The first modification module 210 detects that the server 11 is turned off, and then changes the shutdown flag to the first Two shutdown values. After the server 11 is turned off and the specified time has elapsed, the second modification module 220 modifies the shutdown flag to the third shutdown value in step S304. In this embodiment, the third shutdown value is zero. As described above, if the server 11 is powered off due to the AC power failure, the DC power supplied from the power supply device 14 to the baseboard management controller 12 will be interrupted for a period of time, and the baseboard management controller 12 will pass the segment after the AC power is lost. The time is turned off; if the server 11 is positive 099128172 Form No. 101 0101 Page 9 / Total 17 Page 0992049532-0 201209422 Normally shut down, the power supply device 14 continuously supplies DC power to the substrate management controller 12 after the server 11 is normally turned off. The specified time is greater than the period of time, for example, 5 seconds, to distinguish whether the server 11 is normally shut down or shut down due to AC power loss. Therefore, if the server 11 is turned off due to the AC power failure, the baseboard management controller 12 is turned off within a specified time after the server 11 is turned off, and the second modification module 220 does not change the shutdown flag to the third shutdown value. If the server 11 is normally shut down, the second modified module 220 modifies the shutdown flag to the third shutdown value after the server 11 is turned off and the specified time has elapsed. [0019] When it is detected that the server 11 is powered on again, in step S305, the reading module 230 reads the value of the shutdown flag from the non-volatile storage 15, and determines that the value of the shutdown flag is the first shutdown value, and the second The shutdown value is also the third shutdown value. For example, if the value of the read shutdown flag is 1, it is the first shutdown value; if the value of the read shutdown flag is 2, it is the second shutdown value; if the value of the read shutdown flag is 0, then Is the third shutdown value. [0020] If the value of the shutdown flag is the first shutdown value, in step S306, the determination module 240 determines that the server 11 is powered off due to the DC power failure and records the DC power down log to the non-volatile storage 15 . The process ends. [0021] If the value of the shutdown flag is the second shutdown value, in step S307, the determination module 240 determines that the server 11 is shut down due to the AC power failure and records the AC power failure log to the non-volatile memory 15. The process ends. . [0022] If the value of the shutdown flag is the third shutdown value, in step S308, the determination module 240 determines that the server 11 is normally shut down, and the process ends. [0023] The above process is for a shutdown of the server 11 to detect whether the shutdown is 099128172 Form No. A0101 Page 10 / Total 17 Page 0992049532-0 201209422 Occurs due to AC power failure or DC power failure, if it needs to continue detection Then, returning to step S302, the shutdown flag is set to the first shutdown value again. [0024] It should be understood that the first shutdown value (eg, 1), the second shutdown value (eg, 2), and the third shutdown value (eg, 0) respectively correspond to a shutdown caused by an AC power failure, and a DC power failure. The caused shutdown and normal shutdown, the first shutdown value, the second shutdown value and the third shutdown value may take any three values that can be distinguished from each other, for example, 7, 8, and 9, respectively. Q [0025] In summary, the present invention complies with the requirements of the invention patent and submits a patent application according to law. The above is only the preferred embodiment of the present invention, and the scope of the present invention is not limited to the above-described embodiments, and equivalent modifications or variations made by those skilled in the art in light of the spirit of the present invention are It should be covered by the following patent application. BRIEF DESCRIPTION OF THE DRAWINGS [0026] FIG. 1 is a schematic diagram of an application environment of a preferred embodiment of the server power failure detection system of the present invention. [0027] FIG. 2 is a functional block diagram of the server power failure detection system of FIG. 1. 3 is a flow chart of a preferred embodiment of the server power failure detection method of the present invention. [Main component symbol description] [0029] Server power failure detection system: 1 0 [0030] Server: 11 [0031] Baseboard management controller: 12 [0032] Motherboard: 13 099128172 Form No. A0101 Page 11 / Total 17 pages 0992049532-0 201209422 [0033] Power supply equipment: 14 [0034] Non-volatile storage: 15 [0035] Setting module: 20 0 [0036] First modification module: 210 [0037] Second modification Module: 220 [0038] Reading module: 230 [0039] Judging module: 240 0992049532-0 099128172 Form number A0101 Page 12 of 17

Claims (1)

201209422 七、申請專利範圍: 1 . 一種伺服器掉電偵測系統,運行於伺服器的基板管理控制 器中’該基板管理控制器包括非易失性儲存器,該系統包 括: 設置模組,用於當檢測刻伺服器首次開機時,在非易失性 儲存器上儲存關機標兮,炎將該關機標該設置為第一關機 值; 第一修改模組,用於當檢測到词服器關機時,將儲存於非 ^ 易失性儲存器的關機標諸修改為第二關機值, 第二修改模組,用於在伺服器關機且經過指定時間後,將 儲存於非易失性儲存器的關機標諸修改為第二關機值; 讀取模組,用於當再次檢測到伺服器開機時,從非易失性 儲存器讀取關機標諸的數值;及 判斷模組,用於在讀取的關機標誌的數值為第一關機值時 判斷伺服器是由於直流電掉電而關機旅記錄直流電掉電曰 誌至非易失性儲存器,在讀取的關機標誌的數值為第二關 機值時判斷伺服器是由於交流電掉電而關機並記錄交流電 〇 掉電曰遠至非易失性儲存器。 2 .如申請專利範圍第1項所述之伺服器掉電偵測系統’其中 所述判斷模組還用於在讀取的關機標誌的數值為第三關機 值時判斷伺服器是正常關機β 3 ·如申請專利範圍第1項所述之伺服器掉電偵測系統’其中 所述指定時間大於4秒。 4 . 一種伺服器掉電偵測方法,執行於伺服器的基板管理控制 器中,該基板管理控制器包括非易失性儲存器,該方法包 099128172 表單编號Α0101 第13頁/共17頁 0992049532-0 201209422 括步驟: 當檢測到伺服器首次開機時,在非易失性儲存器上儲存關 機標誌,並將該關機標誌設置為第一關機值; 當檢測到伺服器關機時,將儲存於非易失性儲存器的關機 標誌修改為第二關機值; 在伺服器關機且經過指定時間後,將儲存於非易失性儲存 器的關機標誌修改為第三關機值; 當檢測到伺服器再次開機時,從非易失性儲存器讀取關機 標諸的數值; 若讀取的關機標誌的數值為第一關機值,則判斷伺服器是 由於直流電掉電而關機並記錄直流電掉電日誌至非易失性 儲存器;及 若讀取的關機標誌的數值為第二關機值時,則判斷伺服器 是由於交流電掉電而關機並記錄交流電掉電日誌至非易失 性儲存器。 5 .如申請專利範圍第4項所述之伺服器掉電偵測方法,該方 法還包括: 若讀取的關機標誌的數值為第三關機值,則判斷伺服器是 正常關機。 6 .如申請專利範圍第4項所述之伺服器掉電偵測方法,其中 所述指定時間大於4秒。 099128172 表單編號A0101 第14頁/共17頁 0992049532-0201209422 VII. Patent application scope: 1. A server power failure detection system running in a baseboard management controller of a server. The base management controller includes a non-volatile storage, and the system includes: a setting module. When the detection server is turned on for the first time, the shutdown indicator is stored in the non-volatile storage, and the shutdown flag is set to the first shutdown value; the first modification module is configured to detect the word service When the device is powered off, the shutdown flag stored in the non-volatile memory is modified to the second shutdown value, and the second modification module is used to store the non-volatile after the server is shut down and after a specified time. The shutdown indicator of the storage is modified to a second shutdown value; the reading module is configured to read the shutdown target value from the non-volatile storage when the server is detected to be powered on again; and determine the module, When the value of the read shutdown flag is the first shutdown value, it is determined that the server is powered off due to the DC power failure, and the DC signal is lost to the non-volatile memory. The value of the shutdown flag read is two The server determines when the machine is due to the value of the AC power-down and shutdown record AC square as far down said non-volatile storage. 2. The server power failure detecting system according to claim 1, wherein the determining module is further configured to determine that the server is normally shut down when the value of the read shutdown flag is the third shutdown value. 3. The server power failure detection system described in claim 1 is wherein the specified time is greater than 4 seconds. 4. A server power failure detection method, implemented in a server management controller of a server, the substrate management controller comprising a non-volatile memory, the method package 099128172 Form number Α0101, page 13 of 17 0992049532-0 201209422 Steps: When detecting that the server is turned on for the first time, store the shutdown flag on the non-volatile memory and set the shutdown flag to the first shutdown value; when the server is detected to be powered off, it will be stored. The shutdown flag of the non-volatile memory is modified to the second shutdown value; after the server is shut down and the specified time has elapsed, the shutdown flag stored in the non-volatile storage is modified to the third shutdown value; when the servo is detected When the device is turned on again, the value of the shutdown flag is read from the non-volatile memory; if the value of the read shutdown flag is the first shutdown value, it is judged that the server is shut down due to the DC power failure and the DC power is lost. Log to the non-volatile storage; and if the value of the read shutdown flag is the second shutdown value, it is determined that the server is shut down due to the AC power failure AC power failure log to the nonvolatile storage. 5. The server power failure detection method according to claim 4, wherein the method further comprises: if the value of the read shutdown flag is the third shutdown value, determining that the server is normally shut down. 6. The server power failure detecting method of claim 4, wherein the specified time is greater than 4 seconds. 099128172 Form No. A0101 Page 14 of 17 0992049532-0
TW099128172A 2010-08-24 2010-08-24 Power failure detection system and method of a server TWI458995B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW099128172A TWI458995B (en) 2010-08-24 2010-08-24 Power failure detection system and method of a server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW099128172A TWI458995B (en) 2010-08-24 2010-08-24 Power failure detection system and method of a server

Publications (2)

Publication Number Publication Date
TW201209422A true TW201209422A (en) 2012-03-01
TWI458995B TWI458995B (en) 2014-11-01

Family

ID=46763595

Family Applications (1)

Application Number Title Priority Date Filing Date
TW099128172A TWI458995B (en) 2010-08-24 2010-08-24 Power failure detection system and method of a server

Country Status (1)

Country Link
TW (1) TWI458995B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104991629B (en) 2015-07-10 2017-11-24 英业达科技有限公司 Power-fail detecting system and its method
TWI584114B (en) * 2015-08-04 2017-05-21 英業達股份有限公司 Power failure detection system and method thereof
CN107664711B (en) 2017-09-01 2019-12-13 新茂国际科技股份有限公司 Power failure detector

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI309816B (en) * 2003-04-26 2009-05-11 Samsung Electronics Co Ltd Method of and drive for recording medium defect management, and defect managed recording medium
CN100562835C (en) * 2006-01-05 2009-11-25 英业达股份有限公司 Guard method of condition of instant error power-off of computer platform internal circuit and system
TW200923633A (en) * 2007-11-22 2009-06-01 Inventec Corp Method and computer device capable of dealing with power fail
TW201001161A (en) * 2008-06-26 2010-01-01 Fdia Technology Company Ltd System for recording apparatus gear operation status
CN201430453Y (en) * 2009-06-19 2010-03-24 雷诺士(常州)电子有限公司 Uninterruptible power source with malfunction remote diagnosis

Also Published As

Publication number Publication date
TWI458995B (en) 2014-11-01

Similar Documents

Publication Publication Date Title
US8479049B2 (en) Electronic device and method for detecting power failure type
KR101735555B1 (en) Accessing data stored in a command/address register device
TWM377621U (en) Interface card with hardware monitor and function extension, computer device and single board
CN104503875A (en) Test method and test system of Android device
CN107590040A (en) A kind of hard disk backboard and computer installation, hard disk fault detection method and memory
US20120137027A1 (en) System and method for monitoring input/output port status of peripheral devices
JP2015049907A (en) Mother board capable of hot swapping memory
TW201243613A (en) Data synchronization system and method
TW201209422A (en) Power failure detection system and method of a server
CN109408350A (en) It is a kind of to record the method for board resetting reason, controller and storage equipment
TW201307868A (en) System for detecting the burned chips
TW201214456A (en) Solid-state disk with automated testing capability and automated testing method of solid-state disk
CN101464828A (en) Evaluation method for main unit and its status
TWI245987B (en) Automatic error-detection voice device on motherboard
JP2008090626A5 (en)
TW201721431A (en) System is applied to control indicator lights for non-volatile memory express solid state disk
JP2005056411A (en) Index for visually searching memory module
Intel Intel® Desktop Board DH57DD Technical Product Specification
TW201822020A (en) Server
TW201301018A (en) System and method for recovering a master boot record of a disk
TW201640364A (en) Apparatus and method of supporting USB storage device to hot plug
TW201430559A (en) A device for testing PCI and the method thereof
TW201510714A (en) Detecting system and method of power supply
CN102280142B (en) Memory detection method
CN110096883A (en) A kind of credible measure

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees