Heat dissipation control method of server, program product, equipment and storage medium
By deploying control components and temperature sensors in the server and using version variable record flags to determine the current version, the problem of confusion in debug version and running version management is solved, flexible version switching and unified management of the server is realized, and debugging efficiency is improved.
Patent Information
- Application Number
- CN202510726100.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-07-04
AI Technical Summary
During debugging and running, the server needs to switch debug versions and running versions, resulting in confusion in version management and increasing the complexity of development and maintenance.
By deploying control components, temperature sensors and heat dissipation components in the server, using the version variable record flag bits to determine the current version, and determining the operating parameters of the heat dissipation components by sensing the temperature, flexible changes and unified management of the debug version and the running version are achieved.
Simplifies version management, reduces the complexity of version switching, improves debugging efficiency, reduces firmware maintenance workload, and realizes flexible changes and unified management of debug versions and running versions.
Smart Images

Figure CN120255679A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of servers. Specifically, it relates to a heat dissipation control method, program product, device, and storage medium for a server. Background Art
[0002] During the development and production of servers, the heat dissipation system needs to be repeatedly debugged. And during the debugging process, the debugger needs to repeatedly check the heat dissipation parameters output by the heat dissipation system. After the server is put on the market, there is no need to output the heat dissipation parameters anymore. Therefore, for servers, it is usually necessary to design a debug version and a running version. During the debugging process, the debug version is loaded for heat dissipation debugging, and after shipment, the running version is loaded for normal operation. The server needs to load two versions back and forth, which not only increases the complexity of development and maintenance, but also may lead to chaotic version management. Summary of the Invention
[0003] The purpose of the embodiments of this application is to provide a heat dissipation control method, program product, device, and storage medium for a server, so as to solve the technical problem of chaotic management of the debug version and the running version.
[0004] The first aspect of the embodiments of this application provides a heat dissipation control method for a server. The server is deployed with a control component, a temperature sensor, and a heat dissipation component. The method is applied to the control component. The method includes: During the operation of the server, determine the operating parameters of the heat dissipation component based on the sensed temperature of the target temperature sensor. Determine the current version of the server based on the flag bit recorded by the version variable. If the current version is the debug version, output the debug data of the heat dissipation component, and return to execute the step of determining the operating parameters of the heat dissipation component based on the sensed temperature of the target temperature sensor. Wherein, the debug data includes the sensed temperature and the operating parameters. If the current version is the running version, return to execute the step of determining the operating parameters of the heat dissipation component based on the sensed temperature of the target temperature sensor.
[0005] In the above implementation process, a new version variable is added to record the flag bit corresponding to the current version of the server. When the version needs to be changed, only the flag bit in the version variable needs to be modified to change the current version of the server. The server does not need to deploy two versions at the same time, nor does it need to repeatedly load or unload the two versions. Therefore, flexible change of the debug version and the running version is realized, and unified management of debugging and normal operation is realized.
[0006] Further, a plurality of temperature sensors are included, and the target temperature sensor is any one or more of the plurality of temperature sensors; determining the operating parameters of the heat dissipation component based on the sensed temperature of the target temperature sensor includes: By traversing each of the temperature sensors, one or more target temperature sensors are determined from the plurality of temperature sensors; For each of the target temperature sensors, the operating parameters of the heat dissipation component are respectively determined based on the sensed temperature of the target temperature sensor; The method further includes: After traversing all the target temperature sensors, the operating parameters debugged based on each target temperature sensor are obtained to obtain an operating parameter set; The target operating parameter is determined from the operating parameter set, and the heat dissipation component is controlled to operate according to the target operating parameter; The current version of the server is determined based on the flag bit recorded by the version variable; If the current version is a debug version, the target operating parameter and the sensor identifier of the target temperature sensor corresponding to the target operating parameter are output, and the step of traversing each of the temperature sensors is returned until the server is powered off; If the current version is an operating version, the step of traversing each of the temperature sensors is returned until the server is powered off.
[0007] In the above implementation process, by screening out one or more target temperature sensors from a plurality of temperature sensors, and respectively determining the operating parameters of the heat dissipation component based on each target temperature sensor, and then determining the target operating parameter with the optimal heat dissipation effect from a plurality of operating parameters to control the operation of the heat dissipation component. During the control process, the current version of the server is determined twice based on the flag bit marked by the version variable, and then it is judged whether to print debug data or whether to print the target operating parameter and the sensor identifier of the corresponding target temperature sensor, so as to realize the unified management of the operating version and the debug version.
[0008] Further, the determining one or more target temperature sensors from the plurality of temperature sensors by traversing each of the temperature sensors includes: Obtain the current state of the current temperature sensor; When the current state is an active state, determine that the current temperature sensor is the target temperature sensor.
[0009] In the above implementation process, by setting the current state of each temperature sensor, the temperature sensors in the active state can be screened out as target temperature sensors when traversing a plurality of temperature sensors, so as to realize the effect of flexibly using different temperature sensors to control the heat dissipation component.
[0010] Further, the method further includes: When the current state is the inactive state, it is determined that the current temperature sensor is not the target temperature sensor.
[0011] In the above implementation process, by setting the current state of each temperature sensor, the temperature sensor in the active state is used to determine the operating parameters of the heat dissipation component, and the temperature sensor in the inactive state does not participate in the regulation of the heat dissipation component, thereby achieving the effect of flexibly using different temperature sensors to control the heat dissipation component.
[0012] Further, the current state of each temperature sensor is stored in a preset array, the array includes multiple elements, and each element is used to indicate the current state of the corresponding temperature sensor; the method further includes: In response to the server being powered on, each element in the array is initialized to a first flag bit, the first flag bit is used to indicate the active state, or in response to the server being powered on, a historically pre-stored array is called; In response to a status modification instruction carried by the debugger input and including the temperature sensor identifier and the target status, the target element corresponding to the temperature sensor identifier is determined from the array, and the target element is modified to the first target flag bit corresponding to the target status; wherein, the target status includes the active state, and the corresponding first target flag bit includes the first flag bit, or the target status includes the inactive state, and the corresponding first target flag bit includes the second flag bit.
[0013] In the above implementation process, an array is used to record the current state of each temperature sensor, and the debugger can flexibly modify the current state of each temperature sensor by inputting a status modification instruction, thereby achieving flexible debugging of the heat dissipation component.
[0014] Further, the method further includes: In response to a version modification instruction input by the debugger, the flag bit recorded by the version variable is modified to the second target flag bit corresponding to the target version indicated by the version modification instruction; the target version includes the debug version or the running version.
[0015] In the above implementation process, the debugger can change the current version of the server at any time during the operation of the server through a version modification instruction, realizing flexible change and unified management between the debug version and the running version.
[0016] Further, the method further includes: In response to the server being powered on, the current version of the server is initialized to the running version.
[0017] In the above implementation process, by initializing the current version as the running version when the server is powered on, the server can normally control the heat dissipation component for heat dissipation based on the target temperature sensor without debugging, realizing the normal operation of the server.
[0018] The second aspect of the embodiments of the present application provides a computer program product, which includes a computer program that, when executed by a processor, implements the method according to any one of the first aspect.
[0019] The third aspect of the embodiments of the present application provides an electronic device, which includes: A processor; A memory for storing executable instructions of the processor; Wherein, when the processor calls the executable instructions, it implements the operations of the method according to any one of the first aspect.
[0020] The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, on which computer instructions are stored, and when the computer instructions are executed by a processor, the steps of the method according to any one of the first aspect are implemented. Description of the Drawings
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0022] Figure 1 It is a schematic diagram of the application scenario of the embodiments of the present application; Figure 2 It is a schematic flow chart of a heat dissipation control method for a server provided by the embodiments of the present application; Figure 3 It is a schematic flow chart of another heat dissipation control method for a server provided by the embodiments of the present application; Figure 4 It is a schematic flow chart of another heat dissipation control method for a server provided by the embodiments of the present application; Figure 5 It is a hardware structure diagram of an electronic device provided by the embodiments of the present application. Detailed Embodiments
[0023] The following will describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application.
[0024] It should be noted that similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present application, terms such as "first" and "second" are only used for distinguishing descriptions and cannot be construed as indicating or implying relative importance.
[0025] For the debug version, during the production, R & D or use and maintenance process of the server, by loading the debug version, the specific parameters of the heat dissipation system during the debugging process can be output, so that the debugging personnel can perform debugging and maintenance. However, during the normal use of the server, the heat dissipation system runs normally by loading the running version. Under the running version, the server does not need to output the specific parameters of the heat dissipation system. Therefore, the server usually needs to deploy the debug version and the running version, and load different versions under different requirements and different scenarios to achieve different functions. When it is necessary to replace the version, it is necessary to first uninstall the currently loaded version and then load the version to be replaced, resulting in inflexible version switching and potential hidden troubles in version management.
[0026] In order to achieve unified management of the debug version and the running version, the present application provides a heat dissipation control method for a server. Figure 1 The application scenario of this solution is shown. As Figure 1 shown, the server 100 is deployed with a control component 110, a temperature sensor 120 and a heat dissipation component 130. Among them, the control component 110 is electrically connected to the temperature sensor 120 and the heat dissipation component 130 respectively. The control component 110 can obtain the sensed temperature of the temperature sensor 120. The control component 110 has a built-in heat dissipation algorithm, and based on the sensed temperature and the heat dissipation algorithm, the operating parameters corresponding to the heat dissipation component 130 can be calculated. The control component 110 can control the operation of the heat dissipation component 130 according to the operating parameters, so as to achieve heat dissipation of the server 100.
[0027] As an example, the control component 110 can be a Baseboard Management Controller (BMC). Of course, in addition to BMC, the control component 110 can also be other components with control functions, and this embodiment does not limit this.
[0028] Optionally, the temperature sensor 120 may include one or more, and the heat dissipation component 130 may include one or more. The installation positions of the temperature sensor 120 and the heat dissipation component 130 in the server 100 may be set according to actual situations, and this embodiment does not make any restrictions. In the case where the temperature sensor 120 includes multiple ones and the heat dissipation component 130 includes multiple ones, the number of the temperature sensors 120 may be the same as the number of the heat dissipation components 130, or the number of the temperature sensors 120 may be less than that of the heat dissipation components 130, or the number of the temperature sensors 120 may be more than that of the heat dissipation components 130. In addition, one temperature sensor 120 may correspond to controlling one heat dissipation component 130, or one temperature sensor 120 may correspond to controlling multiple heat dissipation components 130, or multiple temperature sensors 120 may correspond to controlling one heat dissipation component 130.
[0029] Based on this, a heat dissipation control method for a server provided in this application is applied to a control component 110 as shown in Figure 1 and includes steps 210-step 240 as shown in Figure 2 .
[0030] Step 210: During the operation of the server, determine the operating parameters of the heat dissipation component based on the sensed temperature of the target temperature sensor; Step 220: Determine the current version of the server based on the flag bit recorded by the version variable; Step 230: If the current version is a debug version, output the debug data of the heat dissipation component, and return to execute the step of determining the operating parameters of the heat dissipation component based on the sensed temperature of the target temperature sensor; wherein, the debug data includes the sensed temperature and the operating parameters; Step 240: If the current version is a running version, return to execute the step of determining the operating parameters of the heat dissipation component based on the sensed temperature of the target temperature sensor.
[0031] Exemplarily, in step 210, the control component 110 pre-stores a heat dissipation algorithm. Through the sensed temperature of the target temperature sensor and the heat dissipation algorithm, the operating parameters of the heat dissipation component 130 can be calculated. Alternatively, the control component 110 pre-stores a mapping relationship between the temperature and the operating parameters. By looking up the operating parameters corresponding to the sensed temperature in the mapping relationship, the operating parameters of the heat dissipation component 130 can be obtained.
[0032] The current version of server 100 includes a debug version and a running version. Different versions can be determined by the flag bits recorded in the version variable. For example, if the version variable records the third flag bit, it represents that the current version of server 100 is the debug version; if the version variable records the fourth flag bit, it represents that the current version of server 100 is the running version. Optionally, the third flag bit is 1 and the fourth flag bit is 0. The version variable is a global variable.
[0033] In the debug version, it is necessary to output the debug data of the heat dissipation component 130, including the sensed temperature of the target temperature sensor and the operating parameters of the heat dissipation component 130. The output of the debug data can include outputting the debug data on the display interface of the server 100 or printing the debug data. After outputting the debug data, return to step 210 to continue determining the operating parameters of the heat dissipation component 130 based on the sensed temperature of the target temperature sensor. In the running version, there is no need to output the debug data, but directly return to step 210 to continue determining the operating parameters of the heat dissipation component 130 based on the sensed temperature of the target temperature sensor, so as to achieve real-time heat dissipation adjustment.
[0034] As an example, if the server 100 includes a temperature sensor 120, the target temperature sensor described in step 210 is the temperature sensor 120 included in the server 100. At this time, during the operation of the server 100, determine the operating parameters of one or more heat dissipation components 130 based on the sensed temperature of the temperature sensor 120, then determine whether to output the debug data through the current version of the server 100, and then return to step 210 to determine the operating parameters of one or more heat dissipation components 130 based on the sensed temperature of the temperature sensor 120.
[0035] As an example, if the server 100 includes multiple temperature sensors 120, the target temperature sensor described in step 210 is one or more of the multiple temperature sensors 120. Optionally, if the target temperature sensor is one of the multiple temperature sensors 120, during the operation of the server 100, determine the operating parameters of one or more heat dissipation components 130 based on the sensed temperature of one target temperature sensor. Then determine whether to output the debug data through the current version of the server 100, and then return to step 210 to determine the operating parameters of one or more heat dissipation components 130 based on the sensed temperature of one target temperature sensor.
[0036] Optionally, if there are multiple target temperature sensors among the multiple temperature sensors 120, during the operation of the server 100, first determine the operating parameters of one or more heat dissipation components 130 based on the sensed temperature of one target temperature sensor, and then determine whether to output debug data based on the current version of the server 100. Subsequently, determine the next target temperature sensor and return to execute step 210. In this way, in the debug version, the debug data for debugging the heat dissipation component 130 based on each target temperature sensor will be output, enabling the debugger to know the debugging process and results of each target temperature sensor for the heat dissipation component 130.
[0037] Optionally, if there are multiple target temperature sensors among the multiple temperature sensors 120, during the operation of the server 100, the operating parameters of one or more heat dissipation components 130 can be determined simultaneously based on the sensed temperatures of the multiple target temperature sensors. Subsequently, determine whether to output debug data based on the current version of the server 100, and return to execute step 210 to determine the operating parameters of one or more heat dissipation components 130 based on the sensed temperatures of the multiple target temperature sensors simultaneously.
[0038] It can be seen that in this application, a version variable is newly added to record the flag bit corresponding to the current version of the server. When the version needs to be changed, only the flag bit in the version variable needs to be modified to change the current version of the server. The server does not need to deploy two versions simultaneously, nor does it need to repeatedly load or unload the two versions. Therefore, flexible changes between the debug version and the running version are achieved, and unified management of debugging and normal operation is realized.
[0039] The following provides a detailed introduction to steps 210 - 240.
[0040] According to some embodiments of the present application, the server 100 is deployed with multiple temperature sensors 120, and the target temperature sensor described in step 210 is any one or more of the multiple temperature sensors 120. Based on this, a heat dissipation control method for a server provided in this embodiment includes steps 311 - 355 as Figure 3 shown.
[0041] Step 311: During the operation of the server, determine one or more target temperature sensors from the multiple temperature sensors by traversing each temperature sensor.
[0042] Among them, the target temperature sensor can be any one or more of the multiple temperature sensors 120, or a temperature sensor that meets the preset conditions among the multiple temperature sensors 120.
[0043] Step 312: For each of the target temperature sensors, determine the operating parameters of the heat dissipation component respectively based on the sensed temperature of the target temperature sensor.
[0044] Exemplarily, for each target temperature sensor, the operating parameters of the heat dissipation component 130 are determined one by one based on the sensed temperature of the target temperature sensor, and then step 320 is executed.
[0045] Step 320: Determine the current version of the server based on the flag bit recorded by the version variable.
[0046] For the specific implementation of this step, refer to step 220 above, which will not be elaborated here.
[0047] Step 330: If the current version is a debug version, output the debug data of the heat dissipation component. When not all target temperature sensors have been traversed, determine the next target temperature sensor and return to execute the step of determining the operating parameters of the heat dissipation component based on the sensed temperature of the target temperature sensor; wherein, the debug data includes the sensed temperature and the operating parameters.
[0048] Exemplarily, when it is determined that the current version is a debug version, output the debug data of the heat dissipation component 130, including the sensed temperature of the target temperature sensor and the operating parameters of the heat dissipation component 130. Then determine whether all target temperature sensors have been traversed. If not, determine the next target temperature sensor and return to execute step 312.
[0049] Step 340: If the current version is an operating version, when not all target temperature sensors have been traversed, determine the next target temperature sensor and return to execute the step of determining the operating parameters of the heat dissipation component based on the sensed temperature of the target temperature sensor.
[0050] Exemplarily, when it is determined that the current version is an operating version, there is no need to output the debug data of the heat dissipation component 130. Instead, directly determine whether all target temperature sensors have been traversed. If not, determine the next target temperature sensor and return to execute step 312.
[0051] Step 351: After traversing all the temperature sensors, obtain the operating parameters debugged based on each target temperature sensor to obtain an operating parameter set.
[0052] Exemplarily, since in step 312 the operating parameters of the heat dissipation component 130 are determined respectively based on the sensed temperature of each target temperature sensor, after traversing all target temperature sensors, the operating parameters debugged for each target temperature sensor can be obtained, thereby obtaining an operating parameter set including all operating parameters.
[0053] Step 352: Determine the target operating parameters from the operating parameter set and control the operation of the heat dissipation component according to the target operating parameters.
[0054] Exemplarily, since different target temperature sensors have different operating parameters for the corresponding debugging of the heat dissipation component 130, it is necessary to determine the target operating parameters from multiple different operating parameters and control the operation of the heat dissipation component 130 according to the target operating parameters. As an example, when the heat dissipation component 130 operates according to the target operating parameters, the heat dissipation effect of the heat dissipation component 130 is optimal. For example, the temperature drop rate of the server 100 is the fastest, the heat dissipation power of the heat dissipation component 130 is the largest, the rotation speed of the rotor used for heat dissipation in the heat dissipation component 130 is the largest, and so on. For example, if the heat dissipation component 130 is a fan, then the rotation speed of the heat dissipation component 130 is the largest when it operates according to the target operating parameters.
[0055] Step 353: Determine the current version of the server based on the flag bit recorded by the version variable.
[0056] For the specific implementation method of this step, please refer to step 220 above and will not be elaborated here.
[0057] Step 354: If the current version is a debug version, output the target operating parameters and the sensor identifier of the target temperature sensor corresponding to the target operating parameters, and return to execute the step of traversing each temperature sensor until the server is powered off.
[0058] Exemplarily, when it is determined that the current version is a debug version, the target operating parameters of the heat dissipation component 130 and its corresponding target temperature sensor are output. As described above, different target temperature sensors have different operating parameters for the corresponding debugging of the heat dissipation component 130. By outputting the target operating parameters and the sensor identifier of the corresponding target temperature sensor, the debugging personnel can know which target temperature sensor determines the current operating parameters of the heat dissipation component 130. Subsequently, return to execute step 311 to re-determine the target temperature sensor from all the temperature sensors 120 until the server 100 is powered off.
[0059] Step 355. If the current version is an operating version, return to execute the step of traversing each temperature sensor until the server is powered off.
[0060] Exemplarily, when it is determined that the current version is an operating version, directly return to execute step 311 to re-determine the target temperature sensor from all the temperature sensors 120 until the server 100 is powered off.
[0061] It can be seen that in this embodiment, one or more target temperature sensors are selected from multiple temperature sensors, the operating parameters of the heat dissipation component are determined based on each target temperature sensor respectively, and then the target operating parameter with the optimal heat dissipation effect is determined from multiple operating parameters to control the operation of the heat dissipation component. During the control process, the current version of the server is determined twice based on the flag bits marked by the version variable, and then it is judged whether to print debug data or whether to print the target operating parameter and the sensor identifier of the corresponding target temperature sensor, thereby realizing the unified management of the operating version and the debug version.
[0062] According to some embodiments of the present application, in step 311 above, by traversing each temperature sensor, one or more target temperature sensors are determined from multiple temperature sensors, which specifically includes steps 3111 - 3112: Step 3111: Obtain the current state of the current temperature sensor; Step 3112: When the current state is the active state, determine the current temperature sensor as the target temperature sensor.
[0063] Exemplarily, during the process of traversing the temperature sensor 120, the currently traversed temperature sensor 120 is the current temperature sensor. The current state of the current temperature sensor includes the active state and the non - active state. If it is determined that the current state of the current temperature sensor is the active state, then it can be determined that the current temperature sensor is the target temperature sensor, and step 312 is executed.
[0064] It can be seen that in this embodiment, by setting the current state of each temperature sensor, the temperature sensors in the active state can be screened out as target temperature sensors when traversing multiple temperature sensors, thereby realizing the effect of flexibly using different temperature sensors to control the heat dissipation component.
[0065] According to some embodiments of the present application, in step 311 above, by traversing each temperature sensor, one or more target temperature sensors are determined from multiple temperature sensors. In addition to including steps 3111 - 3112, it also includes step 3113.
[0066] Step 3113: When the current state is the non - active state, determine that the current temperature sensor is not the target temperature sensor.
[0067] As described above, the current state of the current temperature sensor includes the active state and the non - active state. If it is determined that the current state of the current temperature sensor is the non - active state, then it can be determined that the current temperature sensor is not the target temperature sensor. At this time, the next temperature sensor can be obtained, and step 3111 is returned for execution.
[0068] It can be seen that in this embodiment, by setting the current state of each temperature sensor, the operating parameters of the heat dissipation component are determined by using the temperature sensors in the active state (target temperature sensors), and the temperature sensors in the inactive state do not participate in the regulation of the heat dissipation component, thereby achieving the effect of flexibly using different temperature sensors to control the heat dissipation component.
[0069] Regarding the current state of the temperature sensor 120, in some embodiments, the current state of each temperature sensor 120 is stored in a preset array. The array includes a plurality of elements. The number of elements is greater than or equal to the number of temperature sensors 120. The elements correspond to the temperature sensors 120 one by one, and each element is used to indicate the current state of the corresponding temperature sensor 120. Exemplarily, the flag bit recorded in each element in the array is used to indicate the current state of the corresponding temperature sensor 120. If the element records the first flag bit, it represents that the corresponding temperature sensor 120 is in the active state, and if the element records the second flag bit, it represents that the corresponding temperature sensor 120 is in the inactive state. Optionally, the first flag bit may be 1, and the second flag bit may be 0. Based on this, when performing step 3111 to obtain the current state of the current temperature sensor, specifically, the element corresponding to the current temperature sensor in the array can be determined, and then the current state of the current temperature sensor can be determined based on the flag bit recorded in the element.
[0070] On this basis, the method further includes step S1 and step S3, or includes step S2 and step S3.
[0071] Step S1: In response to the power-on of the server, initialize each element in the array to the first flag bit, and the first flag bit is used to indicate the active state.
[0072] Step S2: In response to the power-on of the server, call the pre-stored historical array.
[0073] Step S3: In response to the status modification instruction carried by the debugger input, which includes the temperature sensor identifier and the target state, determine the target element corresponding to the temperature sensor identifier from the array, and modify the target element to the first target flag bit corresponding to the target state; wherein, the target state includes the active state, and the corresponding first target flag bit includes the first flag bit, or the target state includes the inactive state, and the corresponding first target flag bit includes the second flag bit.
[0074] Exemplarily, during the operation of the server 100, a debugger can input a status modification instruction carrying a temperature sensor identifier and a target status, which means that the debugger needs to modify the status of the temperature sensor corresponding to the temperature sensor identifier. The target status includes an active state or an inactive state. At this time, in response to the status modification instruction, the control component 110 can determine the target element corresponding to the temperature sensor identifier from the array, and modify the flag bit recorded by the target element to the first target flag bit corresponding to the target status. Among them, if the target status carried in the status modification instruction is the active state, the flag bit recorded by the target element is modified to the first flag; if the target status carried in the status modification instruction is the inactive state, the flag bit recorded by the target element is modified to the second flag bit. Thus, the debugger can modify the status of the temperature sensor 120.
[0075] As an example, the status modification of the temperature sensor 120 by the debugger can be time-limited. For example, the status modification is only valid during the current operation of the server 100. If the server 100 is powered off and then powered on again, step S1 is executed to initialize each element in the array to the first flag bit, so that each temperature sensor 120 is in the active state.
[0076] As another example, the status modification of the temperature sensor 120 by the debugger can be stored, that is, the modified array is stored. In this way, when the server 100 is powered on each time, the historically pre-stored array can be called, and the current status of each temperature sensor 120 can be determined based on the flag bit recorded by each element in the array. At this time, the status modified by the debugger for the temperature sensor 120 during the previous power-on of the server 100 is still valid during the current operation of the server 100.
[0077] It can be understood that when the server 100 is powered on, step S1 or step S2 can be selected for execution according to the configuration. During the operation of the server 100, if a status modification instruction is received, step S3 is triggered for execution. Among them, the status modification instruction can be input to the control component 110 at any step in any of the above embodiments. Therefore, step S3 may be triggered for execution during the execution of any of the above steps. Therefore, there is no necessary order of execution between step S3 and any of the above steps.
[0078] It can be seen that in this embodiment, an array is used to record the current status of each temperature sensor, and the debugger can flexibly modify the current status of each temperature sensor by inputting a status modification instruction, thereby realizing flexible debugging of the heat dissipation component.
[0079] In addition, based on any of the above embodiments, the method further includes step S4: in response to a version modification instruction input by a debugger, modifying the flag bit recorded by the version variable to a second target flag bit corresponding to the target version indicated by the version modification instruction.
[0080] Wherein, if the target version is a debug version, the corresponding second target flag bit is the third flag bit; if the target version is a running version, the corresponding second target flag bit is the fourth flag bit.
[0081] Exemplarily, during the operation of the server 100, a debugger can input a version modification instruction, which means that the debugger needs to modify the version of the server 100. At this time, in response to the version modification instruction, the control component 110 can modify the flag bit recorded by the version variable to the second target flag bit corresponding to the target version, thereby implementing the modification of the sensor version by the debugger.
[0082] It can be understood that during the operation of the server 100, if a version modification instruction is received, step S4 is triggered for execution. Among them, the version modification instruction can be input to the control component 110 at any step in any of the above embodiments. Therefore, step S4 may be triggered for execution during the execution of any of the above steps. Therefore, there is no necessary order of execution between step S4 and any of the above steps.
[0083] It can be seen that in this embodiment, a debugger can change the current version of the server 100 at any time during the operation of the server 100 through a version modification instruction, realizing flexible change and unified management between the debug version and the running version.
[0084] In addition, based on any of the above embodiments, the method further includes step S5: in response to the power-on of the server, initializing the current version of the server to the running version.
[0085] As an example, step S5 may specifically include: in response to the power-on of the server, initializing the version variable to the fourth flag bit, and the fourth flag bit is used to indicate the running version.
[0086] It can be seen that by initializing the current version to the running version when the server is powered on, the server can normally control the heat dissipation component 130 for heat dissipation based on the target temperature sensor when no debugging is required, realizing the normal operation of the server.
[0087] In addition, the present application also provides a heat dissipation control method for a server, including steps 401-413 as Figure 4 shown.
[0088] In response to the power-on of Server 100, the BMC initializes the version variable debug_mode to the fourth flag bit 0 (step 401), initializes each element in the global array enable_status[N-1] to the first flag bit 1 (step 402), and initializes the variable i to 0 (step 403). Among them, the version variable debug_mode is a global variable, the variable i is a local variable, and 0 ≤ i ≤ N-1. The local variable i represents the i-th element in the global array enable_status[N-1].
[0089] Through step 401, after Server 100 is powered on, the current version is defaulted to the running version. Server 100 includes N temperature sensors 120. The global array enable_status[N-1] includes N elements, and the elements correspond to the temperature sensors 120 one by one. The flag bit recorded by each element is used to indicate the current state of the corresponding temperature sensor 120. Thus, through step 402, each temperature sensor 120 is restored to the active state after Server 100 is powered on.
[0090] During the operation of Server 100, the debugger can input a status modification instruction carrying the temperature sensor identifier and the target state at any time. For example, the debugger can modify the status of the temperature sensor through the ipmitool command provided by the BMC. In response to the status modification instruction, the BMC can determine the target element corresponding to the temperature sensor identifier from the global array enable_status[N-1], and modify the target element to the first target flag bit corresponding to the target state. For example, if the debugger needs to modify the status of a certain temperature sensor 120 to the active state, then the flag bit recorded by the target element corresponding to the temperature sensor 120 can be modified to the first flag bit 1; conversely, if it needs to be modified to the inactive state, the flag bit recorded by the target element is modified to the second flag bit 0.
[0091] During the operation of Server 100, the debugger can also input a version modification instruction at any time. For example, the debugger can modify the version of Server 100 through the ipmitool command provided by the BMC. In response to the version modification instruction, the BMC can modify the flag bit recorded by the version variable debug_mode to the second target flag bit corresponding to the target version indicated by the version modification instruction. For example, if the debugger needs to modify Server 100 to the debug version, then the flag bit recorded by the version variable debug_mode is modified to the third flag bit 1; conversely, if it needs to be modified to the running version, the flag bit recorded by the version variable debug_mode is modified to the fourth flag bit 0.
[0092] During the operation of server 100, it is determined whether the variable i is less than N (step 404). If so, the i-th element enable_status[i] is read from the global array enable_status[N - 1], and it is determined whether the i-th element enable_status[i] is the first flag bit 1 (step 405). If it is the first flag bit 1, it means that the temperature sensor 120 corresponding to the i-th element enable_status[i] (i.e., the i-th temperature sensor) is in an active state. Therefore, the BMC determines the operating parameters of the heat dissipation component 130 based on the sensed temperature of the i-th temperature sensor (step 406), such as the rotation speed of the fan. Subsequently, it is determined whether the version variable debug_mode is the third flag bit 1 (step 407). If it is the third flag bit 1, it means that the server 100 is currently in the debug version and debug data needs to be output, including the sensed temperature of the temperature sensor 120 corresponding to the i-th element enable_status[i] (i.e., the i-th temperature sensor) and the operating parameters corresponding to the heat dissipation component 130 (step 408). Subsequently, the variable i is incremented by 1 (step 409) and the process returns to execute step 404 until the variable i is equal to or greater than N. In the determination of step 407, if the version variable debug_mode is not the third flag 1 but the fourth flag bit 0, it means that the server 100 is currently in the running version and no debug data needs to be output. Therefore, the variable i is directly incremented by 1 (step 409) and the process returns to execute step 404 until the variable i is equal to or greater than N.
[0093] In the judgment of step 405, if the enable_status[i] of the i-th element is not the first flag bit 1 but the second flag bit 0, it means that the temperature sensor 120 corresponding to the enable_status[i] of the i-th element (i.e., the i-th temperature sensor) is in an inactive state, and the i-th temperature sensor does not participate in the control of the heat dissipation component 130. At this time, it can continue to judge whether the version variable debug_mode is the third flag bit 1 (step 407). If it is the third flag bit 1, it means that the server 100 is currently in the debug version and needs to output debug data. It can be understood that although the i-th temperature sensor does not participate in the control of the heat dissipation component 130 at this time, in order to let the debug personnel clearly understand the entire debugging process of the heat dissipation component 130, the output debug data can still include the sensed temperature of the i-th temperature sensor and the corresponding operating parameters of the heat dissipation component 130 (step 408). Subsequently, the variable i is incremented by 1 (step 409) and returns to execute step 404 until the variable i is equal to or greater than N. In the judgment of step 407, if the version variable debug_mode is not the third flag 1 but the fourth flag bit 0, it means that the server 100 is currently in the running version and there is no need to output debug data, so the variable i is directly incremented by 1 (step 409) and returns to execute step 404 until the variable i is equal to or greater than N.
[0094] In the judgment of step 404, when the variable i is greater than or equal to N, it means that each temperature sensor 120 in the server 100 has completed a traversal, filtered out the target temperature sensors in the active state, and determined the operating parameters of the heat dissipation component 130 one by one based on the target temperature sensors, and each operating parameter corresponds to a target temperature sensor. At this time, an operating parameter set including multiple operating parameters can be obtained. Subsequently, the target operating parameter can be determined from the operating parameter set (step 410). Taking the operating parameter as the rotational speed as an example, the operating parameter with the maximum rotational speed in the operating parameter set can be determined as the target operating parameter.
[0095] Subsequently, it is further judged whether the version variable debug_mode is the third flag bit 1 (step 411). If it is the third flag bit 1, it means that the server 100 is currently in the debug version and needs to output the target operating parameter and the sensor identifier of the corresponding target temperature sensor (step 412), so that the debug personnel can know which temperature sensor 120 is currently controlling the heat dissipation component 130 from the output data. At the same time, BMC controls the heat dissipation component 130 to operate according to the target operating parameter (step 413), for example, controls the heat dissipation component 130 to operate at the maximum rotational speed indicated by the target operating parameter. Subsequently, it returns to step 403 to initialize the variable i to 0 and start a new round of traversal of the temperature sensors 120 until the server 100 is powered off.
[0096] In the judgment of step 411, if the version variable debug_mode is not the third flag 1 but the fourth flag 0, it means that the server 100 is currently in the running version and there is no need to output data. Therefore, the BMC directly controls the operation of the heat dissipation component 130 according to the target operation parameters (step 413). Subsequently, it returns to step 403 to initialize the variable i to 0 and restart the traversal of the temperature sensor 120 in the next round until the server 100 is powered off.
[0097] It can be seen that in this embodiment, the switching between the running version and the debug version is controlled by the version variable, which simplifies the version management, reduces the workload of firmware maintenance, reduces the maintenance cost, and reduces the complexity of version switching. At the same time, the debugger can quickly enter and exit the debug version, view and modify the operation parameters of the heat dissipation component in real time, and improve the debugging efficiency.
[0098] Based on the heat dissipation control method of a server described in any of the above embodiments, the present application also provides a computer program product, which includes one or more computer programs or instructions. The computer program or instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. When the computer program is executed by a processor, it implements the heat dissipation control method of a server described in any of the above embodiments.
[0099] Based on the heat dissipation control method of a server described in any of the above embodiments, the present application also provides Figure 5 a schematic structural diagram of an electronic device as shown in Figure 5 , at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. Of course, it may also include other hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the heat dissipation control method of a server described in any of the above embodiments.
[0100] The present application also provides a computer storage medium, which stores a computer program. When the computer program is executed by a processor, it can be used to execute the heat dissipation control method of a server described in any of the above embodiments.
[0101] In several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0102] In addition, in each embodiment of this application, the various functional modules can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.
[0103] If the described function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of this application. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, etc., which can store program codes.
[0104] The above are only embodiments of the present application and are not intended to limit the protection scope of the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application. It should be noted that similar reference numerals and letters indicate similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0105] As described above, this is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, and all should be covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
[0106] It should be noted that in this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
Claims
1. A heat dissipation control method for a server, characterized in that, The server is deployed with a control component, a temperature sensor, and a heat dissipation component; The method is applied to the control component; the method includes: During the operation of the server, determine the operating parameters of the heat dissipation component based on the sensed temperature of the target temperature sensor; Determine the current version of the server based on the flag bit recorded by the version variable; If the current version is a debug version, output the debug data of the heat dissipation component, and return to execute the step of determining the operating parameters of the heat dissipation component based on the sensed temperature of the target temperature sensor; wherein, the debug data includes the sensed temperature and the operating parameters; If the current version is a running version, return to execute the step of determining the operating parameters of the heat dissipation component based on the sensed temperature of the target temperature sensor.
2. The method according to claim 1, characterized in that, There are multiple temperature sensors, and the target temperature sensor is any one or more of the multiple temperature sensors; determining the operating parameters of the heat dissipation component based on the sensed temperature of the target temperature sensor includes: Determine one or more target temperature sensors from the multiple temperature sensors by traversing each temperature sensor; For each target temperature sensor, determine the operating parameters of the heat dissipation component respectively based on the sensed temperature of the target temperature sensor; The method further includes: After traversing all the target temperature sensors, obtain the operating parameters debugged based on each target temperature sensor to obtain an operating parameter set; Determine the target operating parameter from the operating parameter set, and control the operation of the heat dissipation component according to the target operating parameter; Determine to obtain the current version of the server based on the flag bit recorded by the version variable; If the current version is a debug version, output the target operating parameter and the sensor identifier of the target temperature sensor corresponding to the target operating parameter, and return to execute the step of traversing each temperature sensor until the server is powered off; If the current version is a running version, return to execute the step of traversing each temperature sensor until the server is powered off.
3. The method according to claim 2, characterized in that, The determining one or more target temperature sensors from the multiple temperature sensors by traversing each temperature sensor includes: Obtain the current state of the current temperature sensor; In the case where the current state is an active state, determine the current temperature sensor as the target temperature sensor.
4. The method according to claim 3, characterized in that, The method further includes: In the case where the current state is an inactive state, determine that the current temperature sensor is not the target temperature sensor.
5. The method according to claim 3 or 4, characterized in that, The current state of each temperature sensor is stored in a preset array, and the array includes multiple elements, and each element is used to indicate the current state of the corresponding temperature sensor; The method further includes: In response to the server being powered on, initialize each element in the array to a first flag bit, where the first flag bit is used to indicate an active state, or in response to the server being powered on, call the historically pre-stored array; In response to a status modification instruction carrying a temperature sensor identifier and a target status input by a debugger, determine a target element corresponding to the temperature sensor identifier from the array, and modify the target element to a first target flag bit corresponding to the target status; wherein, the target status includes an activation status, and the corresponding first target flag bit includes the first flag bit, or the target status includes a non-activation status, and the corresponding first target flag bit includes the second flag bit.
6. The method according to claim 1, characterized in that, The method further includes: In response to a version modification instruction input by a debugger, modify the flag bit recorded by the version variable to a second target flag bit corresponding to the target version indicated by the version modification instruction; the target version includes a debug version or a running version.
7. The method according to claim 1, characterized in that The method further includes: In response to the server being powered on, initialize the current version of the server to the running version.
8. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the method described in any one of claims 1-7.
9. An electronic device, characterized in that, The electronic device includes: A processor; A memory for storing instructions executable by the processor; Wherein, when the processor calls the executable instructions, it implements the operations of the method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, Stored thereon are computer instructions, and when the computer instructions are executed by a processor, they implement the steps of the method described in any one of claims 1-7.
Citation Information
Patent Citations
ONU customized version switching method and device, storage medium and computer equipment
CN107864414A
Server heat dissipation regulation and control method and device and storage medium
CN113703552A
Method and equipment for earphone software version switching
CN115167910A
Method and system for realizing switching between firewall view and kernel view
CN115629994A
Operation control method and device of heat dissipation equipment, storage medium and electronic equipment
CN118502559A