Fan control method and device, equipment and medium
By establishing a single bus connection between the BMC and the fan, sending data acquisition requests to the fan and receiving operating status data, the problem that the BMC cannot obtain information other than the speed of the fan is solved, and accurate detection and management of fan failures is achieved.
Patent Information
- Application Number
- CN202411725186.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-21
AI Technical Summary
In the prior art, the substrate management controller (BMC) cannot obtain other operating information of the fan except for the speed, and cannot obtain fan failure information, such as unstable fan speed and fan overheating fault failure.
Through a single bus connected to the target fan, a data acquisition request is sent to the fan, the operation status data sent by the fan is received, and based on this data, it is determined whether the fan has failed.
It realizes that BMC can obtain the operating status data of the fan, accurately judge the fan status, and analyze and determine whether the fan has failed, improving the accuracy and efficiency of fan fault detection.
Smart Images

Figure CN119664702A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a fan control method, device, equipment and medium. Background Art
[0002] In the prior art, a baseboard management controller (BMC) can only send control signals to the fan to control the fan's speed, monitor the fan's speed information and in-position information. Therefore, the BMC cannot obtain other operating information of the fan except the speed, and cannot perform analysis in combination with the fan's operating information, resulting in the inability to obtain fan fault information, such as unstable fan speed, fan overheating, etc. Summary of the invention
[0003] The embodiments of the present application provide a fan control method, device, equipment and medium to solve the problem in the prior art that the BMC cannot obtain other operating information of the fan except the rotation speed and cannot obtain the fault information of the fan.
[0004] In a first aspect, an embodiment of the present application provides a fan control method, which is applied to a BMC. The method includes:
[0005] Sending a data acquisition request to the target fan via a single bus connected to the target fan;
[0006] Receiving the operating status data sent by the target fan via the single bus;
[0007] Determine whether the target fan fails according to the operating status data.
[0008] In the above manner, the BMC can obtain the running status data of the target fan, accurately determine the state of the target fan, and analyze and determine whether the target fan fails based on the running status data of the target fan.
[0009] In a possible implementation manner, determining whether the target fan fails according to the operating status data includes:
[0010] It is determined whether the running status data corresponding to any status type exceeds a threshold value corresponding to the status type; if so, it is determined that the target fan fails.
[0011] Through the above manner, it is determined whether the running status data corresponding to any status type exceeds the status threshold corresponding to the status type, so as to further analyze and determine whether the target fan fails.
[0012] In a possible implementation manner, receiving the operating status data sent by the target fan through the single bus includes:
[0013] The operating status data sent by the microcontroller unit MCU of the target fan is received through the single bus; wherein the operating status data is collected by at least one sensor in the target fan and read and sent by the MCU.
[0014] By adding a sensor to the target fan in the above manner, the operating status data of the target fan can be more accurately collected through the sensors in the target fan, and the operating status data collected by each sensor can be read by the MCU. After receiving the request to obtain the operating status sent by the BMC, the MCU sends the read and saved operating status data of the target fan to the BMC, so that the BMC can more accurately determine the status of the target fan.
[0015] In a possible implementation, the method further includes:
[0016] Sending a self-asset data acquisition request to the target fan via a single bus connected to the target fan;
[0017] Receive the self-asset information data sent by the MCU of the target fan; wherein the self-asset information data is the self-asset information data of the target fan stored in the field replaceable unit FRU of the target fan, which is read and sent by the MCU after receiving the self-asset data acquisition request.
[0018] Through the above method, a FRU is added to the target fan to save the self-asset information data of the fan, and the self-asset information data saved in the FRU is read by the MCU. After receiving the self-asset data acquisition request sent by the BMC, the MCU sends the self-asset information data of the target fan read in the FRU to the BMC, so that the BMC can further manage the target fan according to the self-asset information data.
[0019] In a possible implementation manner, after receiving the self-asset information data sent by the MCU of the target fan, the method further includes:
[0020] The target fan is controlled according to the rated rotation speed in the asset information data so that the rotation speed of the target fan reaches the rated rotation speed.
[0021] Through the above method, the rotation speed of the target fan reaches the rated rotation speed, so that the target fan can operate stably and achieve optimal performance.
[0022] In a possible implementation, the method further includes:
[0023] Receive upgrade data packets;
[0024] Parsing the upgrade data packet to obtain identification information of the target fan, parameters to be upgraded, and corresponding parameter values in the upgrade data packet;
[0025] Send an upgrade command to the target fan of the identification information, and after receiving the first message returned by the target fan, send the parameters to be upgraded and the corresponding parameter values to the target fan; make the target fan write the parameters to be upgraded and the corresponding parameter values into the non-volatile memory Flash, control itself to power off and restart.
[0026] Through the above method, the BMC sends the parameters to be upgraded and the corresponding upgrade parameter values carried in the upgrade data packet to the MCU of the target fan. The MCU can control the parameters to be upgraded and the corresponding upgrade parameter values to be written into the Flash. There is no need to plug and unplug the fan before upgrading, and the fan firmware can be upgraded online. The firmware can be upgraded without stopping the equipment in the computer room, which is convenient for machine maintenance.
[0027] In a possible implementation, the method further includes:
[0028] Sending an address read request to the target fan;
[0029] If the bus identification number BUS ID returned by the target fan is not received, it is determined that the target fan is not in place;
[0030] If the BUS ID returned by the target fan is received, it is determined whether the BUS ID of the target fan is consistent with the saved BUS ID of the target fan. If so, it is determined that the target fan is in place; if not, it is determined that the target fan is not in place.
[0031] In this way, the BMC stores the correspondence between the BUS ID and identification information of each fan, sends an address read request to the target fan, and determines whether the target fan returns a BUS ID and, if so, whether the BUS ID is correct, thereby determining the fan's in-place status.
[0032] In a second aspect, the present application also provides a fan control device, which has the function of implementing the behavior of the device in the method embodiment of the first aspect. The beneficial effects can be found in the description of the first aspect and will not be repeated here. The fan control device includes:
[0033] A sending module, used for sending a data acquisition request to the target fan via a single bus connected to the target fan;
[0034] A receiving module, used for receiving the running status data sent by the target fan through the single bus;
[0035] The analysis module is used to determine whether the target fan fails according to the operating status data.
[0036] In a third aspect, an embodiment of the present application further provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of the fan control method as described in any one of the above items when executing a computer program stored in the memory.
[0037] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the fan control method as described in any one of the above items.
[0038] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the steps of the fan control method as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 This is a schematic diagram of the structure of the current fan;
[0041] Figure 2 This is a schematic diagram of the current process of controlling the fan directly through the BMC;
[0042] Figure 3 This is a schematic diagram of the current process of using BMC to control CPLD to control the fan;
[0043] Figure 4 This is a schematic diagram of the current process of hybrid fan control by BMC and CPLD;
[0044] Figure 5 A schematic diagram of a fan control process provided in an embodiment of the present application;
[0045] Figure 6 A schematic diagram of a connection method between a BMC and multiple fans provided in an embodiment of the present application;
[0046] Figure 7A schematic diagram of the structure of a target fan provided in an embodiment of the present application;
[0047] Figure 8 A schematic diagram of a fan control process provided in an embodiment of the present application;
[0048] Fig. 9 A schematic diagram of the structure of a fan control device provided in an embodiment of the present application;
[0049] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purpose and implementation method of the present application clearer, the exemplary implementation method of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0051] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their ordinary and common meanings.
[0052] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.
[0053] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0054] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0055] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0056] For the convenience of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.
[0057] The embodiment of the present application provides a fan control method, device, equipment and medium, in which the BMC sends a data acquisition request to the target fan through a single bus connected to the target fan; receives the operating status data sent by the target fan through the single bus; and determines whether the target fan fails according to the operating status data. Thus, two-way information interaction between the BMC and the fan is achieved, and whether the fan fails is determined based on the received operating status data.
[0058] At present, the BMC control methods for fans usually include: directly controlling the fan through the BMC, using the BMC to control the complex programmable logic device (CPLD) to control the fan, and using the BMC and CPLD to control the fan. The above three methods all control the fan by connecting the three pins of the fan, such as Figure 1 The schematic diagram of the structure of the current fan is shown, which includes a fan body and a motor, a microcontroller unit (MCU) and three pins; the three pins are respectively a pulse width modulation (PWM) control pin, a tachometer (TACH) signal return pin and a present pin.
[0059] The following first describes the current BMC control methods for fans: Figure 2The process of controlling the fan directly through the BMC is shown, wherein the electronic device is deployed with a BMC, multiple fans, and a field replaceable unit (FRU). The BMC in the electronic device is connected to each fan on the electronic device motherboard through the three pins of each fan, and the BMC is connected to various sensors such as temperature sensors, voltage sensors, power consumption sensors, and FRUs deployed on the electronic device motherboard to monitor the status of each component in the electronic device motherboard. Specifically, for each fan, the BMC sends a speed control signal to the fan through the PWM control pin of the fan to control the fan speed. The fan returns the fan speed information to the BMC through the TACH signal return pin, and returns the fan's in-place information to the BMC through the present pin. This method can realize the independent control of each fan, but when the BMC is not started or the BMC fails, the fan cannot receive the speed control signal, so the speed cannot be adjusted; and this method cannot read the information collected by the sensor inside the fan alone, and the running status of the fan cannot be analyzed.
[0060] like Figure 3 The process of using BMC to control CPLD to control fans is shown. A control link is added between the fan and BMC. The BMC is connected to the CPLD through the control link. The CPLD is connected to each fan through the three pins of each fan. The control link can be Figure 3 The serial communication interface (Universal Asynchronous Receiver / Transmitter, UART), serial communication bus (Inter-Integrated Circuit, I2C), etc. shown in the figure. Specifically, the CPLD controls the fan by forwarding the speed control signal received from the BMC to the fan, and transmits the position information and speed information returned by the fan to the BMC. This method can not only control the fan, but also enable the CPLD to play a redundant role when the BMC is not started or fails, take over the fan, and adjust the fan speed. However, this method also cannot read the information collected by the sensor inside the fan alone, and cannot analyze the operating status of the fan.
[0061] like Figure 4 The process of hybrid fan control by BMC and CPLD is shown. BMC and CPLD are simultaneously connected to three pins of each fan through a multiplexer (MUX), so that when BMC is not started or fails, CPLD plays a redundant role, takes over the fan and adjusts the fan speed. However, this method also cannot read the sensor information inside the fan separately, and cannot analyze the operating status of the fan.
[0062] Embodiment 1:
[0063] Figure 5 A schematic diagram of a fan control process provided in an embodiment of the present application, the process includes:
[0064] S501: Sending a data acquisition request to a target fan via a single bus connected to the target fan.
[0065] The fan control method provided in the embodiment of the present application is applied to a BMC, which is deployed on a mainboard of an electronic device, and each fan is also deployed on the mainboard of the electronic device.
[0066] In order to solve the problems existing in the above-mentioned method for controlling the fan, in the embodiment of the present application, as Figure 6 The connection mode between the BMC and multiple fans is shown. The BMC is connected to the corresponding fan through the single bus corresponding to each fan, so as to realize the control of each fan. Since the fan is connected to the BMC through the single bus, rather than just the three pins mentioned above, the information that the fan can return to the BMC is not limited to the speed information and the position information, but includes various information that the fan can collect about itself, that is, the BMC can receive various information reported by each fan.
[0067] For each fan connected to the BMC, the BMC determines the single bus connected to the target fan according to the identification information of the target fan carried in the data acquisition request, and sends the data acquisition request to the target fan through the single bus connected to the target fan.
[0068] S502: Receive the operating status data sent by the target fan through the single bus.
[0069] After receiving the data acquisition request sent by the BMC, the target fan obtains the operating status data corresponding to various status types of the target fan collected by itself, and sends the identification information of each status type and the corresponding operating status data to the BMC through the single bus connected to the target fan.
[0070] The BMC receives the running status data and the identification information of the corresponding status type returned by the target fan through the single bus connected to the target fan.
[0071] In addition, it can be understood that, in addition to being able to obtain the operating status data sent by the target fan, the BMC can still control the target fan in the embodiment of the present application, such as Figure 6As shown, the BMC is connected to various sensors such as temperature sensors, voltage sensors, power consumption sensors, and FRUs deployed on the electronic device motherboard to monitor the status of each component in the electronic device motherboard, and adjust the fan speed according to the status of each component in the electronic device motherboard (such as temperature, power consumption, etc.). Among them, the process of adjusting the fan speed according to the status of each component in the electronic device motherboard (such as temperature, power consumption, etc.) is a prior art and will not be repeated here.
[0072] S503: Determine whether the target fan fails according to the operating status data.
[0073] After receiving the running status data of the target fan and the identification information of the corresponding status type, the BMC can analyze the running status data of the target fan of the status type according to the fan fault judgment rule corresponding to the status type for each status type corresponding to the identification information, and determine whether there is any abnormality in the running status data of the status type; if it is determined that there is any abnormality in the running status data of the status type, it is determined whether the target fan has a fault.
[0074] In the embodiment of the present application, the BMC can obtain the operating status data of the target fan, accurately determine the state of the target fan, and analyze and determine whether the target fan fails based on the operating status data of the target fan.
[0075] Embodiment 2:
[0076] In order to further analyze and determine whether the target fan fails, based on the above embodiment, in the embodiment of the present application, determining whether the target fan fails according to the operating status data includes:
[0077] It is determined whether the running status data corresponding to any status type exceeds a threshold value corresponding to the status type; if so, it is determined that the target fan fails.
[0078] The BMC stores status thresholds corresponding to multiple status types, where the status types include but are not limited to temperature, voltage, current, power consumption, rotation speed, power, etc., which are not specifically limited here.
[0079] The BMC stores the correspondence between the identification information of each state type and the state threshold. After receiving the running state data returned by the target fan and the identification information of the corresponding state type, the BMC determines the running state data corresponding to each state type for the state type corresponding to each identification information, and determines the state threshold corresponding to the state type according to the correspondence between the identification information of each state type and the state threshold; determines whether the running state data corresponding to the state type exceeds the state threshold corresponding to the state type, and if so, determines that the running state data of the state type is abnormal.
[0080] If there is an abnormality in the running status data corresponding to any status type, it is determined that the target fan fails.
[0081] The operating status data of the target fan includes, but is not limited to, temperature data, voltage data, current data, power consumption data, speed data, power data, etc.
[0082] For example, if it is determined that the power consumption data corresponding to the power consumption of the target fan exceeds the power consumption threshold, but the operating status data corresponding to other status types (such as speed, temperature, etc.) are all within the normal range, that is, they do not exceed the corresponding status threshold, then it can be determined that the target fan is faulty.
[0083] In another example, if it is determined that the voltage data corresponding to the voltage of the target fan exceeds the voltage threshold, and the power data corresponding to the power also exceeds the power threshold, but the operating status data corresponding to other status types (such as speed, temperature, etc.) are all within the normal range, that is, they do not exceed the corresponding status threshold, then it can be determined that the target fan is faulty. That is, as long as any type of status data exceeds its corresponding threshold, it can be determined that the target fan is faulty.
[0084] After determining that the target fan has failed, the BMC can output a prompt message and display the target fan's identification information, operating status data, and prompt message of the failure in the BMC's web interface for the user to troubleshoot the cause of the failure. The causes of the failure include, but are not limited to: the fan's motor energy efficiency is not high, the energy utilization efficiency is low, the fan's motor bearing is seriously worn, the fan is installed in an improper position or at an incorrect angle, affecting its heat dissipation effect and causing increased energy consumption, the target fan itself is overheated, etc., which are not limited here.
[0085] At the same time, the status indicator light may be used to indicate the failure of the fan to the user. In a possible implementation, a status indicator light corresponding to the fan is provided for each fan, and when it is determined that the target fan fails, the status indicator light of the target fan may be controlled to light up.
[0086] In the embodiment of the present application, by judging whether the running status data corresponding to any status type exceeds the status threshold corresponding to the status type, it is possible to further analyze and determine whether the target fan fails.
[0087] Embodiment 3:
[0088] In order to further accurately determine the state of the target fan, based on the above embodiments, in the embodiment of the present application, receiving the operating state data sent by the target fan through the single bus includes:
[0089] The operating status data sent by the microcontroller unit MCU of the target fan is received through the single bus; wherein the operating status data is collected by at least one sensor in the target fan and read and sent by the MCU.
[0090] In the embodiment of the present application, in addition to changing the connection mode between the fan and the BMC, the structure of the fan is also changed so that the changed fan can collect its own relevant data, such as Figure 7 The target fan (ie Figure 7 The new fan module shown in FIG. 1 includes, in addition to the motor, fan body, and MCU, a plurality of sensors and FRUs disposed inside the target fan.
[0091] The multiple sensors in the target fan may be temperature sensors, current sensors, voltage sensors, power consumption sensors, etc., which are not specifically limited here, and the number of sensors in the target fan is not specifically limited either.
[0092] Specifically, in the target fan, the MCU is connected to a module consisting of a motor and a fan body, so that after receiving a speed control signal sent by the BMC, the MCU can control the speed of the fan based on the speed control signal; and multiple sensors and FRUs are connected to the module consisting of a motor and a fan body to monitor various operating status data of the fan, etc.; in addition, the MCU is also connected to multiple sensors and FRUs to read the data collected or stored in each sensor and FRU.
[0093] In addition, the MCU in the target fan is connected to the BMC via a single bus to achieve information input / output (I / O).
[0094] In addition, the target fans may also include fans that are not in Figure 7 The power supply pins shown in the figure include a 12 volt (volt, V) pin and a ground (ground, GND) pin, wherein the 12V pin is used to connect to the power supply and the GND pin is used to connect to the ground.
[0095] In the embodiment of the present application, the BMC sends the data acquisition request to the MCU in the target fan via a single bus connected to the target fan. In a possible implementation, the BMC can send the data acquisition request to the MCU in the target fan at a preset time interval.
[0096] Since the MCU in the embodiment of the present application can read the operating status data of each state type of the fan collected by each sensor in the fan in real time, the MCU of the target fan reads the operating status data of the target fan collected by at least one sensor at the current moment after receiving the data acquisition request, and sends it to the BMC through the single bus corresponding to the target fan.
[0097] The BMC receives the target fan's current operating status data sent by the MCU of the target fan, wherein the operating status data includes but is not limited to temperature data collected by a temperature sensor, voltage data collected by a voltage sensor, current data collected by a current sensor, power consumption data collected by a power consumption sensor, etc., which are not specifically limited here.
[0098] In addition, it is understandable that after receiving the running status data of the target fan at the current moment, the BMC may display the running status data on the Web interface of the BMC.
[0099] In an embodiment of the present application, a sensor is added to the target fan, so that the operating status data of the target fan can be more accurately collected through the sensors in the target fan, and the operating status data collected by each sensor is read by the MCU. After receiving the request to obtain the operating status sent by the BMC, the MCU sends the read and saved operating status data of the target fan to the BMC, so that the BMC can more accurately judge the status of the target fan.
[0100] Embodiment 4:
[0101] In order to further manage the target fan, based on the above embodiments, in the embodiment of the present application, the method further includes:
[0102] Sending a self-asset data acquisition request to the target fan via a single bus connected to the target fan;
[0103] Receive the self-asset information data sent by the MCU of the target fan; wherein the self-asset information data is the self-asset information data of the target fan stored in the field replaceable unit FRU of the target fan, which is read and sent by the MCU after receiving the self-asset data acquisition request.
[0104] At present, BMC has limitations in monitoring fans. It can only monitor the speed information of fans, but cannot obtain the fan's own asset information, such as manufacturer information, rated speed, life information, usage information, etc. Therefore, in the embodiment of the present application, a method for BMC to obtain the self-asset information data of fans is also provided. The process of BMC obtaining the self-asset information data of the target fan is described below:
[0105] In the embodiment of the present application, the BMC sends a self-asset data acquisition request to the MCU in the target fan via a single bus connected to the target fan.
[0106] Since the self-asset information data of the fan is stored in the FRU in the fan in the embodiment of the present application, and the MCU can read the information stored in the FRU, after receiving the self-asset data acquisition request, the MCU of the target fan reads the self-asset information data of the target fan stored in the FRU, and sends the read self-asset information data of the target fan to the BMC through the single bus corresponding to the target fan.
[0107] The asset information data of the target fan includes, but is not limited to, manufacturer information, rated speed information, life information, usage information, etc. of the target fan.
[0108] The BMC receives the self-asset information data of the target fan sent by the MCU of the target fan, and after receiving the self-asset information data of the target fan, it can report the self-asset information data through the asset management interface connected to the web interface of the electronic device where the BMC is located, and display it on the web interface of the electronic device for user reference.
[0109] Furthermore, after receiving the self-asset information data of the target fan, the BMC can better manage the fan according to the self-asset information data.
[0110] For example, the BMC can distinguish the manufacturers of each fan on a machine (such as an electronic device motherboard) based on the manufacturer information in the asset information data. When a fan fails, it can also output a prompt message to enable the user to contact the fan manufacturer for machine maintenance.
[0111] As another example, based on the life information in the asset information data, the BMC can determine whether the target fan is within its service life. If not, the BMC can prompt the user to perform operations such as replacing the target fan.
[0112] In another example, since the usage information records the usage method, usage skills and maintenance method of the target fan, the BMC displays the usage information of the target fan on the BMC Web interface so that the user can adopt the correct usage and maintenance method for the target fan.
[0113] As another example, based on the above embodiments, in the embodiment of the present application, after receiving the self-asset information data sent by the MCU of the target fan, the method further includes:
[0114] The target fan is controlled according to the rated rotation speed in the asset information data so that the rotation speed of the target fan reaches the rated rotation speed.
[0115] Specifically, the BMC may control the target fan according to the rated speed in the asset information data of the target fan so that the speed of the target fan reaches the rated speed, thereby enabling the target fan to operate stably and achieve optimal performance.
[0116] In an embodiment of the present application, a FRU is added to the target fan to save the self-asset information data of the fan, and the self-asset information data saved in the FRU is read by the MCU. Therefore, after receiving the self-asset data acquisition request sent by the BMC, the MCU sends the self-asset information data of the target fan read in the FRU to the BMC, so that the BMC can further manage the target fan according to the self-asset information data.
[0117] Embodiment 5:
[0118] In order to perform online upgrade of the fan firmware, based on the above embodiments, in the embodiment of the present application, the method further includes:
[0119] Receive upgrade data packets;
[0120] Parsing the upgrade data packet to obtain identification information of the target fan, parameters to be upgraded, and corresponding parameter values in the upgrade data packet;
[0121] An upgrade command is sent to the target fan of the identification information, and after receiving the first message returned by the target fan, the parameters to be upgraded and the corresponding parameter values are sent to the target fan; the target fan writes the parameters to be upgraded and the corresponding parameter values into a non-volatile memory (Flash), and controls itself to power off and restart.
[0122] Considering that the fans currently used cannot be upgraded online, when a fan fails, the only option is to replace the fan and upgrade the failed fan offline, which is time-consuming and labor-intensive. Therefore, the embodiment of the present application provides a method for upgrading the fan online without consuming a lot of time and manpower. The process of upgrading the fan online is described below:
[0123] The BMC receives the upgrade data packet, parses the upgrade data packet, and obtains identification information of the target fan, parameters to be upgraded, and upgrade parameter values corresponding to the parameters to be upgraded contained in the upgrade data packet.
[0124] The BMC determines the single bus corresponding to the target fan of the identification information according to the identification information of the target fan carried in the upgrade data packet, and sends an upgrade mode command to the target fan of the identification information through the single bus corresponding to the target fan.
[0125] After receiving the upgrade mode command sent by the BMC, the MCU of the target fan changes its own (i.e., the MCU of the target fan) state to the upgrade mode, and returns a first message to the BMC via the single bus of the target fan. The first message can be a prompt message of successful state modification, which is not specifically limited here.
[0126] After receiving the first message sent by the MCU of the target fan, the BMC sends the parameters to be upgraded and the corresponding upgraded parameter values carried in the upgrade data packet to the MCU of the target fan.
[0127] After receiving the parameters to be upgraded and the corresponding upgrade parameter values, the MCU of the target fan determines, for any parameter to be upgraded, whether the target fan firmware (Firmware, FW) content currently stored in the Flash contains the parameter to be upgraded. If so, the original parameter value corresponding to the parameter to be upgraded is updated based on the upgrade parameter value corresponding to the parameter to be upgraded; if not, the parameter to be upgraded and the corresponding upgrade parameter value are written to the Flash.
[0128] After the parameters to be upgraded and the corresponding upgraded parameter values are written into the Flash, the MCU controls itself to be powered off and restarted, thereby completing the upgrade of the target fan FW.
[0129] In an embodiment of the present application, the BMC sends the parameters to be upgraded and the corresponding upgrade parameter values carried in the upgrade data packet to the MCU of the target fan. The MCU can control the parameters to be upgraded and the corresponding upgrade parameter values to be written into the Flash. There is no need to plug and unplug the fan before upgrading, thereby realizing online upgrade of the fan firmware. The firmware can be upgraded without shutting down the computer room equipment, thus facilitating machine maintenance.
[0130] Embodiment 6:
[0131] In order to determine the in-position status of the fan, based on the above embodiments, in the embodiment of the present application, the method further includes:
[0132] Sending an address read request to the target fan;
[0133] If the bus identification number (BUSID) returned by the target fan is not received, it is determined that the target fan is not in place;
[0134] If the BUS ID returned by the target fan is received, it is determined whether the BUS ID of the target fan is consistent with the saved BUS ID of the target fan. If so, it is determined that the target fan is in place; if not, it is determined that the target fan is not in place.
[0135] In the embodiment of the present application, each fan connected to the BMC has an independent BUS ID, and the BMC stores the correspondence between the BUS ID and identification information of each fan.
[0136] For example, the BUS IDs corresponding to the fans may be pin001, pin002, pin003, ..., pinX, etc., where X is a positive integer and is not specifically limited here.
[0137] The BMC sends an address read request to the target fan of the identification information according to the identification information of the target fan carried in the address read request, and determines whether the BUS ID returned by the target fan is received within a preset time. If not, it determines that the target fan of the identification information is not in place.
[0138] If the BMC receives the BUS ID returned by the target fan within the preset time, the BMC determines the BUS ID corresponding to the target fan based on the identification information of the target fan and the correspondence between the BUS ID and the identification information of each fan, and determines whether the received BUS ID returned by the target fan is consistent with the saved BUS ID of the target fan. If so, it is determined that the target fan is in place; if not, it is determined that the target fan is not in place.
[0139] In the embodiment of the present application, the BMC stores the correspondence between the BUS ID and identification information of each fan, sends an address read request to the target fan, and determines whether the target fan returns the BUS ID, and if so, whether the BUS ID is correct, thereby determining the fan's in-place status.
[0140] Embodiment 7:
[0141] In order to still be able to control the fan when the BMC fails, based on the above embodiments, in the embodiment of the present application, the method further includes:
[0142] The BMC sends a heartbeat signal to the CPLD every preset time period, so that when the CPLD determines that the heartbeat of the BMC is abnormal based on the heartbeat signal, it takes over the control of the target fan.
[0143] In the embodiments of the present application, Figure 6 As shown, the BMC is connected to the CPLD, and the BMC sends a heartbeat signal to the CPLD every preset time period.
[0144] The watchdog in the CPLD receives the heartbeat signal sent by the BMC. The CPLD determines whether it has not received the heartbeat signal sent by the BMC within a set time. If so, it is determined that the BMC heartbeat is abnormal, that is, it is determined that the BMC is not started or has a fault. Then, the CPLD controls the target fan, wherein the CPLD is connected to each fan via a single bus. The process of controlling each fan by the CPLD is a prior art and will not be repeated here.
[0145] The set duration is greater than the preset duration. For example, the set duration may be twice or three times the preset duration, and no specific limitation is made here.
[0146] In an embodiment of the present application, the BMC periodically sends a heartbeat signal to the CPLD. If the CPLD determines that it has not received the heartbeat signal sent by the BMC within a set time, it takes over the control of each fan to ensure that the fan can still be controlled when the BMC fails.
[0147] Embodiment 8:
[0148] Based on the above embodiments, the present application embodiment provides a fan control process diagram, such as Figure 8 As shown, the process includes:
[0149] In step one, the BMC sends an address read request to the target fan of the identification information according to the identification information of the target fan carried in the data acquisition request; if the BUS ID returned by the target fan is not received, it is determined that the target fan is not in place; if the BUS ID returned by the target fan is received, it is determined whether the BUS ID of the target fan is consistent with the saved BUS ID of the target fan, if so, it is determined that the target fan is in place and step two is executed, if not, it is determined that the target fan is not in place.
[0150] Step 2: The BMC determines the single bus connected to the target fan with the identification information according to the identification information of the target fan carried in the data acquisition request, and regularly sends the data acquisition request to the MCU of the target fan through the single bus connected to the target fan; after receiving the data acquisition request, the MCU of the target fan reads the operating status data collected by each sensor in the target fan, and sends the identification information of each operating status data and the corresponding status type to the BMC through the single bus connected to the target fan; the BMC receives the identification information of each operating status data and the corresponding status type sent by the MCU of the target fan through the single bus connected to the target fan; and determines whether the operating status data corresponding to any status type exceeds the threshold corresponding to the status type. If so, it is determined that the target fan has a sending failure.
[0151] Step three, the BMC sends a self-asset data acquisition request to the MCU of the target fan through the single bus connected to the target fan; after receiving the self-asset data acquisition request, the MCU of the target fan reads the self-asset information data of the target fan stored in the FRU of the target fan, and sends the read self-asset information data of the target fan to the BMC through the single bus connected to the target fan; after receiving the self-asset information data of the target fan, the BMC displays the self-asset information data on the BMC's Web interface.
[0152] Step 4: BMC receives the upgrade data packet; parses the upgrade data packet to obtain the identification information, parameters to be upgraded and corresponding parameter values of the target fan in the upgrade data packet; sends an upgrade command to the target fan with the identification information, and after receiving the first message returned by the target fan, sends the parameters to be upgraded and the corresponding parameter values to the target fan; enables the target fan to write the parameters to be upgraded and the corresponding parameter values into Flash, controls itself to power off and restart, and completes the upgrade of the target fan FW.
[0153] Step 5: The BMC sends a heartbeat signal to the CPLD every preset time. If the CPLD determines that it has not received the heartbeat signal sent by the BMC within the set time, it determines that the BMC heartbeat is abnormal and takes over the control of the target fan.
[0154] The order of the above steps 2, 3, 4 and 5 is not limited.
[0155] Embodiment 9:
[0156] Based on the same technical concept, on the basis of the above embodiments, the present application provides a fan control device. Fig. 9 A schematic diagram of the structure of a fan control device provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the device comprises:
[0157] A sending module 901, configured to send a data acquisition request to a target fan via a single bus connected to the target fan;
[0158] A receiving module 902, configured to receive the operating status data sent by the target fan via the single bus;
[0159] The analysis module 903 is used to determine whether the target fan fails according to the operating status data.
[0160] In a possible implementation manner, the analysis module 903 is specifically configured to determine whether the running status data corresponding to any status type exceeds a threshold corresponding to the status type; if so, it is determined that the target fan fails.
[0161] In a possible implementation, the receiving module 902 is specifically used to receive the operating status data sent by the microcontroller unit MCU of the target fan through the single bus; wherein the operating status data is collected by at least one sensor in the target fan and read and sent by the MCU.
[0162] In a possible implementation manner, the sending module 901 is further configured to send a self-asset data acquisition request to the target fan via a single bus connected to the target fan;
[0163] The receiving module 902 is also used to receive the self-asset information data sent by the MCU of the target fan; wherein the self-asset information data is the self-asset information data of the target fan stored in the field replaceable unit FRU in the target fan, which is read and sent by the MCU after receiving the self-asset data acquisition request.
[0164] In a possible implementation, the fan control device also includes a control module 904, which is used to receive the self-asset information data sent by the MCU of the target fan, and then control the target fan according to the rated speed in the self-asset information data so that the speed of the target fan reaches the rated speed.
[0165] In a possible implementation, the control module 904 is also used to receive an upgrade data packet; parse the upgrade data packet to obtain the identification information, parameters to be upgraded and corresponding parameter values of the target fan in the upgrade data packet; send an upgrade command to the target fan of the identification information, and after receiving a first message returned by the target fan, send the parameters to be upgraded and the corresponding parameter values to the target fan; enable the target fan to write the parameters to be upgraded and the corresponding parameter values into the non-volatile memory Flash, and control itself to power off and restart.
[0166] In a possible implementation, the receiving module 902 is further used to send an address read request to the target fan; if the bus identity identification number BUS ID returned by the target fan is not received, it is determined that the target fan is not in place; if the BUS ID returned by the target fan is received, it is determined whether the BUS ID of the target fan is consistent with the saved BUS ID of the target fan, if so, it is determined that the target fan is in place, if not, it is determined that the target fan is not in place.
[0167] Embodiment 10:
[0168] Based on the same technical concept, the present application also provides an electronic device, Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Fig.10As shown, it includes: a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004;
[0169] The memory 1003 stores a computer program. When the program is executed by the processor 1001, the processor 1001 performs the following steps:
[0170] Sending a data acquisition request to the target fan via a single bus connected to the target fan;
[0171] Receiving the operating status data sent by the target fan via the single bus;
[0172] Determine whether the target fan fails according to the operating status data.
[0173] In a possible implementation manner, the processor 1001 is specifically configured to determine whether the running status data corresponding to any status type exceeds a threshold corresponding to the status type, and if so, determine that the target fan fails.
[0174] In a possible implementation, the processor 1001 is specifically configured to receive, via the single bus, operating status data sent by the microcontroller unit MCU of the target fan; wherein the operating status data is collected by at least one sensor in the target fan and read and sent by the MCU.
[0175] In one possible implementation, the processor 1001 is also used to send a self-asset data acquisition request to the target fan through a single bus connected to the target fan; and receive self-asset information data sent by the MCU of the target fan; wherein the self-asset information data is the self-asset information data of the target fan stored in the field replaceable unit FRU in the target fan, which is read and sent by the MCU after receiving the self-asset data acquisition request.
[0176] In a possible implementation, the processor 1001 is further configured to, after receiving the self-asset information data sent by the MCU of the target fan, control the target fan according to the rated speed in the self-asset information data so that the speed of the target fan reaches the rated speed.
[0177] In a possible implementation, the processor 1001 is further used to receive an upgrade data packet; parse the upgrade data packet to obtain identification information of the target fan, parameters to be upgraded, and corresponding parameter values in the upgrade data packet; send an upgrade command to the target fan of the identification information, and after receiving a first message returned by the target fan, send the parameters to be upgraded and the corresponding parameter values to the target fan; enable the target fan to write the parameters to be upgraded and the corresponding parameter values into a non-volatile memory Flash, and control itself to power off and restart.
[0178] In a possible implementation, the processor 1001 is further used to send an address read request to the target fan; if the bus identity identification number BUS ID returned by the target fan is not received, it is determined that the target fan is not in place; if the BUS ID returned by the target fan is received, it is determined whether the BUS ID of the target fan is consistent with the saved BUS ID of the target fan, if so, it is determined that the target fan is in place, if not, it is determined that the target fan is not in place.
[0179] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0180] The communication interface 1002 is used for communication between the above electronic device and other devices.
[0181] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0182] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0183] Embodiment 11:
[0184] Based on the same technical concept, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program that can be executed by an electronic device. When the program runs on the electronic device, the electronic device implements any of the above embodiments when executing.
[0185] The above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in the electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc., optical storage such as CD, DVD, BD, HVD, etc., and semiconductor storage such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD), etc.
[0186] Based on the same technical concept, the embodiment of the present application also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any of the above embodiments. Since the principle of solving the problem by the above computer program product is similar to that of the fan control method, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.
[0187] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0188] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0189] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0190] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0191] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A fan control method, characterized in that: Applied to a baseboard management controller BMC, the method comprises: Sending a data acquisition request to the target fan via a single bus connected to the target fan; Receiving the operating status data sent by the target fan via the single bus; Determine whether the target fan fails according to the operating status data.
2. The method according to claim 1, characterized in that The step of determining whether the target fan fails according to the operating status data includes: It is determined whether the running status data corresponding to any status type exceeds a threshold value corresponding to the status type; if so, it is determined that the target fan fails.
3. The method according to claim 1, characterized in that The receiving, through the single bus, the operating status data sent by the target fan, comprises: The operating status data sent by the microcontroller unit MCU of the target fan is received through the single bus; wherein the operating status data is collected by at least one sensor in the target fan and read and sent by the MCU.
4. The method according to claim 1, characterized in that The method further comprises: Sending a self-asset data acquisition request to the target fan via a single bus connected to the target fan; Receive the self-asset information data sent by the MCU of the target fan; wherein the self-asset information data is the self-asset information data of the target fan stored in the field replaceable unit FRU of the target fan, which is read and sent by the MCU after receiving the self-asset data acquisition request.
5. The method according to claim 4, characterized in that After receiving the self-asset information data sent by the MCU of the target fan, the method further includes: The target fan is controlled according to the rated rotation speed in the asset information data so that the rotation speed of the target fan reaches the rated rotation speed.
6. The method according to claim 1, characterized in that The method further comprises: Receive upgrade data packets; Parsing the upgrade data packet to obtain identification information of the target fan, parameters to be upgraded, and corresponding parameter values in the upgrade data packet; Send an upgrade command to the target fan of the identification information, and after receiving the first message returned by the target fan, send the parameters to be upgraded and the corresponding parameter values to the target fan; make the target fan write the parameters to be upgraded and the corresponding parameter values into the non-volatile memory Flash, control itself to power off and restart.
7. The method according to claim 1, characterized in that The method further comprises: Sending an address read request to the target fan; If the bus identification number BUS ID returned by the target fan is not received, it is determined that the target fan is not in place; If the BUS ID returned by the target fan is received, it is determined whether the BUS ID of the target fan is consistent with the saved BUS ID of the target fan. If so, it is determined that the target fan is in place; if not, it is determined that the target fan is not in place.
8. A fan control device, characterized in that: The device comprises: A sending module, used for sending a data acquisition request to the target fan via a single bus connected to the target fan; A receiving module, used for receiving the running status data sent by the target fan through the single bus; The analysis module is used to determine whether the target fan fails according to the operating status data.
9. An electronic device, characterized in that: The electronic device comprises at least a processor and a memory, and the processor is used to implement the steps of the fan control method according to any one of claims 1 to 7 when executing a computer program stored in the memory.
10. A computer storage medium, characterized in that: It stores a computer program executable by an electronic device. When the program runs on the electronic device, the electronic device executes the steps of the fan control method according to any one of claims 1 to 7.