200945030 九、發明說明: 【發明所屬之技術領域】 本發明是一種基板管理控制器(Baseboard Management Controller,BMC)之監測系統及其方法,特別是指應用於具 有一基板管理控制器的電腦系統中的一種監測系統及其方 法。 【先前技術】 基板管理控制器(Baseboard Management Controller, BMC)主要包含一微控制器及一嵌入該基板管理控制器内 的勒體(Firmware),藉以控制系統的管理軟體和平台管理硬 體之間的介面,且同時跨越不同的韌體和硬體平台工作, 可以主動提供包括電腦系統之軟/硬體的系統狀態監視、事 件曰誌記錄、重啟系統控制功能、對事件自動產生警告及 自動系統控制(如斷電)等功能,例如,利用基板管理控制器 (BMC)可即時監視電腦系統中異常的系統電壓、溫度和風 扇速度,以判斷這此監視數據是否超出預設的範圍之外。 但,昔知的基板管理控制器(BMC)沒有任何相關模組 可提供測試者查看電腦系統硬體感測器的讀數及狀態,因 此測試者必需在每次查詢時,對基板管理控制器(BMC)發 出查詢要求,並自行將讀數及狀態數據記載下來以作分 析,耗費時間人力,且無法達到即時分析的目的。同時, 測試者亦無法判斷基板管理控制器(BMC)的運作是否正 常,是否能正常讀取感測器測得的狀態數據,及當狀態數 200945030 據的改變經過上下限值時,基板管理控制器(BMC)是否能 依據狀態的改變,正常變更至相對應的應變措施,比如風 扇轉速隨著CPU溫度而自動調節,即當CPU溫度超過門檻 值時,使風扇轉速加快以降低CPU溫度,使之能達到一個 平衡點。 【發明内容】 有鑑於此,本發明遂提出一種基板管理控制器(BMC) 之監測系統及其方法,主要係應用於具有一基板管理控制 器(Baseboard Management Controller,BMC)的電腦系統 中,透過一狀態監測模組自該基板管理控制器,擷取感測 器所量測到的硬體狀態值,包含該電腦系統之CPU溫度、 電壓值、風扇轉速等,並記錄其中一個特定感測器所量測 到的狀態值,判斷該狀態值的前後改變,以及將改變之後 的該狀態值與一門植值(threshold value)進行比對。然後記 錄下感測器所量測到的硬體狀態值,以及記錄前後狀態值 改變的事件,與狀態值的改變通過該門檻值的事件,並且 當該狀態值的改變通過該門檻值時,判斷該基板管理控制 器(BMC)是否觸發一應變事件,如基板管理控制器(BMC) 發現被管理的硬體狀態發生異常時,能主動做出包含記錄 事件發生,發出事件警告訊息,自動恢復控制等相對應的 措施。如此以供測試者查詢基板管理控制器(BMC)的感測 器監測的結果,並分析基板管理控制器(BMC)是否能正常 觸發事件。 7 200945030 本發明之主要目的,在於提出一種基板管理控制器 (BMC)之監測系統,至少包含:複數個感測器,設於一電 腦系統内以供量測該電腦系統之硬體狀態的一狀態值;一 基板管理控制器(BMC),係連接該些感測器,並以輪詢 (polling)方式反覆讀取該些感測器所量測到的該狀態值;一 狀態監測模組,係自該基板管理控制器(BMC)擷取並記錄 個特疋感測器所量測到的該狀態值,並提供判斷該狀 φ 態值的前後改變,以及將改變後的該狀態值與一門檻值 (threshold Value)進行比對;以及,一事件判斷模組,係當 該狀態值的改變通過該門檻值時,判斷該基板管理控制器 (BMC)是否觸發一應變事件,包含記錄事件發生、發出事 件警告訊息及自動恢復控制等相對應的措施。其中,該狀 態監測模組若監測到狀態值有前後不同時,則記錄下該狀 態值改變的事件。且若改變後的該狀態值通過該門檻值’ 則記錄下通過該門檻值的事件。 眷 本發明之另一目的,在於提出一種基板管理控制器之 監測方法,係提供一監測機制,以狀態監測模組擷取一基 板管理控制器(BMC)之一感測器的一狀態值,並記錄該感 測器的該狀態值於一狀態記錄檔。然後,將該感測器的該 狀態值與前一次記錄之該感測器的一狀態值進行比對,若 該狀態值相異於前一次記錄之該狀態值,則記錄下該狀態 值改變的事件於一事件記錄檔。以及將改變後的該狀態值 與一門摄值(threshold value)進行比對,以判斷改變後的該 狀態值是否通過該門檻值,若改變後的該狀態值通過該門 200945030 檻值貝丨再藉由事件判斷模組去判斷該基板管理控制器 (BMC)是否觸發—應變事件,包含記錄事件發生、發出事 件警告訊息及自動恢復控制等相對應的措施。然後,本發 明更記錄下通過該門檻值的事件於該事件記職,並提供 所有狀態記錄槽與事件記錄檔的資料,以供使用者查詢。 【實施方式】 〇 本發明係為一種基板管理控制器(BMC)之感測器監測 系統及其方法,為使本發明更淺顯易懂,以下將以應用本 發明技術之較佳實施例,配合圖示範例予以詳細說明。然 此圖不及詳細說明並非用以限定本發明所揭露之技術及各 種更動與潤飾。 配合參照第1圖,係為本發明基板管理控制器(BMC) 之感測器監測系統的方塊圖。如圖所示,本發明之基板管 理控制器之監測系統1 00 ’至少包含複數個感測器1 1 1 1〜 g 11 In、一基板管理控制器112、一狀態監測模組12〇、事件 判斷模組130以及一資料庫140。感測器1111〜llln係設 於一電腦系統110内以供量測該電腦系統110之硬體狀態 的一狀態值,包含該電腦系統之CPU溫度、電壓值、風扇 轉速等,因此,感測器1111〜11 In係指任一電腦系統110 中提供量測硬體狀態的感測器。基板管理控制器(Baseboard Management Controller,BMC) 112,係包含用以控制該電腦 系統之系統管理軟體與硬體介面之間的一微控制器及一嵌 入勤體(Firmware),基板管理控制器112連接該些感測器 9 200945030 1111〜llln’並以輪詢(polling)方式反覆讀取該些感測器 11U〜llln所量測到的硬體狀態值。狀態監測模組12〇係 自該基板管理控制器112讀取該些感測器mi〜llln所量 測到的硬體狀態值,擷取並記錄一個特定感測器丨丨丨丨所量 測到的該狀態值於一狀態記錄檔中,並提供判斷該狀態值 的前後改變,以及將改變後的該狀態值與一門檻值 (threshold value)進行比對,其中該門檻值係指由該基板管 ❹ 理控制器U2設定的一上下限數值。事件判斷模組130係 當該狀態值的改變通過該門檻值時,判斷該基板管理控制 器112是否觸發一應變事件,如當基板管理控制器ιΐ2發 現被管元件發生異常情形時,主動做出包含記錄事件發 生、發出事件警告訊息、自動恢復控制等相對應的措施。 資料庫140係提供該狀態監測模組12〇儲存所有的狀態記 錄檔及事件記錄檔》 上述之狀態監測模組12〇判斷該狀態值的前後改變的 φ 彳式’係將該感測器1111的該狀態值與前-次記錄之該感 測器im的-狀態值進行比對,純狀態值相異於前一次 記錄之該狀態值,則記錄下該狀態值改變的事件於一事件 記錄槽中,並存入資料庫140中。而上述之狀態監測模組 120將改變後的該狀態值的與一門檻值進行比對,若改變後 的該狀態值通過該門檻值,則記錄下通過該門捏值的事件 於該事件記錄槽,並存入資料庫14〇中。因此,該狀態監 測模組!20尚包含提供該狀態記錄播以供使用者查詢的功 能,以及提供該事件記騎以供使用者查㈣功能。如此, 200945030 以提供基板管理控制器(BMC)的測試者,查詢資料庫140 中儲存的所有狀態記錄檔與事件記錄檔的資料。 配合參照第2圖,係為本發明基板管理控制器(BMC) 之感測器監測方法的步驟流程圖》如圖所示,本發明之感 測器監測方法’首先提供一監測機制(步驟200),係應用於 具有一基板管理控制器112之一電腦系統110中》透過狀 態監測模組120自該基板管理控制器112擷取一感測器 1111量測到的硬體狀態值(步驟210),包含電腦系統之CPU 溫度、電壓值、風扇轉速等。接著,記錄該感測器1U1的 該狀態值於一狀態記錄檔(步驟220)。然後,將該感測器 1111的該狀態值與前一次記錄之該感測器1 i i丨的一狀態值 進行比對(步驟230) ’並判斷該狀態值是否相異於前一次記 錄之該狀態值(步驟240)。於步驟240中,若該狀態值相異 於前一次記錄之該狀態值,則記錄下該狀態值改變的事件 於一事件記錄檔(步驟250),然後繼續下一步驟;但若該狀 態值與前一次記錄之該狀態值相同,則直接進入下一步 驟’將改變後的該狀態值與一門檀值(threshold value)進行 比對(步驟260),並判斷改變後的該狀態值是否通過該門檻 值(步驟270)。於步驟270中,若改變後的該狀態值通過該 門檻值,則接著判斷該基板管理控制器112是否觸發一應 變事件(步驟280),包含記錄事件發生、發出事件警告訊 息、自動恢復控制等相對應的措施《最後,記錄下通過該 門檻值的事件於該事件記錄檔(步驟29〇),然後結束本流 程,但於步驟270中,若改變後的該狀態值並未通過該門 200945030 檻值,則回到步驟210,再繼續擷取基板管理控制器ιΐ2 中之特定感測器1111量測到的硬體狀態值,並繼續作基板 管理控制器(BMC)之感測器監測。 配〇參照第3圖,係為本發明基板管理控制器(BMC) 之s己錄査詢步驟的示意圖。因本發明提供的監測機制,係 將該感測器1111的該狀態值記錄於一狀態記錄檔,並存入 資料庫140中,以及記錄狀態值改變的事件與該狀態值的 ❹ 改變通過該門檻值的事件於一事件記錄檔,並存入資料庫 140中。故本發明之感測器監測方法,於前述步驟28〇之 後,更包含一記錄查詢步驟流程A,該監測機制提供該狀 態s己錄檔以供使用者查詢(步驟3〇〇);以及,該監測機制提 供該事件記錄檔以供使用者查詢(步驟31〇)β如此,以提供 基板管理控制器(BMC)的測試者,查詢資料庫14〇中儲存 的所有狀態記錄槽與事件記錄槽的資料。 因此,本發明之基板管理控制器(BMC)之感測器監測 ❹ 系統及其方法’藉由査詢基板管理控制器(BMC)之狀態記 錄檔、事件記錄檔的資料,得知電腦系統中基板管理控制 器之監測的結果,並擷取感測器所量測到的硬體狀態值, 判斷該狀態值的前後改變’以及將改變之後的該狀態值與 一門檻值(threshold value)進行比對,分析基板管理控制器 是否能正常觸發事件並更改相對應的狀態。且更提供了基 板管理控制器(BMC)的測試者一個方便即時觀察基板管理 控制器中感測器的讀數變化的方式。 12 200945030 雖然本發明已以一較佳實施例揭露如上,然其並非用 以限定本發明,任何熟習此技藝者,在不脫離本發明之精 神和範圍内,當可作各種之更動與潤飾,因此本發明之保 護範圍當視後附之申請專利範圍所界定者為準。 【圖式簡單說明】 為讓本發明之上述和其他目的、特徵、優點與實施例 能更明顯易懂,所附圖式之詳細說明如下: 第1圖’係為本發明基板管理控制器(BMC)之感測器 監測系統的方塊圖。 第2圖’係為本發明基板管理控制器(BMC)之感測器 監測方法的步驟流程圖。 第3圖’係為本發明基板管理控制器(BMC)之記錄查 詢步驟的示意圖。 【主要元件符號說明】 100 :感測器監測系統 110 :電腦系統 1111〜llln :感測器 112:基板管理控制器 120 .狀態監測模纽 130:事件判斷模組 14〇 :資料庫 200〜310 :方法步驟 13200945030 IX. Description of the Invention: [Technical Field] The present invention is a monitoring system and method for a Baseboard Management Controller (BMC), and particularly to a computer system having a substrate management controller. A monitoring system and method therefor. [Prior Art] A Baseboard Management Controller (BMC) mainly includes a microcontroller and a firmware embedded in the baseboard management controller to control the management software of the system and the platform management hardware. The interface, while working across different firmware and hardware platforms, can proactively provide system status monitoring including computer system software/hardware, event logging, restart system control functions, automatic generation of warnings for events, and automated systems. Functions such as control (such as power-off), for example, use the Baseboard Management Controller (BMC) to instantly monitor abnormal system voltages, temperatures, and fan speeds in the computer system to determine if this monitoring data is outside the preset range. However, the known Substrate Management Controller (BMC) does not have any related modules to provide the tester to view the reading and status of the hardware sensor of the computer system. Therefore, the tester must have a substrate management controller for each inquiry ( BMC) issues query requests and records the readings and status data for analysis, which is time consuming and cannot be used for immediate analysis purposes. At the same time, the tester can not judge whether the operation of the baseboard management controller (BMC) is normal, whether the state data measured by the sensor can be read normally, and when the change of the state number 200945030 data passes the upper and lower limits, the substrate management control Whether the device (BMC) can be normally changed to the corresponding strain measure according to the change of state, for example, the fan speed is automatically adjusted according to the CPU temperature, that is, when the CPU temperature exceeds the threshold value, the fan speed is increased to lower the CPU temperature, so that It can reach a balance point. SUMMARY OF THE INVENTION In view of this, the present invention provides a substrate management controller (BMC) monitoring system and method thereof, which are mainly applied to a computer system having a Baseboard Management Controller (BMC). A state monitoring module selects a hardware state value measured by the sensor from the baseboard management controller, and includes a CPU temperature, a voltage value, a fan speed, and the like of the computer system, and records one of the specific sensors. The measured state value is determined to change before and after the state value, and the state value after the change is compared with a threshold value. Then recording the hardware state value measured by the sensor, and recording the event of the state value change before and after, and changing the state value through the threshold value event, and when the state value changes through the threshold value, Determining whether the baseboard management controller (BMC) triggers a strain event. If the baseboard management controller (BMC) finds that the managed hardware state is abnormal, it can actively make a record event, issue an event warning message, and automatically recover. Control and other corresponding measures. This allows the tester to query the results of the sensor monitoring of the Baseboard Management Controller (BMC) and analyze whether the Baseboard Management Controller (BMC) can trigger the event properly. 7 200945030 The main purpose of the present invention is to provide a monitoring system for a substrate management controller (BMC), comprising at least: a plurality of sensors disposed in a computer system for measuring the hardware state of the computer system a state management value (BMC), which is connected to the sensors, and repeatedly reads the state values measured by the sensors in a polling manner; a state monitoring module Obtaining and recording the state value measured by the special sensor from the substrate management controller (BMC), and providing a change before and after determining the state of the state, and the state value to be changed. Comparing with a threshold value; and an event judging module determining whether the baseboard management controller (BMC) triggers a strain event, including the record, when the state value changes through the threshold value Corresponding measures such as event occurrence, event warning message and automatic recovery control. Wherein, if the status monitoring module detects that the status values are different before and after, the event of the status value change is recorded. And if the changed state value passes the threshold value, the event passing the threshold value is recorded. Another object of the present invention is to provide a monitoring method for a substrate management controller, which provides a monitoring mechanism for capturing a state value of a sensor of a substrate management controller (BMC) by a state monitoring module. And recording the state value of the sensor in a state record file. Then, comparing the state value of the sensor with a state value of the sensor recorded last time, if the state value is different from the state value of the previous record, recording the state value change The event is recorded in an event file. And comparing the changed state value with a threshold value to determine whether the changed state value passes the threshold value, and if the changed state value passes through the door 200945030, the threshold value is further The event judging module determines whether the baseboard management controller (BMC) triggers a strain event, and includes corresponding measures such as recording an event occurrence, issuing an event warning message, and automatically recovering control. Then, the present invention records that the event passing the threshold value is recorded in the event, and provides information of all status record slots and event log files for the user to query. [Embodiment] The present invention is a sensor management system (BMC) sensor monitoring system and method thereof. In order to make the present invention easier to understand, the following will be applied to a preferred embodiment of the present invention. The illustrated example is described in detail. However, the drawings are not intended to limit the techniques and various modifications and refinements disclosed herein. Referring to Fig. 1, it is a block diagram of a sensor monitoring system of the substrate management controller (BMC) of the present invention. As shown in the figure, the monitoring system 100 ′ of the substrate management controller of the present invention includes at least a plurality of sensors 1 1 1 1 to g 11 In, a substrate management controller 112, a state monitoring module 12, and an event. The module 130 and a database 140 are determined. The sensors 1111 llll are disposed in a computer system 110 for measuring a state value of the hardware state of the computer system 110, including CPU temperature, voltage value, fan speed, etc. of the computer system, and therefore, sensing The devices 1111 to 11 In refer to sensors in any computer system 110 that provide a measured hardware state. The Baseboard Management Controller (BMC) 112 includes a microcontroller and an embedded firmware between the system management software and the hardware interface of the computer system, and the baseboard management controller 112. The sensors 9 200945030 1111 llll' are connected and the hardware state values measured by the sensors 11U llll are repeatedly read in a polling manner. The state monitoring module 12 reads the hardware state values measured by the sensors mi~llln from the substrate management controller 112, and captures and records a specific sensor. The state value obtained is in a state record file, and provides a judgment before and after the change of the state value, and compares the changed state value with a threshold value, wherein the threshold value refers to The upper and lower limits of the substrate tube processing controller U2 are set. The event judging module 130 determines whether the substrate management controller 112 triggers a strain event when the change of the state value passes the threshold value, for example, when the substrate management controller ιΐ2 finds that the managed component has an abnormal situation, actively making It includes corresponding measures such as recording event occurrence, issuing event warning message, and automatic recovery control. The database 140 provides the status monitoring module 12 to store all status records and event log files. The status monitoring module 12 determines that the status value changes before and after the φ 彳 ' is the sensor 1111 The status value is compared with the pre-recorded-state value of the sensor im. The pure status value is different from the previous recorded status value, and the event whose status value is changed is recorded in an event record. The slot is stored in the database 140. The state monitoring module 120 compares the changed state value with a threshold value. If the changed state value passes the threshold value, the event recorded by the gate pinch value is recorded in the event record. The slot is stored in the database 14〇. Therefore, the status monitoring module! 20 still includes the function of providing the status record for the user to query, and providing the event record for the user to check (4). Thus, 200945030, the tester providing the Baseboard Management Controller (BMC), queries all the status log files and event log files stored in the database 140. Referring to FIG. 2, it is a flow chart of the steps of the sensor monitoring method of the substrate management controller (BMC) of the present invention. As shown in the figure, the sensor monitoring method of the present invention first provides a monitoring mechanism (step 200). The utility model is applied to the computer system 110 having a baseboard management controller 112. The transmitted state value is measured by the sensor management module 112 from the substrate management controller 112 (step 210). ), including CPU temperature, voltage value, fan speed, etc. of the computer system. Next, the status value of the sensor 1U1 is recorded in a status log (step 220). Then, the state value of the sensor 1111 is compared with a state value of the sensor 1 丨 that was recorded last time (step 230)' and it is determined whether the state value is different from the previous record. Status value (step 240). In step 240, if the status value is different from the previous recorded status value, the event that the status value changes is recorded in an event log (step 250), and then proceeds to the next step; but if the status value If the status value is the same as the previous record, the process proceeds directly to the next step of 'matching the changed state value with a threshold value (step 260), and determining whether the changed state value passes. The threshold value (step 270). In step 270, if the changed state value passes the threshold, then it is determined whether the substrate management controller 112 triggers a strain event (step 280), including recording an event occurrence, issuing an event warning message, automatically recovering control, etc. Corresponding measures "Finally, record the event passing the threshold value in the event log file (step 29〇), and then end the process, but in step 270, if the changed state value does not pass the door 200945030 If the value is negative, then return to step 210, and continue to retrieve the hardware state value measured by the specific sensor 1111 in the substrate management controller ι2, and continue to monitor the sensor of the substrate management controller (BMC). Referring to FIG. 3, it is a schematic diagram of the recording process of the substrate management controller (BMC) of the present invention. The monitoring mechanism provided by the present invention records the state value of the sensor 1111 in a state record file and stores it in the database 140, and records the event of the state value change and the change of the state value through the The threshold event is recorded in an event and stored in the database 140. Therefore, the sensor monitoring method of the present invention, after the foregoing step 28, further includes a record query step flow A, the monitoring mechanism provides the status s recorded file for the user to query (step 3 〇〇); The monitoring mechanism provides the event log file for the user to query (step 31〇) β such that the tester of the baseboard management controller (BMC) is provided, and all state record slots and event record slots stored in the database 14 are queried. data of. Therefore, the sensor monitoring system and method of the substrate management controller (BMC) of the present invention knows the substrate in the computer system by querying the data of the state record file and the event record file of the substrate management controller (BMC). The result of the monitoring of the controller is managed, and the hardware state value measured by the sensor is retrieved, the before and after change of the state value is judged, and the state value after the change is compared with a threshold value. Yes, analyze whether the baseboard management controller can trigger the event properly and change the corresponding state. It also provides a way for the tester of the board management controller (BMC) to instantly observe changes in the readings of the sensors in the substrate management controller. The present invention has been described above in terms of a preferred embodiment, and is not intended to limit the invention, and various modifications and changes may be made without departing from the spirit and scope of the invention. Therefore, the scope of the invention is defined by the scope of the appended claims. BRIEF DESCRIPTION OF THE DRAWINGS The above and other objects, features, advantages and embodiments of the present invention will become more <RTIgt; Block diagram of the sensor monitoring system of BMC). Fig. 2 is a flow chart showing the steps of the sensor monitoring method of the substrate management controller (BMC) of the present invention. Figure 3 is a schematic diagram showing the recording and querying steps of the substrate management controller (BMC) of the present invention. [Main component symbol description] 100: sensor monitoring system 110: computer system 1111~llln: sensor 112: substrate management controller 120. state monitoring module 130: event judging module 14: database 200 to 310 : Method Step 13