Method, device, medium and fan speed regulation system for adjusting fan speed
By working together with the baseboard management controller and complex programmable logic devices, and utilizing the first and second operating systems in different states, the fan speed can be flexibly adjusted according to the real-time ambient temperature and the presence of the network card. This solves the heat dissipation redundancy problem caused by fixed high fan speeds in servers, and achieves optimized resource utilization and noise reduction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR SUZHOU INTELLIGENT TECH CO LTD
- Filing Date
- 2024-01-31
- Publication Date
- 2026-06-23
AI Technical Summary
The fact that server fans run at a fixed high speed leads to redundant heat dissipation and wastes resources.
By working together with the baseboard management controller and complex programmable logic devices, the first and second operating systems can flexibly adjust the fan speed according to the real-time ambient temperature and network card availability under different states, thus avoiding heat dissipation redundancy.
While meeting heat dissipation requirements, it reduces power consumption and noise, avoids resource waste, and achieves intelligent control of fan speed.
Smart Images

Figure CN117846999B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of server technology, and more specifically to a method, apparatus, medium, and fan speed control system for adjusting fan speed. Background Technology
[0002] In the field of server technology, servers, as computers that provide computing resources, need to operate continuously for extended periods, causing heat to accumulate inside them. To ensure normal operation, servers are equipped with fans to dissipate this heat.
[0003] The Linux system of the Baseboard Management Controller (BMC) can directly transmit pulse width modulation (PWM) signals to the fan control board, or indirectly through a Complex Programmable Logic Device (CPLD). This allows the fan control board to control the fan's rotation based on the received PWM signals. When the Linux system of the BMC is not running, the CPLD typically transmits PWM signals to the fan control board, and the CPLD usually controls the fan to rotate at a fixed speed.
[0004] In related technologies, this fixed rotation speed is generally set to a relatively high value. This leads to redundant heat dissipation and waste of resources. Summary of the Invention
[0005] In view of this, the present invention provides a method, apparatus, medium and fan speed control system for adjusting fan speed to solve the problem of heat dissipation redundancy.
[0006] In a first aspect, the present invention provides a method for adjusting fan speed, the method being applied to a fan speed control system of a server, the fan speed control system comprising a baseboard management controller and a complex programmable logic device, wherein the baseboard management controller is equipped with a first operating system and a second operating system, the method being executed by the first operating system, the method comprising:
[0007] When the second operating system is detected to be in a non-boot state, it is determined whether at least one network card is present in the server;
[0008] When it is determined that at least one network card is in place, the fan is controlled to rotate at a speed corresponding to the first preset speed influence factor, according to the first preset speed influence factor.
[0009] Every first preset time interval, or when a startup command for the second operating system is detected, the real-time ambient temperature of the server and the real-time speed of the fan are obtained;
[0010] Based on the real-time ambient temperature, obtain the maximum fan speed corresponding to the real-time ambient temperature;
[0011] The fan speed is adjusted based on the maximum speed, the preset unit speed adjustment factor, and the real-time speed.
[0012] The method for adjusting fan speed provided by this invention has the following advantages:
[0013] With the second operating system in an unbooted state (including both cases where no boot command is detected and the system is booting after detecting a boot command), the first operating system determines how to adjust the fan speed based on the server's real-time ambient temperature and the fan's real-time speed. This adjustment, based on actual conditions, can meet heat dissipation requirements while avoiding heat redundancy issues. Furthermore, it can reduce power consumption, lower costs, and reduce noise.
[0014] In an optional implementation, when it is determined that no network interface card (NIC) is present, the method further includes:
[0015] Control the fan to stop rotating;
[0016] If a startup command for the second operating system is detected, the fan is controlled to rotate at a speed corresponding to the second preset speed influence factor, according to the second preset speed influence factor.
[0017] Every second preset time interval, the real-time ambient temperature of the server and the real-time speed of the fan are obtained;
[0018] Based on the real-time ambient temperature, obtain the maximum fan speed corresponding to the real-time ambient temperature;
[0019] The fan speed is adjusted based on the maximum speed, the preset unit speed adjustment factor, and the real-time speed.
[0020] Specifically, when no network interface card (NIC) is present and the second operating system is not booting, other components of the server are not processing data and do not require cooling. Therefore, keeping the fans off saves resources. When a boot command for the second operating system is received, it indicates that other components are about to perform related data processing and require cooling. The first operating system can determine how to adjust the fan speed based on the server's real-time ambient temperature and the real-time fan speed. This adjustment, based on actual conditions, can meet cooling requirements while avoiding the problem of redundant cooling.
[0021] In one optional implementation, adjusting the fan speed based on the maximum speed, the preset interval length, and the real-time speed includes:
[0022] The speed range is determined based on the maximum speed and the preset unit speed adjustment factor;
[0023] Determine whether the real-time rotational speed is within the specified range;
[0024] When it is determined that the real-time rotational speed is not within the specified range, the fan is controlled to adjust its rotational speed to the specified range.
[0025] Alternatively, when the real-time rotational speed is determined to be within the specified range, the fan is controlled to rotate at the real-time rotational speed.
[0026] Specifically, when the fan speed is too high, causing excessive heat dissipation, the first operating system can promptly reduce the fan speed to a suitable level. Conversely, when the fan speed is too low to meet the server's cooling requirements, the first operating system can promptly increase the fan speed to a suitable level. This ensures timely cooling of the fans while avoiding resource waste.
[0027] In an alternative implementation, before detecting a boot instruction for the second operating system, the method further includes:
[0028] A first signal is sent to the complex programmable logic device at a first preset period, wherein the first signal is used to inform the complex programmable logic device that the first operating system is in normal working state. When the complex programmable logic device does not receive the first signal in any period or multiple consecutive periods, the complex programmable logic device determines that the first operating system is in an abnormal state.
[0029] Specifically, if only the first operating system is configured to control the fans before the second operating system starts, it will be unable to perform fan control if the first operating system malfunctions. Therefore, a complex programmable logic device (CPL) is used to monitor the first operating system. This allows the CPL to take over fan control promptly when the first operating system experiences an anomaly, ensuring that the server's cooling requirements are met.
[0030] In an optional implementation, a proxy thread is established between the first operating system and the second operating system, and the method further includes:
[0031] The system receives a second signal sent by the second operating system, wherein the second signal is used to indicate that the second operating system has started normally, and the second operating system sends the second signal to the first operating system through the agent thread;
[0032] According to the second signal, control of the fan is transferred to the second operating system. After obtaining control of the fan, the second operating system controls the fan to rotate. The second operating system periodically sends a third signal to the first operating system through the agent thread. The second operating system periodically sends a fourth signal to the complex programmable logic device. The fourth signal is used to inform the complex programmable logic device that the second operating system is in normal working condition.
[0033] When the third signal is not received in any cycle or in multiple consecutive cycles, control over the fan is acquired.
[0034] Furthermore, the proxy thread periodically sends a fifth signal to the second operating system, wherein if the second operating system does not receive the fifth signal in any period or in multiple consecutive periods, it determines that the first operating system is abnormal.
[0035] Specifically, the complex programmable logic device (CPL) can be considered a backup control unit. If the CPL also malfunctions, it indicates that the entire server is inoperable and requires no cooling. Therefore, mutual monitoring between the first operating system, the second operating system, and the CPL ensures the normal operation of fan control and guarantees the cooling requirements of the fans.
[0036] Secondly, the present invention provides a method for adjusting fan speed, the method being applied to a fan speed control system of a server, the fan speed control system including a baseboard management controller and a complex programmable logic device (CPU), the baseboard management controller having a first operating system and a second operating system installed thereon, the method being executed by the CPU, the method comprising:
[0037] If no boot command for the second operating system is detected, and no target signal is received in any cycle or multiple consecutive cycles, the first operating system is determined to be in an abnormal state.
[0038] Detect whether at least one network interface card (NIC) is present in the server;
[0039] When at least one network card is in place, the fan is controlled to rotate at a speed corresponding to the first preset speed influence factor, according to the first preset speed influence factor.
[0040] Alternatively, when no network card is present, the fan can be controlled not to rotate.
[0041] The method for adjusting fan speed provided by this invention has the following advantages:
[0042] When the second operating system fails to boot and the first operating system malfunctions, the fan speed can be controlled by a complex programmable logic device (CPL). Furthermore, the CPL can adjust the fan speed based on the presence or absence of a network interface card (NIC). In the absence of a NIC, no cooling operation is performed, reducing heat dissipation redundancy and minimizing resource waste.
[0043] In an optional implementation, when a boot command for the second operating system is detected, the method further includes:
[0044] When it is determined that no network card is present, the fan is controlled to rotate at a speed corresponding to the second preset speed influence factor, according to the second preset speed influence factor.
[0045] Alternatively, when it is determined that at least one network card is in place, the fan is controlled to rotate at a speed corresponding to the third preset speed influence factor, wherein the speed corresponding to the second preset speed influence factor is less than the speed corresponding to the third preset speed influence factor.
[0046] Specifically, when the second operating system is booting up but not yet fully operational, if the first operating system malfunctions, complex programmable logic devices (CPLs) are required for regulation. In this situation, since other components will also begin operating after the second operating system boots up, the server will have cooling requirements. Furthermore, the level of cooling requirements varies depending on whether an in-situ network interface card (NIC) is present. Therefore, by using two different preset speed influence factors to regulate the fan speed, the fan speed can be adjusted according to the actual situation, avoiding the problem of redundant cooling.
[0047] Thirdly, the present invention provides a device for adjusting fan speed, the device being applied to a server fan speed control system, the fan speed control system including a baseboard management controller and the complex programmable logic device, the baseboard management controller having a first operating system and a second operating system installed, the device comprising:
[0048] The determination module is used to determine whether at least one network card is present in the server when the second operating system is detected to be in an unbooted state;
[0049] The control module is used to control the fan to rotate at a speed corresponding to the first preset speed influence factor when it is determined that at least one network card is in place.
[0050] The acquisition module is used to acquire the real-time ambient temperature of the server and the real-time speed of the fan every first preset time interval, or when a startup command for the second operating system is detected; and to acquire the maximum speed of the fan corresponding to the real-time ambient temperature based on the real-time ambient temperature.
[0051] The adjustment module is used to adjust the fan speed based on the maximum speed, the preset interval length, and the real-time speed.
[0052] Fourthly, the present invention provides a device for adjusting fan speed, the device being applied to a server fan speed control system, the fan speed control system including a baseboard management controller and the complex programmable logic device, the baseboard management controller having a first operating system and a second operating system installed, the device comprising:
[0053] The determination module is used to determine that the first operating system is in an abnormal state when no boot command for the second operating system is detected and no target signal is received in any cycle or multiple consecutive cycles.
[0054] The detection module is used to detect whether at least one network card is present in the server;
[0055] The control module is configured to control the fan to rotate at a speed corresponding to the first preset speed influence factor when at least one network card is present; or to control the fan not to rotate when no network card is present.
[0056] Fifthly, the present invention provides a fan speed control system, the fan speed control system comprising a baseboard management controller and a complex programmable logic device (FPGA), wherein the baseboard management controller is equipped with a first operating system and a second operating system, wherein the first operating system is used to execute the method for adjusting fan speed described in the first aspect or any corresponding embodiment thereof, and the complex programmable logic device is used to execute the method for adjusting fan speed described in the second aspect or any corresponding embodiment thereof.
[0057] In a sixth aspect, the present invention provides a computer-readable storage medium storing computer instructions for causing a baseboard management controller to perform the method for adjusting fan speed described in the first aspect or any corresponding embodiment thereof.
[0058] In a seventh aspect, the present invention provides a computer-readable storage medium storing computer instructions for causing a complex programmable logic device to perform the method for adjusting fan speed described in the second aspect or any corresponding embodiment thereof. Attached Figure Description
[0059] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of the present invention, the drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0060] Figure 1 This is a schematic diagram of the architecture of a fan speed control system according to an embodiment of the present invention;
[0061] Figure 2 This is a flowchart illustrating a method for adjusting fan speed executed by a first operating system according to an embodiment of the present invention;
[0062] Figure 3 This is a flowchart illustrating another method for adjusting fan speed executed by a first operating system according to an embodiment of the present invention;
[0063] Figure 4 This is a flowchart illustrating a method for adjusting fan speed executed by a complex programmable logic device according to an embodiment of the present invention;
[0064] Figure 5 This is a flowchart illustrating another method for adjusting fan speed executed by a complex programmable logic device according to an embodiment of the present invention;
[0065] Figure 6This is a schematic diagram illustrating the change in the main body of fan control according to an embodiment of the present invention;
[0066] Figure 7 This is a structural block diagram of a device for adjusting fan speed according to an embodiment of the present invention;
[0067] Figure 8 This is a structural block diagram of another device for adjusting fan speed according to an embodiment of the present invention;
[0068] Figure 9 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0069] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0070] This invention provides a fan speed control system, such as... Figure 1 As shown, a fan speed control system is configured in the server to perform heat dissipation. This system may include a Baseboard Management Controller (BMC) and a Complex Programmable Logic Device (CPLD). The BMC may contain a first operating system and a second operating system. The boot speed of the first operating system may be greater than that of the second. The first operating system may be a Real-Time Operating System (RTOS), and the second operating system may be a Linux system. The second operating system primarily performs relevant business operations and, after booting, needs to cooperate with various server components to complete these operations.
[0071] This invention provides a method for adjusting fan speed by loading a first operating system into a basic management controller, thereby flexibly controlling the fan speed through the first operating system to reduce the problem of resource waste.
[0072] According to an embodiment of the present invention, a method for adjusting fan speed is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0073] This invention provides a method for adjusting fan speed, which can be used in the aforementioned first operating system. Figure 2 This is a flowchart of a method for adjusting fan speed according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0074] Step S201: When the second operating system is detected to be in an unbooted state, determine whether at least one network card is present in the server.
[0075] Specifically, when the server is detected to be in Alternating Current (AC) state, i.e., in S5 state (i.e., the second operating system is not booted), there may be a network interface card (NIC) present in the server. Since the NIC is active in S5 state and requires cooling, while other components are not active and do not require cooling, it is necessary to first check if a NIC is present in the server and then determine how to control the fan rotation for cooling based on the NIC's presence.
[0076] Step S202: When it is determined that at least one network card is in place, the fan is controlled to rotate at a speed corresponding to the first preset speed influence factor, according to the first preset speed influence factor.
[0077] The first preset speed influence factor can be the duty cycle, for example, the duty cycle can be 10%.
[0078] Specifically, when at least one network interface card (NIC) is present in the server, it indicates that the server requires cooling. Therefore, the first operating system can first power on the fan, then adjust the duty cycle of the pulse width modulation (PWM) signal according to a first preset speed influence factor, and output a PWM signal with the adjusted duty cycle. Upon receiving the PWM signal, the fan controls itself to rotate at a speed corresponding to the first preset speed influence factor. Alternatively, the first operating system can send a control command to a complex programmable logic controller (CPL) device, carrying the first preset speed factor. Upon receiving the control command, the CPL device obtains the first preset speed factor and adjusts the duty cycle of the PWM signal accordingly, outputting a PWM signal with the adjusted duty cycle. Upon receiving the PWM signal, the fan controls itself to rotate at a speed corresponding to the first preset speed influence factor.
[0079] Step S203: Every first preset time interval, or when a boot command for the second operating system is detected, the real-time ambient temperature and real-time fan speed of the server are obtained.
[0080] The first preset duration can be 20 seconds.
[0081] Specifically, the first operating system can acquire temperature values from various temperature sensors on the server every first preset time interval, and average the acquired multiple temperature values to obtain the server's real-time ambient temperature.
[0082] Alternatively, when the first operating system detects a boot command for the second operating system, the server will enter a Direct Current (DC) state, meaning the server is transitioning from state S5 to state S0. Since the second operating system is booting up, other components of the server will also be performing related data processing, requiring heat dissipation. Therefore, in this case, it is also necessary to obtain the server's real-time ambient temperature and fan speed in the manner described above, so that the first operating system can flexibly control the fan speed according to the actual situation.
[0083] Step S204: Obtain the maximum fan speed corresponding to the real-time ambient temperature.
[0084] Specifically, the first operating system may store a first correspondence table between ambient temperature and maximum speed, or a first relational function between ambient temperature and maximum speed, wherein the ambient temperature and maximum speed are proportional. Furthermore, the first operating system can determine the maximum speed corresponding to the real-time ambient temperature from the first correspondence table. Alternatively, the real-time ambient temperature can be input into the first relational function to obtain the maximum speed corresponding to the real-time ambient temperature. Both the first correspondence table and the first relational function are applicable when an in-situ network card is present.
[0085] Step S205: Adjust the fan speed according to the maximum speed, the preset unit speed adjustment factor, and the real-time speed.
[0086] The preset unit speed adjustment factor can be the duty cycle, for example, it can be 5%.
[0087] Specifically, the first operating system can determine the target speed based on the real-time rotational speed and a preset unit rotational speed adjustment factor. Then, the first operating system can determine the absolute value of the difference between the target speed and the maximum rotational speed. Finally, the first operating system can determine a specific heat dissipation strategy based on the magnitude of the difference between the target speed and the maximum rotational speed, the absolute value of the difference, and a preset threshold.
[0088] First, when the target speed is determined to be less than the maximum speed and the absolute value of the difference between the target speed and the maximum speed is greater than the preset threshold, it means that the real-time fan speed is far from meeting the current heat dissipation requirements of the server, and the fan speed can be directly increased to the maximum speed.
[0089] Second, when the target speed is determined to be less than the maximum speed and the absolute value of the difference between the target speed and the maximum speed is less than or equal to the preset threshold, it means that the real-time fan speed can basically meet the current heat dissipation needs of the server, and the fan speed can be increased to the speed corresponding to the preset unit speed adjustment factor.
[0090] Third, when the target speed is determined to be equal to the maximum speed, the fan speed is not adjusted.
[0091] Fourth, if the target speed is determined to be greater than the maximum speed, it means that directly increasing the speed to the target speed may cause heat dissipation redundancy. Therefore, the fan speed can be adjusted to the maximum speed first.
[0092] The method for adjusting fan speed provided in this embodiment of the invention, when the second operating system is not started (including the two situations of no startup command being detected or the startup command being detected and the system is starting), determines how to adjust the fan speed next based on the real-time ambient temperature of the server and the real-time fan speed through the first operating system. In this way, the adjustment can meet the heat dissipation requirements while avoiding the problem of heat dissipation redundancy. Furthermore, it can reduce power consumption, reduce costs, and reduce noise.
[0093] This invention provides a method for adjusting fan speed, which can be used in the aforementioned first operating system. Figure 3 This is a flowchart of a method for adjusting fan speed according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0094] Step S301: When the second operating system is detected to be in an unbooted state, determine whether at least one network card is present in the server.
[0095] Step S302: When it is determined that at least one network card is in place, the fan is controlled to rotate at a speed corresponding to the first preset speed influence factor, according to the first preset speed influence factor.
[0096] Step S303: Every first preset time interval, or when a boot command for the second operating system is detected, the real-time ambient temperature and real-time fan speed of the server are obtained.
[0097] The specific processing of steps S301 to S303 can be similar to that of steps S201 to S203, and will not be repeated here.
[0098] Step S304: Obtain the maximum fan speed corresponding to the real-time ambient temperature.
[0099] Step S305: Adjust the fan speed according to the maximum speed, the preset unit speed adjustment factor, and the real-time speed.
[0100] Specifically, step S305 above may include:
[0101] Step S3051: Determine the speed range based on the maximum speed and the preset unit speed adjustment factor.
[0102] Specifically, the first operating system can first subtract the speed corresponding to the preset unit speed adjustment factor from the maximum speed to obtain the speed range.
[0103] Step S3052: Determine whether the real-time rotational speed is within the rotational speed range.
[0104] Step S3053: When it is determined that the real-time speed is not within the speed range, control the fan to adjust the speed to the speed range.
[0105] Step S3054: When it is determined that the real-time speed is within the speed range, control the fan to rotate at the real-time speed.
[0106] Specifically, the first operating system can determine whether the real-time fan speed is within the specified range. If it is, it means that the real-time fan speed meets the current cooling requirements of the server and no adjustment is needed. If it is not, it means that the real-time fan speed does not meet the current cooling requirements of the server and the fan speed can be adjusted directly to the specified range.
[0107] Step S306: When it is determined that no network card is present, control the fan not to rotate.
[0108] Specifically, when there is no network card in place and the secondary operating system is not running, other components of the server are not processing data and do not require cooling. Therefore, the fan does not need to be powered on at this time.
[0109] Step S307: If a startup command for the second operating system is detected, the fan is controlled to rotate at a speed corresponding to the second preset speed influence factor, according to the second preset speed influence factor.
[0110] The second preset speed influence factor can be the duty cycle.
[0111] Specifically, when a boot command for the second operating system is received, it indicates that other components are about to perform related data processing and require heat dissipation. Furthermore, since the fan has not been running previously, upon detecting the boot command for the second operating system, the fan can be controlled to rotate at a speed corresponding to the second preset speed influence factor.
[0112] Step S308: Every second preset time interval, obtain the server's real-time ambient temperature and the fan's real-time speed.
[0113] The second preset duration can be the same as or different from the first preset duration; for example, it can be 20 seconds.
[0114] Step S309: Obtain the maximum fan speed corresponding to the real-time ambient temperature.
[0115] The specific processing of steps S308 to S309 is similar to that of steps S203 to S204, and will not be described in detail here.
[0116] Step S310: Adjust the fan speed according to the maximum speed, the preset unit speed adjustment factor, and the real-time speed.
[0117] The specific processing of step S310 can be similar to that of step S205 or step S305, and will not be described in detail here.
[0118] The fan speed adjustment method provided in this embodiment of the invention can promptly reduce the fan speed to a suitable level when the fan speed is too high, causing heat dissipation redundancy. Conversely, it can promptly increase the fan speed to a suitable level when the fan speed is too low to meet the server's heat dissipation requirements. This ensures timely heat dissipation from the fan while avoiding resource waste.
[0119] This invention provides a method for adjusting fan speed, which can be used in the aforementioned complex programmable logic devices. Figure 4 This is a flowchart of a method for adjusting fan speed according to an embodiment of the present invention, such as... Figure 4 As shown, the process includes the following steps:
[0120] Step S401: If no boot command for the second operating system is detected, and no target signal is received in any cycle or multiple consecutive cycles, it is determined that the first operating system is in an abnormal state.
[0121] The target signal can be used to indicate that the first operating system is in a normal working state; for example, it can be a watchdog timer (WDT) signal.
[0122] Specifically, under normal operating conditions, the first operating system can periodically send target signals to the complex programmable logic device (CPLD) according to a first preset cycle. If the CPLD fails to receive the target signal in any cycle or multiple consecutive cycles before detecting a startup command from the second operating system, it can be determined that the first operating system is in an abnormal state. At this time, the CPLD can acquire control of the fan.
[0123] Step S402: Detect whether at least one network card is present in the server.
[0124] Specifically, since the second operating system is not currently running, components other than the network card do not perform any related operations. The complex programmable logic device (CLP) can first detect whether a network card is present in the server, and based on this, determine how to control the fan speed. If a network card is present, it indicates that cooling is needed; if no network card is present, it indicates that cooling is not required.
[0125] Step S403: When at least one network card is in place, the fan is controlled to rotate at a speed corresponding to the third preset speed influence factor, according to the third preset speed influence factor.
[0126] The third preset rotational speed influence factor can be the duty cycle.
[0127] Specifically, if it is determined that a network card is present, it means that the server needs heat dissipation. At this time, the complex programmable logic device can obtain a third preset speed influence factor and control the fan to rotate at the speed corresponding to the third preset speed influence factor.
[0128] Step S404: When no network card is present, control the fan not to rotate.
[0129] Specifically, when it is determined that there is no network card in place, it means that the server does not need heat dissipation, and the complex programmable logic device can control the fan not to turn.
[0130] The method for adjusting fan speed provided in this invention allows for fan speed control by a complex programmable logic device (CPL) when the second operating system is not started and the first operating system malfunctions. Furthermore, the CPL can adjust the fan speed based on the presence or absence of a network interface card (NIC). In the absence of a NIC, no cooling operation is performed, reducing heat dissipation redundancy and minimizing resource waste.
[0131] This invention provides a method for adjusting fan speed, which can be used in the aforementioned complex programmable logic devices. Figure 5 This is a flowchart of a method for adjusting fan speed according to an embodiment of the present invention, such as... Figure 5 As shown, the process includes the following steps:
[0132] Step S501: If no boot command for the second operating system is detected, and no target signal is received in any cycle or multiple consecutive cycles, it is determined that the first operating system is in an abnormal state.
[0133] Step S502: Detect whether at least one network card is present in the server.
[0134] Step S503: When at least one network card is in place, the fan is controlled to rotate at a speed corresponding to the third preset speed influence factor, according to the third preset speed influence factor.
[0135] Step S504: When no network card is present, control the fan not to rotate.
[0136] The specific processing of steps S501 to S504 can be similar to that of steps S401 to S404, and will not be repeated here.
[0137] In step S505, when a boot command for the second operating system is detected and it is determined that no network card is present, the fan is controlled to rotate at a speed corresponding to the fourth preset speed influence factor.
[0138] The fourth preset speed influence factor can be the duty cycle, for example, it can be 45%.
[0139] Specifically, when a boot command for the second operating system is detected, it indicates that the second operating system is starting up. Since the second operating system is booting up, other components of the server will also perform related data processing, requiring heat dissipation. Furthermore, the presence or absence of a network interface card (NIC) indicates the level of the server's heat dissipation requirements; that is, the presence of a NIC indicates higher heat dissipation requirements, while the absence of a NIC indicates lower heat dissipation requirements. Therefore, when it is determined that a NIC is not present, the complex programmable logic device (CPL) can obtain the corresponding fourth preset speed influence factor for that situation and control the fan to rotate at the speed corresponding to the fourth preset speed influence factor.
[0140] Step S506: When a boot command for the second operating system is detected, and when it is determined that at least one network card is in place, the fan is controlled to rotate at a speed corresponding to the fifth preset speed influence factor, based on the fifth preset speed influence factor.
[0141] The fifth preset speed influence factor can be a duty cycle, for example, 60%. The speed corresponding to the fourth preset speed influence factor is lower than the speed corresponding to the fifth preset speed influence factor.
[0142] Specifically, when a network card is found to be in place, the complex programmable logic device can obtain the fifth preset speed influence factor corresponding to that situation and control the fan to rotate at the speed corresponding to the fifth preset speed influence factor.
[0143] The method for adjusting fan speed provided in this invention addresses the issue of complex programmable logic devices (CPLs) being used to regulate the fan speed when the second operating system is starting up but not yet fully operational, in the event of an anomaly in the first operating system. In this situation, other components will also begin operating after the second operating system starts, creating a heat dissipation requirement for the server. Furthermore, the level of heat dissipation demand varies depending on whether a network interface card (NIC) is present. Therefore, by using two different preset speed influence factors to regulate the fan speed, the fan speed can be adjusted according to the actual situation, avoiding the problem of redundant heat dissipation.
[0144] As can be seen from the above four embodiments, this solution, through the cooperation between the first operating system, the second operating system, and the complex programmable logic device, flexibly adjusts the fan speed according to the specific situation of the server. Figure 6 This demonstrates the changes in the entity responsible for regulating fan speed under different server states.
[0145] First, it transformed from a primary operating system into a complex programmable logic device.
[0146] When the second operating system is not started, the first operating system adjusts the fan speed according to its own heat dissipation strategy (specifically as shown in steps S201 to S205 or steps S301 to S310). Under normal operating conditions, the first operating system can periodically send a first signal to the complex programmable logic device (CPLD), which can periodically receive the first signal. The first signal informs the CPLD that the first operating system is in normal operating condition. When the CPLD fails to receive this signal for one cycle or multiple consecutive cycles, it can be determined that the first operating system has malfunctioned and cannot control the fan. Therefore, the CPLD can take over control of the fan and adjust its speed according to its stored heat dissipation strategy (specifically as shown in steps S401 to S404).
[0147] Since complex programmable logic devices (CPLs) are fundamental components of servers, their malfunction indicates that the server cannot operate. Therefore, CPLs can be used as replacement fans after the first operating system sends an error.
[0148] Second, it changed from the first operating system to the second operating system.
[0149] After the second operating system boots normally, assuming the first operating system did not experience any abnormalities and the proxy thread between the first and second operating systems is also functioning normally, the first operating system can receive a second signal from the second operating system through the proxy thread. This second signal indicates that the second operating system has booted normally. At this point, the first operating system can confirm that the second operating system has booted normally.
[0150] Since the second operating system is an existing operating system on the baseboard management controller, used for performing relevant business processing, and technicians can perform related operations through the second operating system's network interface, such as adjusting the fan speed in this solution, the first operating system can transfer fan control to the second operating system as long as it can start normally. This avoids the problem of both operating systems performing data processing, which would lead to a heavy load on the baseboard management controller, and also allows technicians to actively adjust the fan speed.
[0151] Third, it transforms from a complex programmable logic device into a second operating system.
[0152] In the event of a malfunction in the first operating system, fan control was performed by the complex programmable logic device (CPL). After the second operating system boots up, it can send a boot signal to the CPL. Upon receiving this boot signal, the CPL can stop controlling the fan, and the second operating system can then perform fan control according to its own cooling strategy.
[0153] Fourth, it changes from a second operating system to a first operating system.
[0154] When the second operating system is functioning normally, it can periodically send a third signal to the first operating system via a proxy thread. If neither the second nor the proxy thread malfunctions, the first operating system can normally receive the third signal. If the first operating system fails to receive the third signal in any cycle or for several consecutive cycles, it indicates that either the second operating system or the proxy thread has malfunctioned. If the second operating system malfunctions, the first operating system can regain control of the fan via the proxy thread.
[0155] Fifth, it transforms from a secondary operating system into a complex programmable logic device.
[0156] If only the proxy thread malfunctions and the second operating system is still functioning normally, the complex programmable logic device (CPLD) can still receive the fourth signal (i.e., the target signal) from the second operating system, and the CPLD can determine that the second operating system is functioning normally.
[0157] If both the proxy thread and the second operating system malfunction, the first operating system will be unable to acquire control of the fan. This solution offers two methods to handle this situation. First, only the operating system that has acquired fan control can send a WDT signal to the complex programmable logic controller (CPL). In this case, a mechanism can be implemented on the CPL that allows it to take over fan control if it hasn't received a control command from the baseboard management controller within a preset time, and then adjust the fan according to its own cooling strategy. It's important to note that this mechanism requires cutting off the control path from the baseboard management controller to the fan, retaining only the path from the baseboard management controller to the CPL and then to the fan, to ensure that only one entity has fan control at a time. This avoids both operating systems sending WDT signals, saving resources. Second, both the first and second operating systems can send WDT signals to the CPL as long as they are functioning normally. In this case, the CPL can accurately determine whether each operating system is functioning correctly, and only takes over fan control when both operating systems are confirmed to be malfunctioning.
[0158] For example, if an abnormality such as refresh or hang occurs again after the second operating system has been started for the first time, the complex programmable logic device can continuously detect for 10 seconds whether the second operating system is still in an abnormal state. If so, it will take over the control of the fan and control the fan to rotate with a duty cycle of 90%.
[0159] If both the first and second operating systems malfunction simultaneously, or if the first operating system, the second operating system, and the agent thread all malfunction, the complex programmable logic controller (CPL) can take over control of the fan and perform control operations on the fan, whether through target signals or control instructions.
[0160] In some alternative implementations, the first operating system may periodically send a fifth signal to the second operating system via a proxy thread. The second operating system determines that the first operating system is malfunctioning if it fails to receive the fifth signal in any period or for several consecutive periods.
[0161] In some optional implementations, the baseboard management controller can restart the second operating system after an anomaly occurs. Similarly, the baseboard management controller can also restart the first operating system after an anomaly occurs.
[0162] The following is a brief explanation of the heat dissipation strategy for the second operating system.
[0163] The second operating system can specifically regulate the fan speed using a Proportional Integral-Derivative (PID) control algorithm. The PID algorithm can be a positional PID algorithm or an incremental PID algorithm. For example, a PID control algorithm can specifically use the following expression:
[0164]
[0165] Where u(t) represents the control quantity output by the basic management controller at time t, Kp is the preset proportional coefficient, Ki is the preset integral coefficient, Kd is the preset derivative coefficient, and e(t) is the difference between the control quantity input by the basic management controller at time t and the preset control quantity threshold. Specifically, the output control quantity can be the amplitude of the output PWM signal, and the input control quantity can be the amplitude of the PWM signal fed back by the fan at the previous moment.
[0166] This invention also provides a device for adjusting fan speed, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0167] This invention provides a device for adjusting fan speed, such as... Figure 7 As shown, it includes:
[0168] The determination module 701 is used to determine whether at least one network card is present in the server when the second operating system is detected to be in an unbooted state.
[0169] The control module 702 is used to control the fan to rotate at a speed corresponding to the first preset speed influence factor when it is determined that at least one network card is in place.
[0170] The acquisition module 703 is used to acquire the real-time ambient temperature and real-time fan speed of the server every first preset time interval, or when a boot command for the second operating system is detected; and to acquire the maximum fan speed corresponding to the real-time ambient temperature based on the real-time ambient temperature.
[0171] The adjustment module 704 is used to adjust the fan speed based on the maximum speed, the preset range length, and the real-time speed.
[0172] In some alternative implementations, the control module 702 is further configured to:
[0173] When it is determined that no network card is present, the fan will not rotate.
[0174] If a startup command for the second operating system is detected, the fan is controlled to rotate at a speed corresponding to the second preset speed influence factor, according to the second preset speed influence factor.
[0175] Every second preset time interval, obtain the server's real-time ambient temperature and the fan's real-time speed;
[0176] Based on the real-time ambient temperature, obtain the maximum fan speed corresponding to the real-time ambient temperature;
[0177] The fan speed is adjusted based on the maximum speed, the preset unit speed adjustment factor, and the real-time speed.
[0178] In some alternative implementations, adjustment module 704 is used to:
[0179] The speed range is determined based on the maximum speed and the preset unit speed adjustment factor;
[0180] Determine if the real-time rotational speed is within the specified range;
[0181] When it is determined that the real-time speed is not within the speed range, control the fan to adjust the speed to the range.
[0182] Alternatively, when the real-time speed is determined to be within the speed range, the fan can be controlled to rotate at the real-time speed.
[0183] In some alternative embodiments, the device further includes a transmitting module 705, which is used for:
[0184] Before detecting a boot command for the second operating system, a first signal is sent to the complex programmable logic device at a first preset cycle. The first signal is used to inform the complex programmable logic device that the first operating system is in normal working condition. When the complex programmable logic device does not receive the first signal in any cycle or multiple consecutive cycles, the complex programmable logic device determines that the first operating system is in an abnormal state.
[0185] In some alternative implementations, a proxy thread is established between the first operating system and the second operating system, and the apparatus further includes a receiving module 706 and a handover module 707:
[0186] The receiving module 706 is used to receive a second signal sent by the second operating system, wherein the second signal is used to indicate that the second operating system has started normally, and the second operating system sends the second signal to the first operating system through a proxy thread;
[0187] The handover module 707 is used to hand over control of the fan to the second operating system according to the second signal. After obtaining control of the fan, the second operating system controls the fan to rotate. The second operating system also periodically sends a third signal to the first operating system through a proxy thread and periodically sends a fourth signal to the complex programmable logic device. The fourth signal is used to inform the complex programmable logic device that the second operating system is in normal working condition.
[0188] The acquisition module 703 is used to acquire control of the fan when no third signal is received in any cycle or multiple consecutive cycles.
[0189] The sending module 705 is used to periodically send a fifth signal to the second operating system through a proxy thread. If the second operating system does not receive the fifth signal in any period or in multiple consecutive periods, it determines that the first operating system is abnormal.
[0190] This invention also provides a device for adjusting fan speed, such as... Figure 8 As shown, it includes:
[0191] The determination module 801 is used to determine that the first operating system is in an abnormal state when no boot command for the second operating system is detected and no target signal is received in any cycle or multiple consecutive cycles.
[0192] Detection module 802 is used to detect whether at least one network card is present in the server;
[0193] The control module 803 is used to control the fan to rotate at a speed corresponding to the first preset speed influence factor when at least one network card is present; or to control the fan not to rotate when no network card is present.
[0194] In some alternative implementations, the detection module 802 is further configured to:
[0195] When a boot command for the second operating system is detected, and when it is determined that no network card is present, the fan is controlled to rotate at a speed corresponding to the second preset speed influence factor, based on the second preset speed influence factor.
[0196] Alternatively, when a boot command for the second operating system is detected, and when it is determined that at least one network card is present, the fan is controlled to rotate at a speed corresponding to the third preset speed influence factor, based on the third preset speed influence factor, wherein the speed corresponding to the second preset speed influence factor is less than the speed corresponding to the third preset speed influence factor.
[0197] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0198] In the embodiments of the present invention, the device for adjusting the fan speed is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.
[0199] This invention also provides a computer device having the above-described features. Figure 7 and Figure 8 The device shown is for adjusting the fan speed.
[0200] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 9 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 9 Take a processor 10 as an example.
[0201] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0202] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0203] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0204] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0205] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0206] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0207] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for adjusting fan speed, characterized in that, The method is applied to a server fan speed control system, which includes a baseboard management controller and a complex programmable logic device (CPL). The baseboard management controller is equipped with a first operating system and a second operating system. An agent thread is established between the first and second operating systems. The method is executed by the first operating system and includes: When the second operating system is detected to be in a non-boot state, it is determined whether at least one network card is present in the server; When it is determined that at least one network card is in place, the fan is controlled to rotate at a speed corresponding to the first preset speed influence factor, according to the first preset speed influence factor. Every first preset time interval, or when a startup command for the second operating system is detected, the real-time ambient temperature of the server and the real-time speed of the fan are obtained; Based on the real-time ambient temperature, obtain the maximum fan speed corresponding to the real-time ambient temperature; The fan speed is adjusted based on the maximum speed, the preset unit speed adjustment factor, and the real-time speed. The system receives a second signal sent by the second operating system, wherein the second signal is used to indicate that the second operating system has started normally, and the second operating system sends the second signal to the first operating system through the agent thread; According to the second signal, control of the fan is transferred to the second operating system. After obtaining control of the fan, the second operating system controls the fan to rotate. The second operating system periodically sends a third signal to the first operating system through the agent thread. The second operating system periodically sends a fourth signal to the complex programmable logic device. The fourth signal is used to inform the complex programmable logic device that the second operating system is in normal working condition. When the third signal is not received in any cycle or in multiple consecutive cycles, the first operating system acquires control of the fan. Furthermore, the proxy thread periodically sends a fifth signal to the second operating system, wherein if the second operating system does not receive the fifth signal in any period or in multiple consecutive periods, it determines that the first operating system is abnormal.
2. The method according to claim 1, characterized in that, When it is determined that no network interface card (NIC) is present, the method further includes: Control the fan to stop rotating; If a startup command for the second operating system is detected, the fan is controlled to rotate at a speed corresponding to the second preset speed influence factor, according to the second preset speed influence factor. Every second preset time interval, the real-time ambient temperature of the server and the real-time speed of the fan are obtained; Based on the real-time ambient temperature, obtain the maximum fan speed corresponding to the real-time ambient temperature; The fan speed is adjusted based on the maximum speed, the preset unit speed adjustment factor, and the real-time speed.
3. The method according to claim 1 or 2, characterized in that, The step of adjusting the fan speed based on the maximum speed, the preset range length, and the real-time speed includes: The speed range is determined based on the maximum speed and the preset unit speed adjustment factor; Determine whether the real-time rotational speed is within the specified range; When it is determined that the real-time rotational speed is not within the specified range, the fan is controlled to adjust its rotational speed to the specified range. Alternatively, when the real-time rotational speed is determined to be within the specified range, the fan is controlled to rotate at the real-time rotational speed.
4. The method according to claim 1 or 2, characterized in that, Before detecting a boot instruction for the second operating system, the method further includes: A first signal is sent to the complex programmable logic device at a first preset period, wherein the first signal is used to inform the complex programmable logic device that the first operating system is in normal working state. When the complex programmable logic device does not receive the first signal in any period or multiple consecutive periods, the complex programmable logic device determines that the first operating system is in an abnormal state.
5. A method for adjusting fan speed, characterized in that, The method is applied to a server fan speed control system, the fan speed control system including a baseboard management controller and a complex programmable logic device (CPU). The baseboard management controller is equipped with a first operating system and a second operating system. The method is executed by the CPU and includes: If no boot command for the second operating system is detected, and no target signal is received in any cycle or multiple consecutive cycles, the first operating system is determined to be in an abnormal state. The target signal is used to inform the complex programmable logic device that the first operating system is in a normal working state, and the target signal is a signal sent by the first operating system to the complex programmable logic device according to a first preset cycle. Detect whether at least one network interface card (NIC) is present in the server; When at least one network card is in place, the fan is controlled to rotate at a speed corresponding to the first preset speed influence factor, according to the first preset speed influence factor. Alternatively, when no network card is present, the fan can be controlled not to rotate.
6. The method according to claim 5, characterized in that, When a boot instruction for the second operating system is detected, the method further includes: When it is determined that no network card is present, the fan is controlled to rotate at a speed corresponding to the second preset speed influence factor, according to the second preset speed influence factor. Alternatively, when it is determined that at least one network card is in place, the fan is controlled to rotate at a speed corresponding to the third preset speed influence factor, wherein the speed corresponding to the second preset speed influence factor is less than the speed corresponding to the third preset speed influence factor.
7. A fan speed control system for a server, characterized in that, The fan speed control system includes a baseboard management controller and a complex programmable logic device. The baseboard management controller is equipped with a first operating system and a second operating system. The first operating system is used to execute the method according to any one of claims 1 to 4, and the complex programmable logic device is used to execute the method according to claim 5 or 6.
8. A device for adjusting fan speed, characterized in that, The device is applied to the fan speed control system of the server as described in claim 7, the fan speed control system including a baseboard management controller and a complex programmable logic device, the baseboard management controller having a first operating system and a second operating system installed thereon, and an agent thread being established between the first operating system and the second operating system, the device comprising: The determination module is used to determine whether at least one network card is present in the server when the second operating system is detected to be in an unbooted state; The control module is used to control the fan to rotate at a speed corresponding to the first preset speed influence factor when it is determined that at least one network card is in place. The acquisition module is used to acquire the real-time ambient temperature of the server and the real-time speed of the fan every first preset time interval, or when a startup command for the second operating system is detected; and to acquire the maximum speed of the fan corresponding to the real-time ambient temperature based on the real-time ambient temperature. The adjustment module is used to adjust the fan speed according to the maximum speed, the preset range length, and the real-time speed; A receiving module is configured to receive a second signal sent by the second operating system, wherein the second signal is used to indicate that the second operating system has started normally, and the second operating system sends the second signal to the first operating system through the proxy thread; The handover module is used to transfer control of the fan to the second operating system according to the second signal. After obtaining control of the fan, the second operating system controls the fan to rotate. The second operating system periodically sends a third signal to the first operating system through the agent thread. The second operating system periodically sends a fourth signal to the complex programmable logic device. The fourth signal is used to inform the complex programmable logic device that the second operating system is in normal working condition. The acquisition module is used to enable the first operating system to acquire control of the fan when the third signal is not received in any cycle or in multiple consecutive cycles. The sending module is used to periodically send a fifth signal to the second operating system through the proxy thread, wherein the second operating system determines that the first operating system is abnormal if it does not receive the fifth signal in any period or in multiple consecutive periods.
9. A device for adjusting fan speed, characterized in that, The device is applied to the fan speed control system of the server as described in claim 7, the fan speed control system comprising a baseboard management controller and a complex programmable logic device, wherein the baseboard management controller is equipped with a first operating system and a second operating system, and the device comprises: The determination module is used to determine that the first operating system is in an abnormal state when no boot instruction for the second operating system is detected and no target signal is received in any cycle or multiple consecutive cycles. The target signal is used to inform the complex programmable logic device that the first operating system is in a normal working state, and the target signal is a signal sent by the first operating system to the complex programmable logic device according to a first preset cycle. The detection module is used to detect whether at least one network card is present in the server; The control module is configured to control the fan to rotate at a speed corresponding to the first preset speed influence factor when at least one network card is present; or to control the fan not to rotate when no network card is present.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the board management controller to perform the method of adjusting fan speed as described in any one of claims 1 to 4, or for causing the complex programmable logic device to perform the method of adjusting fan speed as described in claim 5 or 6.