A method, device and storage medium for adjusting single board fan
The method and device for adjusting single-board fans in white box switches dynamically adjust fan speeds based on monitored data to enhance heat dissipation and automate fault detection, addressing inefficiencies in existing systems and reducing maintenance costs.
Patent Information
- Application Number
- CN202111659217.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-12-30
AI Technical Summary
The existing fan control and monitoring systems in white box switches are inefficient, leading to high maintenance costs and low efficiency due to the inability to actively adjust fan speeds and identify fault points, necessitating manual intervention.
A method and device for adjusting single-board fans that utilize a target test case to monitor and parse log data, determine a fan adjustment strategy based on state and speed sets, and adjust fan speeds dynamically to improve heat dissipation efficiency and automatically repair faults.
Enhances heat dissipation efficiency and reduces maintenance costs by allowing for real-time fan speed adjustments and automatic fault detection and repair, improving the performance and lifespan of high-power electronic devices.
Smart Images

Figure CN114510134B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of switch production testing, and in particular to a method, device and storage medium for adjusting a single board fan. Background Art
[0002] As the integration of electronic devices increases with the power consumption, the excessive temperature of electronic devices affects the life and performance of electronic devices. Especially for some chips with high power consumption, the heat dissipation of the system baseboard can no longer meet the demand, and the chip needs to have a separate heat dissipation mechanism. Currently, the baseboard management controller (BMC) is used to monitor the physical characteristics of the white box switch. The BMC uses a virtual keyboard, interface, mouse, power supply, etc. to provide remote management functions for the white box switch. Users can remotely monitor the physical characteristics of the white box switch through the BMC's network port, such as the temperature, voltage, fan working status, power supply, etc. of each component.
[0003] However, the fan design of white box switches is generally a simple control and monitoring solution, and the fan status information and speed adjustment functions can only be monitored through the BMC management system during startup. When the temperature of the white box switch is too high, it is difficult for the BMC to actively adjust the voltage, and it is also difficult to find the fault point, and there is no automatic repair function, so the operator must go to the computer room for inspection and maintenance and then adjust it manually. This not only increases the workload, but also has high maintenance costs and low efficiency. Summary of the invention
[0004] The embodiments of the present application provide a method, device and storage medium for adjusting a single-board fan, which can improve the heat dissipation efficiency of a network chip equipped with a high-speed multifunctional switch.
[0005] In a first aspect, an embodiment of the present application provides a method for adjusting a single board fan, the method comprising:
[0006] Obtain a target test case corresponding to the acquisition module, wherein the target test case is used to control the acquisition module to monitor the board to be tested and obtain monitoring data; the acquisition module includes at least one of a baseboard management controller and a network operating system;
[0007] Execute the target test case so that the acquisition module obtains the monitoring data of the single board to be tested; parse the log data generated during the execution of the target test case to obtain the monitoring data; wherein the monitoring data includes a first state set and a first speed set; the first state set includes at least one group of single board states of the single board to be tested within a first time period, and each group of single board states includes the real-time state of a state item of the single board to be tested; the first speed set is the speed of at least one fan on the single board to be tested within the first time period;
[0008] Determine the target fan adjustment strategy corresponding to the single board to be tested according to the first state set, the first speed set and a preset first mapping relationship, wherein the first mapping relationship includes a mapping relationship between the single board state, the speed and the fan adjustment strategy;
[0009] The rotation speed of at least one of the fans in the board to be tested is adjusted according to the target fan adjustment strategy.
[0010] In some embodiments, determining a target fan adjustment strategy corresponding to the board to be tested according to the first state set, the first speed set, and a preset first mapping relationship, and adjusting the speed of at least one fan in the board to be tested according to the target fan adjustment strategy includes:
[0011] Matching the first state set, the speed set and the first mapping relationship respectively to obtain a target fan adjustment strategy, wherein the target fan adjustment strategy includes at least a fan adjustment parameter;
[0012] If the difference between the fan adjustment parameter and the current speed of at least one of the fans exceeds a preset speed range, the current speed of at least one of the fans is adjusted according to the fan adjustment parameter, or vulnerability information is generated according to the fan adjustment parameter and output, wherein the vulnerability information is used to indicate that the current speed setting of at least one of the fans is unreasonable.
[0013] In some embodiments, the method further comprises:
[0014] Parsing the log data to obtain the corresponding abnormality judgment conditions when the various status items of the board to be tested are abnormal;
[0015] Determine whether there is an abnormal single board state in at least one group of single board states in the first state set according to the abnormal judgment condition;
[0016] If the judgment result is yes, an operation of determining a target fan adjustment strategy corresponding to the tested board according to the first state set, the first speed set and a preset first mapping relationship is performed.
[0017] In some embodiments, the board to be tested includes multiple sets of fan modules, and the target fan adjustment strategy includes at least one of the following fan adjustment strategies:
[0018] The same fan regulation strategy is implemented for all fans in each fan module;
[0019] The same fan adjustment strategy is implemented for some fans in each fan module;
[0020] Alternatively, at least one fan adjustment strategy is executed for all fan modules.
[0021] In some embodiments, adjusting the rotation speed of at least one fan in the tested board according to the target fan adjustment strategy includes:
[0022] If the target fan adjustment strategy indicates that the same fan adjustment strategy is to be executed for all fans in each fan module, the speed of all fans in each fan module is adjusted according to the fan adjustment parameters in the target fan adjustment strategy;
[0023] or,
[0024] If the target fan adjustment strategy indicates that the same fan adjustment strategy is to be executed for some fans in each fan module, then according to the fan selection parameters included in the target fan adjustment strategy, some fans to be adjusted in each fan module are determined, and the speeds of the some fans to be adjusted are adjusted according to the fan adjustment parameters in the target fan adjustment strategy;
[0025] or
[0026] If the target fan adjustment strategy indicates that at least one fan adjustment strategy is to be executed for all fan modules, the fan adjustment strategy corresponding to each fan module is determined based on the correspondence between the strategy and the module contained in the target fan adjustment strategy, and the speed of all fans in each fan module is adjusted according to the fan adjustment parameters in the fan adjustment strategy corresponding to each fan module.
[0027] In some embodiments, the target fan adjustment strategy is adjusted in one of the following ways:
[0028] In the process of executing the target fan adjustment strategy, a second state set and a second speed set are obtained, wherein the second state set includes at least one group of single board states of the single board to be tested in a second time period; the second speed set is the speed of at least one fan on the single board to be tested in the second time period, and the start time of the second time period is later than the end time of the first time period;
[0029] The board state of the board to be tested before the second time period and the fan adjustment strategy adopted are used as historical adjustment data, and the target fan adjustment strategy is dynamically adjusted according to the historical adjustment data, the second state set and the second speed set.
[0030] In some embodiments, determining a target fan adjustment strategy corresponding to the board to be tested according to the first state set, the first speed set, and a preset first mapping relationship includes:
[0031] Determine the real-time status of each hardware component on the single board to be tested according to at least one group of single board status included in the first state set, each group of single board status corresponds to a hardware component;
[0032] Determine at least one target hardware component that meets the abnormal state according to the real-time state of each hardware component;
[0033] According to the priority or weight of at least one target hardware component and in combination with the speed of at least one fan in the first speed set, the fan adjustment policy corresponding to the at least one target hardware component is set respectively to form the target fan adjustment policy; wherein the fan adjustment policy corresponding to each target hardware component includes the fan corresponding to the target hardware component and the fan adjustment parameters for the fan.
[0034] In a second aspect, the embodiment of the present application further provides a single board fan adjustment device, comprising:
[0035] An input-output unit, used to obtain a target test case corresponding to the acquisition module, wherein the target test case is used to control the acquisition module to monitor the board to be tested and obtain monitoring data; the acquisition module includes at least one of a baseboard management controller and a network operating system;
[0036] A processing unit, configured to execute the target test case so that the acquisition module obtains the monitoring data of the single board to be tested; parse the log data generated during the execution of the target test case to obtain the monitoring data; wherein the monitoring data includes a first state set and a first speed set; the first state set includes at least one group of single board states of the single board to be tested within a first time period, and each group of single board states is a real-time state of a state item of the single board to be tested; the first speed set is the speed of at least one fan on the single board to be tested within the first time period;
[0037] The processing unit is further used to determine the target fan adjustment strategy corresponding to the single board to be tested according to the first state set, the first speed set and a preset first mapping relationship, wherein the first mapping relationship includes a mapping relationship between the single board state, the speed and the fan adjustment strategy;
[0038] A control unit is used to adjust the rotation speed of at least one of the fans in the board to be tested according to the target fan adjustment strategy determined by the processing unit.
[0039] In a third aspect, an embodiment of the present application further provides a processing device, including a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps in any one of the methods for adjusting a single-board fan provided in the embodiment of the present application are executed.
[0040] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions suitable for loading by a processor to execute the steps in any one of the methods for adjusting a single-board fan provided in an embodiment of the present application.
[0041] From the above content, it can be concluded that in the embodiment of the present application, the target test case corresponding to the acquisition module is executed so that the acquisition module obtains the monitoring data of the single board, and the monitoring data is obtained by parsing the log data generated during the execution of the target test case. Since in the monitoring data, the first state set includes at least one group of single board states of the single board in the first time period, and the first speed set is the speed of at least one fan in the first time period, it is possible to accurately determine a target fan adjustment strategy that is targeted at the heat dissipation of the current single board according to the first state set, the first speed set and the preset first mapping relationship, and adjust the speed of at least one fan according to the target fan adjustment strategy. On the one hand, the use of the module breaks through the defects of the prior art that the fan speed cannot be adjusted and the fan working status cannot be displayed; on the other hand, the present solution can also timely discover whether the fan adjustment strategy currently used is reasonable, and can quickly and timely adjust the fan strategy when the fan adjustment strategy is unreasonable, which can improve the heat dissipation efficiency of the network chip equipped with a high-speed multi-function switch, as well as quickly discover fault points and automatically repair them. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] 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 those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0043] Figure 1 This is a schematic diagram of a scenario for implementing the method for adjusting the single-board fan in this application;
[0044] Figure 2 It is a flow chart of a method for adjusting a single board fan in the present application;
[0045] Figure 3 A structural schematic diagram of a single-board fan adjustment device in this application;
[0046] Figure 4 It is a structural schematic diagram of the processing equipment of this application. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0048] In the following description, the specific embodiments of the present application will be described with reference to the steps and symbols performed by one or more computers, unless otherwise stated. Therefore, these steps and operations will be mentioned several times as being performed by a computer, and the computer execution referred to in the embodiments of the present application includes the operation of a computer processing unit by an electronic signal representing data in a structured form. This operation converts the data or maintains it at a location in the memory system of the computer, which can be reconfigured or otherwise changed in a manner familiar to testers in the field. The data structure maintained by the data is the physical location of the memory, which has specific characteristics defined by the data format. However, the principle of the present application is described with the above text, which does not represent a limitation, and testers in the field will understand that the various steps and operations described below can also be implemented in hardware.
[0049] The principles of the present application may be operated using many other general or specific purpose computing, communication environments or configurations. Examples of well-known computing systems, environments and configurations suitable for use with the present application may include, but are not limited to, handheld phones, personal computers, servers, multiprocessor systems, microcomputer-based systems, mainframe computers, and distributed computing environments, including any of the above systems or devices.
[0050] The terms "first", "second", and "third" in this application are used to distinguish different objects rather than to describe a specific order. In addition, the terms "include", "have", and any variations thereof are intended to cover non-exclusive inclusions.
[0051] First of all, before introducing the embodiments of the present application, the relevant content about the application background of the present application is introduced.
[0052] The execution subject of the single-board fan adjustment method provided in the present application may be the device provided in the present application, or a processing device such as a server device, a physical host, a vehicle-mounted terminal or a user equipment (UE) integrated with the device, wherein the device may be implemented in hardware or software, and the UE may specifically be a terminal device such as a smart phone, a tablet computer, a laptop computer, a PDA, a desktop computer or a personal digital assistant (PDA).
[0053] Next, a schematic diagram of the device structure for implementing the method for adjusting the single-board fan provided by the present application is introduced, such as Figure 1 The device comprises:
[0054] 1. Test case execution server
[0055] The test case execution server integrates the automated test framework, automated test cases, and log parsing tools. During the execution of the automated test cases, the switch under test will be configured, and the switch under test will give corresponding feedback on the configuration content. The log data generated during the test case execution process will be saved in the local hard disk storage, and then the log parsing tool will be used to parse the log data to obtain the real-time temperature, chip load, and CPU load data of each chip of the switch product monitored by the BMC or network operating system, as well as the fan speed (TACH) data of the air inlet and outlet, the BMC system event log (System Event Log, SEL) log event module and other monitoring data, and save them in the database to facilitate viewing and sorting out different chip temperatures, loads, and fan speeds and corresponding fan adjustment rules.
[0056] 2. Equipment under test
[0057] The device under test may be a switch or a BMC device. When the device under test is a switch, the switch is an integrated BMC manager and a fan function with adjustable speed, and the fan can be controlled on the switch board, the fan speed can be adjusted, and the fan working status can be displayed. The switch is the switch under test, which can be a white box switch. The embodiment of the present application takes the white box switch test as an example. When the device under test is a BMC device, the fan of the BMC device can be controlled on the server to adjust the fan speed and display the fan working status to ensure the smooth operation of the system.
[0058] 3. Rule Engine Server
[0059] The rule engine server is pre-installed with a rule engine, provides the functions of dynamic loading and dynamic change of defined rules, provides rule storage and detection data storage, and provides a human-computer interaction interface, such as a web interface, which presents the fan adjustment parameters determined by the rule engine and the fan adjustment parameters preset by the device for comparison.
[0060] See also Figure 2 , Figure 2A flow chart of a method for adjusting a single-board fan in the present application is shown. The method can be used to adjust and control the fan on the switch during the production test of the switch, but is not limited to this. Among them, taking the switch production test scenario as an example, the switch includes at least one single board and at least one fan module, and each fan module includes at least one fan. The embodiment of the present application takes one single board and at least one fan as an example. The method of adjusting the fan module can refer to the embodiment of adjusting at least one fan, and no further description is given. The switch also includes a collection module for monitoring the status of each single board and being responsible for obtaining monitoring data. Optionally, the collection module may include a BMC, or may include a network operating system of the switch, or may include both at the same time, without limitation. In the embodiment of the present application, a target test case corresponding to the collection module is run on the switch, and the target test case is used to control or configure the collection module (such as a BMC and / or a network operational system) to monitor the single board on the switch and obtain monitoring data. The method provided in the embodiment of the present application may specifically include the following steps:
[0061] 101. Obtain a target test case corresponding to an acquisition module, where the target test case is used to control the acquisition module to monitor a board to be tested and obtain monitoring data.
[0062] The acquisition module includes at least one of a baseboard management controller and a network operating system. The acquisition module may also be referred to as an acquisition component, which is not limited in the embodiments of the present application.
[0063] 102. Execute the target test case so that the acquisition module obtains monitoring data of the board to be tested, and parses log data generated during the execution of the target test case to obtain the monitoring data.
[0064] Specifically, it means running a target test case on the single board to be tested or the switch where the single board to be tested is located. The target test case may generate log data during the running process, wherein the monitoring data obtained by the acquisition module will be used as part of the log data of the target test case. By obtaining the log data of the target test case and parsing the log data, the acquisition module can obtain the monitoring data of the single board to be tested. Among them, the single board to be tested can be one or more.
[0065] The monitoring data includes a first state set and a rotation speed set.
[0066] The first state set includes at least one group of single board states of the single board to be tested within the first time period. In the present embodiment, the single board to be tested includes at least one state item, and the real-time state of each state item can form a group of single board states; the state item refers to the information item whose state needs to be monitored on the single board to be tested, such as the CPU utilization, CPU load, CPU temperature, temperature of the single board to be tested, overall load of the single board to be tested, memory utilization of the single board to be tested, etc., all of which are state items that need to be detected in the present case; each group of single board states refers to the real-time state of the single board to be tested under one state item.
[0067] The first speed set is the speed of at least one fan on the board to be tested within the first time period, and the time granularity of the first time period is not limited, for example, it can be 1 minute, 5 minutes, 30 minutes, 1 day, 2 days, 10 seconds, 20 seconds, etc. Among them, the smaller the granularity of the first time period, the higher the real-time performance of the fan adjustment, which is not limited.
[0068] For example, in this embodiment, a method for acquiring monitoring data such as chip temperature, load, fan speed, etc. is added to the target test case. The monitoring data acquisition method can be in the form of a command, and the command example is shown in Table 1. These data acquisition methods can quickly and accurately acquire these monitoring data, as shown in Table 1 below. Based on the command ipmitool sdr list, the temperature of a chip can be accurately acquired. The same is true for other reasons, which will not be described in detail:
[0069] Table 1 - Correspondence between monitoring data and command examples in test cases
[0070] Monitoring Project Command Examples Chip temperature ipmitool sdr list CPU Load sar-u 1 5 Fan speed i2cget -fy 41 0x58 0x3a bp
[0071] 103. Determine a target fan adjustment strategy corresponding to the board to be tested according to the first state set, the first speed set, and a preset first mapping relationship.
[0072] The first mapping relationship includes a mapping relationship between a board state, a rotation speed and a fan adjustment strategy. There are multiple fan adjustment strategies, and various fan adjustment strategies and a mapping relationship between a fan adjustment strategy and a board state and a fan rotation speed can be configured in advance through a rule engine server.
[0073] The fan adjustment strategy is a strategy for adjusting the fan, which can be called a fan adjustment rule. For example, the fan adjustment strategy may include but is not limited to the following examples: adjusting the fan speed to a ratio of a preset speed, adjusting the number of fans turned on to the number of fans to be adjusted, adjusting the fan speed to full speed, or turning off a certain number of fans, etc.
[0074] In some implementations, the target fan adjustment strategy may include one or more fan adjustment strategies, including specifically which fan adjustment strategies can be determined according to the single board state in the first state set and the fan speed in the first speed set. The target fan adjustment strategy includes at least fan adjustment parameters, which are used to indicate the parameters required for adjusting the fan speed, for example, parameters for indicating the adjustment of the fan working state, fan information of the working state to be adjusted, the number of fans to be adjusted, the target speed to be adjusted, etc., wherein the fan working state may include stop, start, gear, timing, mode, etc.; the fan information includes the fan identification and position information of the working state to be adjusted.
[0075] It should be noted that, in some implementations, the board to be tested includes multiple sets of fan modules, and the target fan adjustment strategy includes at least one of the following fan adjustment strategies:
[0076] The first type: instructs to execute the same fan adjustment strategy for all fans in each fan module;
[0077] The second method: executing the same fan adjustment strategy for at least one fan in each fan module;
[0078] Or, the third method: instructing to execute at least one fan adjustment strategy for all fan modules.
[0079] Based on the above, adjusting the rotation speed of at least one fan in the board to be tested according to the target fan adjustment strategy includes the following situations:
[0080] If the target fan adjustment strategy indicates that the same fan adjustment strategy is to be executed for all fans in each fan module, the speed of all fans in each fan module is adjusted according to the fan adjustment parameters in the target fan adjustment strategy;
[0081] If the target fan adjustment strategy indicates that the same fan adjustment strategy is to be executed for some fans in each fan module, then according to the fan selection parameters included in the target fan adjustment strategy, some fans to be adjusted in each fan module are determined, and the speeds of the some fans to be adjusted are adjusted according to the fan adjustment parameters in the target fan adjustment strategy;
[0082] If the target fan adjustment strategy indicates that at least one fan adjustment strategy is to be executed for all fan modules, the fan adjustment strategy corresponding to each fan module is determined based on the correspondence between the strategy and the module contained in the target fan adjustment strategy, and the speed of all fans in each fan module is adjusted according to the fan adjustment parameters in the fan adjustment strategy corresponding to each fan module.
[0083] For example, during the execution of the target test case, in addition to parsing the monitoring data from its log data, the corresponding abnormal judgment conditions when the various status items of the single board to be tested are abnormal can also be parsed from the log data; based on this, it can be judged whether there is an abnormal single board state in at least one group of single board states in the first state set according to the abnormal judgment condition; if the judgment result is that there is, then the operation of determining the target fan adjustment strategy corresponding to the single board to be tested according to the first state set, the first speed set and the preset first mapping relationship is performed. In simple terms, when an abnormal single board state is found, it is necessary to obtain the corresponding fan adjustment strategy in time so that the single board state can return to normal as soon as possible. An example of an abnormal judgment condition and an example of a fan adjustment strategy adapted to the abnormal judgment condition are shown in Table 2 below. In Table 2, the abnormal judgment condition corresponding to the chip temperature state item found in the log data can also be called an abnormal judgment rule: when the temperature of a chip is higher than 70 degrees Celsius, the temperature of the chip is in an abnormal state, and the chip needs to be cooled.
[0084] Table 2 - Examples of abnormal logs and fan adjustment strategies
[0085]
[0086] Among them, the rule example in the above Table 2 "If the temperature of a chip is higher than 70 degrees Celsius, the fan is adjusted to full speed" can be implemented through a code example of a fan adjustment strategy shown in the following Table 3, that is, the defined abnormal judgment conditions or rules are generated into a code that can be recognized by the rule engine, that is, the code of the fan adjustment strategy shown in the following Table 3. By executing the code shown in Table 3, the fan can be adjusted to dissipate heat for the single board.
[0087] Table 3 - Fan regulation strategy codes
[0088]
[0089]
[0090] Table 3 above is only an example. The fan adjustment strategies corresponding to the abnormal judgment conditions corresponding to other status items can be referred to and the adaptive adjustment strategy code, which will not be described in detail.
[0091] For example, the rule engine uses the defined rules to match and calculate the monitoring data of the tested switch as needed to obtain the target fan adjustment strategy, as shown in Table 4 below.
[0092] Table 4 - Target Fan Adjustment Strategy
[0093]
[0094] 104. Adjust the rotation speed of at least one fan in the board to be tested according to the target fan adjustment strategy.
[0095] In some embodiments of the present application, determining the target fan adjustment strategy corresponding to the board to be tested according to the first state set, the first speed set and the preset first mapping relationship, and adjusting the speed of at least one fan in the board to be tested according to the target fan adjustment strategy includes:
[0096] The first state set and the speed set are matched with the first mapping relationship respectively to obtain a target fan adjustment strategy, which includes at least fan adjustment parameters; examples of adjustment parameters can be found in the description in the aforementioned embodiments, which will not be repeated here.
[0097] If the difference between the fan adjustment parameter and the current speed of at least one of the fans exceeds the preset speed range, the current speed of at least one of the fans is adjusted according to the fan adjustment parameter, or vulnerability information is generated and output according to the fan adjustment parameter, and the vulnerability information is used to indicate that the current speed setting of the fan is unreasonable and the current speed needs to be adjusted. Specifically, when the fan adjustment parameter given by the target fan adjustment strategy is the target speed recommended to be adjusted, the target speed can be compared with the current speed of the fan; if the difference between the target speed and the current speed exceeds the preset speed range, it means that the speed currently used by the fan is greatly different from the target speed, and the speed currently used by the fan needs to be adjusted, for example, to the target speed, wherein the speed of the fan can be adjusted to the target speed at one time, or the speed of the fan can be gradually adjusted to the target speed in multiple times. Of course, in addition to adjusting the speed of the fan to the target speed, the speed of the fan can also be adjusted to the target speed range, and the target speed range refers to the speed range close to the target speed, for example, it can be (target speed-floating value, target speed+floating value).
[0098] In addition, it should be noted that the current rotation speeds of the above-mentioned different fans may be the same or different, and this is not limited. When the current rotation speed of the fan is adjusted according to the target rotation speed, each fan may be adjusted separately.
[0099] In addition, when the fan speed cannot be automatically adjusted, when the difference between the target speed and the fan's current speed exceeds the preset speed range, vulnerability information can be generated and output to prompt relevant personnel that the fan's current speed is unreasonable and ask relevant personnel to adjust the fan's current speed. Further optionally, the vulnerability information can also include a target speed that is recommended to be adjusted.
[0100] In addition, it should be noted that when there are multiple fans or fan modules in the switch, there may be one or more target speeds according to different target fan adjustment strategies. For example, all fans in each fan module may share a target speed, or some fans in each fan module may share a target speed, or different fan modules may use different target speeds, etc.
[0101] In some embodiments of the present application, the board to be tested will continue to run, and the fan will continue to run. Accordingly, the target test case will also continue to run, so as to continuously obtain the monitoring data corresponding to the board to be tested, and the target fan adjustment strategy can also be dynamically readjusted according to the new monitoring data. Based on this, the method of this embodiment can also adjust the target fan adjustment strategy in one of the following ways:
[0102] In executing the target fan adjustment strategy, a second state set and a second speed set are obtained, wherein the second state set includes at least one group of single board states of the single board to be tested in a second time period; the second speed set is the speed of at least one fan on the single board to be tested in the second time period, and the start time of the second time period is later than the end time of the first time period;
[0103] The board state of the board to be tested before the second time period and the fan adjustment strategy adopted are used as historical adjustment data, and the target fan adjustment strategy is dynamically adjusted according to the historical adjustment data, the second state set and the second speed set.
[0104] It can be seen that by dynamically adjusting the target fan adjustment strategy, the target fan adjustment strategy can be adjusted based on the actual board status after execution, and the fan can be adjusted in a targeted manner. Further, by controlling the granularity of the first time period and the second time period, the execution effect of the fan adjustment strategy can be controlled in a more fine-grained and real-time manner, avoiding the shortcomings caused by only executing a predetermined target fan adjustment strategy from beginning to end, such as wasting electricity, no longer needing full-speed heat dissipation, or some boards suddenly need more and faster heat dissipation due to a large operating load.
[0105] In some embodiments of the present application, the single board to be tested includes various hardware components, each hardware component corresponds to a state item, that is, the real-time state of the hardware component can form a set of single board states. Based on this, the target fan adjustment strategy corresponding to the single board to be tested is determined according to the first state set, the first speed set and the preset first mapping relationship, including:
[0106] Determine the real-time status of each hardware component on the single board to be tested according to at least one group of single board status included in the first state set;
[0107] Determine at least one target hardware component that meets the abnormal state according to the real-time state of each hardware component;
[0108] According to the priority or weight of at least one target hardware component, in combination with the speed of at least one fan in the first speed set, the fan adjustment policy corresponding to the at least one target hardware component is set respectively to form the target fan adjustment policy. The fan adjustment policy corresponding to each target hardware component includes the fan corresponding to the target hardware component and the fan adjustment parameters for the fan. For the fan adjustment parameters, please refer to the examples in the previous text.
[0109] For example, for a target hardware component with a higher priority or weight, its corresponding fan adjustment strategy can be set preferentially. Specifically, for any target hardware component, when its corresponding single board state indicates that the temperature of the target hardware component is higher than the preset temperature, and the current speed of its corresponding fan is 50% or 70% of the full speed, "adjusting the speed of the fan corresponding to the target hardware component to full speed" can be used as the fan adjustment parameter corresponding to the target hardware component. Alternatively, for any target hardware component, when its corresponding single board state indicates that the temperature of the target hardware component is higher than the preset temperature, and its corresponding fan is currently in a closed state, "turning on the fan corresponding to the target hardware component and adjusting the speed of the fan to 50% of the full speed" can be used as the fan adjustment parameter corresponding to the target hardware component. Alternatively, for any target hardware component, when its corresponding single board state can reflect that the temperature of the entire single board to be tested is higher than the preset temperature, no matter how much the current speed of its corresponding fan is, "setting the speed of all fans in the device (such as a switch device) where the single board to be tested is located to full speed" can be directly used as the fan adjustment parameter corresponding to the target hardware component to ensure that the entire device is cooled quickly to avoid the device from being burned.
[0110] For example, if there are multiple abnormal hardware components in the switch device, the priorities or weights of the multiple abnormal hardware components are first obtained, and then the fan adjustment policies are set accordingly according to the priorities or weights of the abnormal hardware components. For example, if the priority of the first abnormal hardware component is higher than the priority of the second abnormal hardware component, then the fan adjustment policy of the first abnormal hardware component is set to "adjust all fans around the first abnormal hardware component to full speed", and the fan adjustment policy of the second abnormal hardware component is set to "adjust some fans around the first abnormal hardware component to full speed, or all fans to 70%".
[0111] Compared with the prior art, in the embodiment of the present application, the target test case corresponding to the acquisition module is executed so that the acquisition module obtains the monitoring data of the single board to be tested, and the monitoring data is obtained by parsing the log data generated during the execution of the target test case. Since in the monitoring data, the first state set includes at least one group of single board states of the single board in the first time period, and the first speed set is the speed of at least one fan in the first time period, it is possible to accurately determine a target fan adjustment strategy that is targeted at the heat dissipation of the current single board according to the first state set, the first speed set and the preset first mapping relationship, and adjust the speed of at least one fan according to the target fan adjustment strategy. On the one hand, the use of the module breaks through the defects of the prior art that the fan speed cannot be adjusted and the fan working status cannot be displayed; on the other hand, the present solution can also timely discover whether the fan adjustment strategy currently used is reasonable, and can quickly and timely adjust the fan strategy when the fan adjustment strategy is unreasonable, which can improve the heat dissipation efficiency of the network chip equipped with a high-speed multi-function switch, and quickly discover the fault point and automatically repair it.
[0112] In order to facilitate better implementation of the method of the present application, the embodiment of the present application also provides a single-board fan adjustment device 20.
[0113] See also Figure 3 , Figure 3 Schematic diagram of a structure of a single board fan regulating device 20 of the present application, wherein the single board fan regulating device 20 may specifically include the following structure:
[0114] The input and output unit 201 is used to obtain a target test case including a collection module, wherein the target test case is used to control the collection module to monitor the board to be tested and obtain monitoring data; the collection module includes at least one of a baseboard management controller and a network operating system;
[0115] The processing unit 202 is used to execute the target test case so that the acquisition module obtains the monitoring data of the single board to be tested; parse the log data generated during the execution of the target test case to obtain the monitoring data; wherein the monitoring data includes a first state set and a speed set; the first state set includes at least one group of single board states of the single board to be tested within a first time period, and each group of single board states is a real-time state of a state item of the single board to be tested; the first speed set is the speed of at least one fan on the single board to be tested within the first time period;
[0116] The processing unit 202 is further configured to determine a target fan adjustment strategy corresponding to the single board to be tested according to the first state set, the first speed set and a preset first mapping relationship, wherein the first mapping relationship includes a mapping relationship between a single board state, a speed and a fan adjustment strategy;
[0117] The control unit 203 is configured to adjust the rotation speed of at least one of the fans in the board to be tested according to the target fan adjustment strategy determined by the processing unit 202 .
[0118] In the embodiment of the present application, the control unit 203 and the processing unit 202 may be deployed in an integrated or separate manner, which is not limited in the embodiment of the present application and may be considered equivalent.
[0119] In some embodiments, the processing unit 202 is specifically configured to:
[0120] Matching the first state set, the speed set and the first mapping relationship respectively to obtain a target fan adjustment strategy, wherein the target fan adjustment strategy includes at least a fan adjustment parameter;
[0121] If the difference between the fan adjustment parameter and the current speed of at least one of the fans exceeds a preset speed range, the current speed of at least one of the fans is adjusted according to the fan adjustment parameter, or vulnerability information is generated according to the fan adjustment parameter and output, wherein the vulnerability information is used to indicate that the current speed setting of at least one of the fans is unreasonable.
[0122] In some embodiments, the processing unit 202 is specifically configured to:
[0123] Parsing the log data to obtain the corresponding abnormality judgment conditions when the various status items of the board to be tested are abnormal;
[0124] Determine whether there is an abnormal single board state in at least one group of single board states in the first state set according to the abnormal judgment condition;
[0125] If the judgment result is yes, then the operation of determining the target fan adjustment strategy corresponding to the single board to be tested according to the first state set, the first speed set and the preset first mapping relationship is performed.
[0126] In some embodiments, the board to be tested includes multiple sets of fan modules, and the target fan adjustment strategy includes at least one of the following fan adjustment strategies:
[0127] The same fan regulation strategy is implemented for all fans in each fan module;
[0128] The same fan adjustment strategy is implemented for some fans in each fan module;
[0129] Alternatively, at least one fan adjustment strategy is executed for all fan modules.
[0130] In some embodiments, when the processing unit 202 adjusts the rotation speed of at least one fan in the tested board according to the target fan adjustment strategy, it is specifically configured to:
[0131] If the target fan adjustment strategy indicates that the same fan adjustment strategy is to be executed for all fans in each fan module, the speed of all fans in each fan module is adjusted according to the fan adjustment parameters in the target fan adjustment strategy;
[0132] or,
[0133] If the target fan adjustment strategy indicates that the same fan adjustment strategy is to be executed for some fans in each fan module, then according to the fan selection parameters included in the target fan adjustment strategy, some fans to be adjusted in each fan module are determined, and the speeds of the some fans to be adjusted are adjusted according to the fan adjustment parameters in the target fan adjustment strategy;
[0134] or
[0135] If the target fan adjustment strategy indicates that at least one fan adjustment strategy is to be executed for all fan modules, the fan adjustment strategy corresponding to each fan module is determined based on the correspondence between the strategy and the module contained in the target fan adjustment strategy, and the speed of all fans in each fan module is adjusted according to the fan adjustment parameters in the fan adjustment strategy corresponding to each fan module.
[0136] In some embodiments, the processing unit 202 adjusts the target fan adjustment strategy in one of the following ways:
[0137] In the process of executing the target fan adjustment strategy, a second state set and a second speed set are obtained, wherein the second state set includes at least one group of single board states of the single board to be tested in a second time period; the second speed set is the speed of at least one fan on the single board to be tested in the second time period, and the start time of the second time period is later than the end time of the first time period;
[0138] The board state of the board to be tested before the second time period and the fan adjustment strategy adopted are used as historical adjustment data, and the target fan adjustment strategy is dynamically adjusted according to the historical adjustment data, the second state set and the second speed set.
[0139] In one embodiment, when the control unit 203 determines the target fan adjustment strategy corresponding to the tested board according to the first state set, the first speed set and the preset first mapping relationship, it is specifically used to:
[0140] Determine the real-time status of each hardware component on the single board to be tested according to at least one group of single board status included in the first state set, each group of single board status corresponds to a hardware component;
[0141] Determine at least one target hardware component that meets the abnormal state according to the real-time state of each hardware component;
[0142] According to the priority or weight of at least one target hardware component and in combination with the speed of at least one fan in the first speed set, the fan adjustment policy corresponding to the at least one target hardware component is set respectively to form the target fan adjustment policy; wherein the fan adjustment policy corresponding to each target hardware component includes the fan corresponding to the target hardware component and the fan adjustment parameters for the fan.
[0143] In the embodiment of the present application, the processing unit 202 executes the target test case corresponding to the acquisition module, so that the acquisition module obtains the monitoring data of the single board to be tested, and obtains the monitoring data by parsing the log data generated during the execution of the target test case. Since in the monitoring data, the first state set includes at least one group of single board states of the single board in the first time period, and the first speed set is the speed of at least one fan in the first time period, it is possible to accurately determine a target fan adjustment strategy that is targeted at the heat dissipation of the current single board according to the first state set, the first speed set and the preset first mapping relationship, and adjust the speed of at least one fan according to the target fan adjustment strategy. On the one hand, the use of the module breaks through the defects of the prior art that the fan speed cannot be adjusted and the fan working status cannot be displayed; on the other hand, the present solution can also timely discover whether the fan adjustment strategy currently used is reasonable, and can quickly and timely adjust the fan strategy when the fan adjustment strategy is unreasonable, which can improve the heat dissipation efficiency of the network chip equipped with a high-speed multi-function switch, as well as quickly discover the fault point and automatically repair it.
[0144] This application also provides a processing device, see Figure 4 , Figure 4 A schematic diagram of the structure of the processing device of the present application is shown. Specifically, the processing device provided by the present application includes a processor, and the processor is used to implement the following when executing the computer program stored in the memory. Figure 1 The steps in the corresponding embodiment; or, the processor is used to implement the following when executing the computer program stored in the memory. Figure 3 The functions of each module in the corresponding embodiment.
[0145] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in a memory and executed by a processor to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing a specific function, and the instruction segments are used to describe the execution process of the computer program in a computer device.
[0146] The processing device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the illustration is merely an example of a processing device and does not constitute a limitation on the processing device, and may include more or fewer components than shown in the illustration, or a combination of certain components, or different components. For example, the processing device may also include an input / output device, a network access device, a bus, etc., and the processor, the memory, the input / output device, the network access device, etc. are connected via a bus.
[0147] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the processing device, and uses various interfaces and lines to connect various parts of the entire processing device.
[0148] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the computer device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the processing device (such as audio data, video data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0149] The display screen is used to display characters of at least one character type output by the input and output unit.
[0150] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described device, processing equipment and its corresponding modules can refer to the following. Figure 1 The description in the corresponding embodiments will not be repeated here in detail.
[0151] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0152] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the present application as follows: Figure 1 For the steps in the corresponding embodiments, the specific operations can refer to Figure 1 The description in the corresponding embodiments will not be repeated here.
[0153] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0154] Due to the instructions stored in the computer-readable storage medium, the present application can be executed. Figure 1 The steps in the corresponding embodiments, therefore, can realize the present application as follows Figure 1 The beneficial effects that can be achieved in the corresponding embodiments are detailed in the previous description and will not be repeated here.
[0155] The above is a detailed introduction to a method, device and storage medium for adjusting a single-board fan provided by the present application. The principles and implementation methods of the present application are explained using specific examples in the embodiments of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for adjusting a single board fan, characterized in that: The method comprises: Obtain a target test case corresponding to the acquisition module, wherein the target test case is used to control the acquisition module to monitor the board to be tested and obtain monitoring data; the acquisition module includes at least one of a baseboard management controller and a network operating system; Execute the target test case so that the acquisition module obtains the monitoring data of the single board to be tested; parse the log data generated during the execution of the target test case to obtain the monitoring data; wherein the monitoring data includes a first state set and a first speed set; the first state set includes at least one group of single board states of the single board to be tested within a first time period, and each group of single board states includes the real-time state of a state item of the single board to be tested; the first speed set is the speed of at least one fan on the single board to be tested within the first time period; Determine the target fan adjustment strategy corresponding to the single board to be tested according to the first state set, the first speed set and a preset first mapping relationship, wherein the first mapping relationship includes a mapping relationship between the single board state, the speed and the fan adjustment strategy; Adjusting the rotation speed of at least one fan in the board to be tested according to the target fan adjustment strategy; The step of determining a target fan adjustment strategy corresponding to the board to be tested according to the first state set, the first speed set, and a preset first mapping relationship, and adjusting the speed of at least one fan in the board to be tested according to the target fan adjustment strategy includes: Matching the first state set, the speed set and the first mapping relationship respectively to obtain a target fan adjustment strategy, wherein the target fan adjustment strategy includes at least a fan adjustment parameter; If the difference between the fan adjustment parameter and the current speed of at least one of the fans exceeds a preset speed range, the current speed of at least one of the fans is adjusted according to the fan adjustment parameter, or vulnerability information is generated according to the fan adjustment parameter and output, wherein the vulnerability information is used to indicate that the current speed setting of at least one of the fans is unreasonable.
2. The method according to claim 1, characterized in that The method further comprises: Parsing the log data to obtain the corresponding abnormality judgment conditions when the various status items of the board to be tested are abnormal; Determine whether there is an abnormal single board state in at least one group of single board states in the first state set according to the abnormal judgment condition; If the judgment result is yes, an operation of determining a target fan adjustment strategy corresponding to the tested board according to the first state set, the first speed set and a preset first mapping relationship is performed.
3. The method according to any one of claims 1 to 2, characterized in that: The single board to be tested includes multiple sets of fan modules, and the target fan adjustment strategy includes at least one of the following fan adjustment strategies: The same fan regulation strategy is implemented for all fans in each fan module; The same fan adjustment strategy is implemented for some fans in each fan module; Alternatively, at least one fan adjustment strategy is executed for all fan modules.
4. The method according to claim 3, characterized in that Adjusting the rotation speed of at least one fan in the board to be tested according to the target fan adjustment strategy includes: If the target fan adjustment strategy indicates that the same fan adjustment strategy is to be executed for all fans in each fan module, the speed of all fans in each fan module is adjusted according to the fan adjustment parameters in the target fan adjustment strategy; or, If the target fan adjustment strategy indicates that the same fan adjustment strategy is to be executed for some fans in each fan module, then according to the fan selection parameters included in the target fan adjustment strategy, some fans to be adjusted in each fan module are determined, and the speeds of the some fans to be adjusted are adjusted according to the fan adjustment parameters in the target fan adjustment strategy; or If the target fan adjustment strategy indicates that at least one fan adjustment strategy is to be executed for all fan modules, the fan adjustment strategy corresponding to each fan module is determined based on the correspondence between the strategy and the module contained in the target fan adjustment strategy, and the speed of all fans in each fan module is adjusted according to the fan adjustment parameters in the fan adjustment strategy corresponding to each fan module.
5. The method according to claim 4, characterized in that Adjust the target fan scaling policy in one of the following ways: In the process of executing the target fan adjustment strategy, a second state set and a second speed set are obtained, wherein the second state set includes at least one group of single board states of the single board to be tested in a second time period; the second speed set is the speed of at least one fan on the single board to be tested in the second time period, and the start time of the second time period is later than the end time of the first time period; The board state of the board to be tested before the second time period and the fan adjustment strategy adopted are used as historical adjustment data, and the target fan adjustment strategy is dynamically adjusted according to the historical adjustment data, the second state set and the second speed set.
6. The method according to claim 2, characterized in that Determining a target fan adjustment strategy corresponding to the board to be tested according to the first state set, the first speed set, and a preset first mapping relationship includes: Determine the real-time status of each hardware component on the single board to be tested according to at least one group of single board status included in the first state set, each group of single board status corresponds to a hardware component; Determine at least one target hardware component that meets the abnormal state according to the real-time state of each hardware component; According to the priority or weight of at least one target hardware component and in combination with the speed of at least one fan in the first speed set, the fan adjustment policy corresponding to the at least one target hardware component is set respectively to form the target fan adjustment policy; wherein the fan adjustment policy corresponding to each target hardware component includes the fan corresponding to the target hardware component and the fan adjustment parameters for the fan.
7. A single-board fan adjustment device, characterized in that: include: An input-output unit, used to obtain a target test case corresponding to the acquisition module, wherein the target test case is used to control the acquisition module to monitor the board to be tested and obtain monitoring data; the acquisition module includes at least one of a baseboard management controller and a network operating system; A processing unit, configured to execute the target test case so that the acquisition module obtains the monitoring data of the single board to be tested; parse the log data generated during the execution of the target test case to obtain the monitoring data; wherein the monitoring data includes a first state set and a first speed set; the first state set includes at least one group of single board states of the single board to be tested within a first time period, and each group of single board states is a real-time state of a state item of the single board to be tested; the first speed set is the speed of at least one fan on the single board to be tested within the first time period; The processing unit is further used to determine the target fan adjustment strategy corresponding to the single board to be tested according to the first state set, the first speed set and a preset first mapping relationship, wherein the first mapping relationship includes a mapping relationship between the single board state, the speed and the fan adjustment strategy; A control unit is used to match the first state set, the speed set and the first mapping relationship respectively to obtain a target fan adjustment strategy, wherein the target fan adjustment strategy at least includes a fan adjustment parameter; if the difference between the fan adjustment parameter and the current speed of at least one of the fans exceeds a preset speed range, the current speed of at least one of the fans is adjusted according to the fan adjustment parameter, or vulnerability information is generated according to the fan adjustment parameter and outputted, wherein the vulnerability information is used to indicate that the current speed setting of at least one of the fans is unreasonable.
8. A processing device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, the method according to any one of claims 1 to 6 is executed.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the method according to any one of claims 1 to 6.
