A BMC batch upgrade method, device, equipment and readable medium

By employing a grouping strategy and performance-optimized concurrent execution during the BMC upgrade process, the problem of excessively long upgrade times for large-scale BMC upgrades has been solved, resulting in a more efficient upgrade process.

CN114064069BActive Publication Date: 2025-12-19ZHENGZHOU YUNHAI INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111229358.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-21
Publication Date
2025-12-19
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

Existing technologies are too time-consuming and inefficient for large-scale BMC firmware upgrades, and cannot effectively handle thousands of machines concurrently.

Method used

By calculating the grouping strategy, the BMC upgrade task is grouped and executed in batches on the controlled end. The grouping strategy is calculated based on performance data and preset weights, and the upgrade task is executed concurrently. The number of concurrent threads is adjusted to optimize the upgrade process.

Benefits of technology

It significantly improves the speed of BMC upgrades, saves upgrade time, and the upgrade tool can easily expand to handle more nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114064069B_ABST
    Figure CN114064069B_ABST
Patent Text Reader

Abstract

The application discloses a batch upgrade method of BMC, comprising the following steps: scanning each BMC node to obtain the number of nodes and node information of each BMC node; scanning each controlled terminal to obtain the number of controlled terminals and performance data of each controlled terminal, and calculating the performance of each controlled terminal based on the performance data and corresponding preset performance weight; calculating a grouping strategy based on the number of nodes, the number of controlled terminals and the performance of the controlled terminals; and distributing BMC upgrade tasks to corresponding controlled terminals for upgrading based on the grouping strategy. The application also discloses a batch upgrade device of BMC, a computer device and a readable storage medium. The application calculates a grouping strategy, groups and batches BMC upgrades in controlled terminals, greatly improves the BMC upgrade speed, saves upgrade time, and can easily expand the capacity of the upgrade tool with the increase of BMC nodes.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of software development, and in particular to a BMC batch upgrade method, device and equipment and readable medium. BACKGROUND

[0002] At present, for BMC firmware upgrade, most of the actual applications are still through the out-of-band BMC upgrade of the upgrade tool. Through the upgrade tool, batch upgrade of dozens or hundreds of machines can be realized. When the number of machines reaches thousands, the upgrade time will be greatly prolonged through the upgrade tool.

[0003] The reason is that through the upgrade tool, concurrent execution of two or three dozen machines can be performed at the same time, and the number of concurrent executions cannot be greatly increased due to the memory and CPU conditions of the client machines. Therefore, when the number of machines to be upgraded reaches thousands, the upgrade time often needs one or two days. Such long upgrade time will lead to low efficiency. SUMMARY

[0004] Therefore, the purpose of the embodiments of the present application is to provide a BMC batch upgrade method, device, equipment and readable medium, which divides the BMC upgrade into groups and batches in the controlled end through a grouping strategy, so as to greatly improve the BMC upgrade speed, save the upgrade time, and conveniently expand the capacity of the upgrade tool with the increase of BMC nodes.

[0005] Based on the above purpose, one aspect of the embodiments of the present application provides a BMC batch upgrade method, comprising the following steps: scanning each BMC node to obtain the number of nodes and the node information of each BMC node; scanning each controlled end to obtain the number of controlled ends and the performance data of each controlled end, and calculating the performance of each controlled end based on the performance data and the corresponding preset performance weight; calculating a grouping strategy based on the number of nodes, the number of controlled ends and the performance of the controlled end; and distributing the BMC upgrade task to the corresponding controlled end for upgrade based on the grouping strategy.

[0006] In some embodiments, the method further comprises: calculating the number of concurrent threads for executing the upgrade based on the memory size of the controlled end, the preset memory ratio and the single-thread occupied memory number, and concurrently executing the BMC upgrade on the controlled end based on the number of concurrent threads.

[0007] In some embodiments, the method further comprises: receiving the execution result returned by the controlled end, and judging whether all the controlled ends complete the BMC upgrade task; if all the controlled ends complete the BMC upgrade task, calculating the number of the controlled ends that have not completed and the percentage of the number of the controlled ends that have completed, and taking the percentage as an influencing factor to adjust the performance of the controlled end; further adjusting the grouping strategy based on the adjusted performance of the controlled end, and continuing to distribute the BMC upgrade task to the corresponding controlled end for upgrading based on the adjusted grouping strategy.

[0008] In some embodiments, the method further comprises: configuring the local IP address and the username and password, and configuring the IP address and the username and password of the controlled end to ensure communication with the controlled end; configuring the IP address and the username and password of the BMC node to ensure communication between the BMC node and the controlled end.

[0009] In some embodiments, scanning each controlled end to obtain the number of controlled ends and the performance data of each controlled end, and calculating the performance of each controlled end based on the performance data and the corresponding preset performance weight comprises: scanning each controlled end to obtain the CPU frequency, the number of CPU cores, the memory size, and the network bandwidth, and calculating the performance of the controlled end based on the CPU frequency weight, the number of CPU cores weight, the memory size weight, and the network bandwidth weight; the performance of the controlled end = CPU frequency × CPU frequency weight + number of CPU cores × number of CPU cores weight + memory size × memory size weight + network bandwidth × network bandwidth weight.

[0010] In some embodiments, calculating the grouping strategy based on the number of nodes, the number of controlled ends, and the performance of the controlled end comprises: taking the remainder of the number of BMC nodes and the number of BMC nodes of each controlled end in each batch to obtain the number of batches, and calculating the grouping strategy by the following formula

[0011]

[0012] wherein, Bc n represents the number of BMC nodes of the nth group of controlled ends, BAb m represents the number of nodes in the mth batch, ph n represents the performance of the nth group of controlled ends, Ct represents the number of controlled ends, Phi represents the performance of the ith controlled end, n represents the number of groups, m represents the number of batches, and i represents the controlled end count.

[0013] In some embodiments, calculating the number of concurrent threads for executing the upgrade based on the memory size of the controlled end, the preset memory occupancy ratio, and the single-thread memory occupancy number comprises: the number of concurrent threads = memory size of the controlled end × preset memory occupancy ratio / single-thread memory occupancy number.

[0014] Another aspect of the embodiments of the present application also provides a BMC batch upgrade device, comprising: a first module configured to scan each BMC node to obtain a node number and node information of each of the BMC nodes; a second module configured to scan each controlled end to obtain a controlled end number and performance data of each of the controlled ends, and calculate a controlled end performance of each of the controlled ends based on the performance data and a corresponding preset performance weight; a third module configured to calculate a grouping strategy based on the node number, the controlled end number and the controlled end performance; and a fourth module configured to distribute a BMC upgrade task to the corresponding controlled ends for upgrading based on the grouping strategy.

[0015] Still another aspect of the embodiments of the present application also provides a computer device, comprising: at least one processor; and a memory storing computer instructions executable on the processor, the instructions being executed by the processor to implement steps of a method comprising: scanning each BMC node to obtain a node number and node information of each of the BMC nodes; scanning each controlled end to obtain a controlled end number and performance data of each of the controlled ends, and calculating a controlled end performance of each of the controlled ends based on the performance data and a corresponding preset performance weight; calculating a grouping strategy based on the node number, the controlled end number and the controlled end performance; and distributing a BMC upgrade task to the corresponding controlled ends for upgrading based on the grouping strategy.

[0016] In some embodiments, the steps of the method further comprise: calculating a number of concurrent threads for performing the upgrade based on a memory size of the controlled end, a preset memory proportion and a single-thread occupied memory number, and performing the BMC upgrade concurrently on the controlled end based on the number of concurrent threads.

[0017] In some embodiments, the steps of the method further comprise: receiving an execution result returned by the controlled end, and determining whether there is a controlled end that has completed all of the BMC upgrade tasks; if there is a controlled end that has completed all of the BMC upgrade tasks, calculating a number of controlled ends that have not completed and a completed number calculation percentage, and taking the percentage as an influencing factor to adjust the controlled end performance; further adjusting the grouping strategy based on the adjusted controlled end performance, and continuing to distribute the BMC upgrade task to the corresponding controlled ends for upgrading based on the adjusted grouping strategy.

[0018] In some embodiments, the steps of the method further comprise: configuring a local IP address and a username and password, and configuring an IP address and a username and password of the controlled end to ensure communication with the controlled end; configuring an IP address and a username and password of the BMC node to ensure communication between the BMC node and the controlled end.

[0019] In some embodiments, the scanning each of the controlled ends to obtain the number of the controlled ends and performance data of each of the controlled ends, and calculating the performance of each of the controlled ends based on the performance data and corresponding preset performance weights comprises: scanning each of the controlled ends to obtain CPU main frequency, CPU core number, memory size and network bandwidth, and calculating the performance of the controlled end based on CPU main frequency weight, CPU core number weight, memory size weight and network bandwidth weight; the performance of the controlled end = CPU main frequency * CPU main frequency weight + CPU core number * CPU core number weight + memory size * memory size weight + network bandwidth * network bandwidth weight.

[0020] In some embodiments, calculating the grouping strategy based on the number of nodes, the number of controlled ends and the performance of the controlled ends comprises: taking the remainder of the number of BMC nodes and the number of BMC nodes of each of the controlled ends in each batch to obtain the number of batches, and calculating the grouping strategy by the following formula

[0021]

[0022] Wherein, Bc n represents the number of BMC nodes of the nth group of controlled ends, BAb m represents the number of nodes in the mth batch, ph n represents the performance of the nth group of controlled ends, Ct represents the number of controlled ends, Phi represents the performance of the ith controlled end, n represents the number of groups, m represents the number of batches, and i represents the controlled end count.

[0023] In some embodiments, calculating the number of concurrent threads for execution upgrade based on the memory size of the controlled end, the preset memory occupancy ratio and the single-thread occupancy memory number comprises: the number of concurrent threads = memory size of the controlled end * preset memory occupancy ratio / single-thread occupancy memory number.

[0024] Still another aspect of the embodiment of the application also provides a computer readable storage medium, which stores a computer program which is executed by a processor to implement the method steps.

[0025] The application has at least the following beneficial technical effects: by calculating the grouping strategy, the BMC upgrade is grouped and batched in the controlled end, so that the BMC upgrade speed is greatly improved, the upgrade time is saved, and as the number of BMC nodes increases, the upgrade tool can be easily expanded. BRIEF DESCRIPTION OF DRAWINGS

[0026] In order to make the technical solutions of the embodiments of the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description only show some embodiments of the present application, and for those skilled in the art, other embodiments can be obtained from these accompanying drawings without creative effort.

[0027] Figure 1 A schematic diagram of an embodiment of the BMC batch upgrade method provided by the present application;

[0028] Figure 2 A schematic diagram of an embodiment of the BMC batch upgrade device provided by the present application;

[0029] Figure 3 A schematic diagram of an embodiment of the computer device provided by the present application;

[0030] Figure 4 A schematic diagram of an embodiment of the computer readable storage medium provided by the present application. DETAILED DESCRIPTION

[0031] In order to make the technical solutions of the embodiments of the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description only show some embodiments of the present application, and for those skilled in the art, other embodiments can be obtained from these accompanying drawings without creative effort.

[0032] It should be noted that all the expressions of "first" and "second" in the embodiments of the present application are used to distinguish two same name different entities or different parameters. It can be seen that "first" and "second" are only used for the convenience of description, and should not be understood as a limitation of the embodiments of the present application. The subsequent embodiments will not be described one by one.

[0033] Based on the above purpose, the first aspect of the embodiments of the present application proposes an embodiment of the BMC batch upgrade method. Figure 1 The schematic diagram of the embodiment of the BMC batch upgrade method provided by the present application is shown. As shown in the figure, Figure 1 The BMC batch upgrade method of the embodiments of the present application includes the following steps:

[0034] 001, scanning each BMC node to obtain the number of nodes and the node information of each BMC node;

[0035] 002, scanning each controlled end to obtain the number of controlled ends and the performance data of each controlled end, and calculating the controlled end performance of each controlled end based on the performance data and the corresponding preset performance weight;

[0036] 003, calculating the grouping strategy based on the number of nodes, the number of controlled ends and the controlled end performance; and

[0037] 004、Based on the grouping strategy, the BMC upgrade task is distributed to the corresponding controlled end for upgrading.

[0038] In the embodiment, the configuration module, the scanning module, the distribution module, the upgrade module, the write-back module and the storage module are included. When the BMC upgrade is performed, the configuration module is used to configure the operating system IP and the username and password of the controlled end and the BMC IP and the username and password of the BMC that needs to be upgraded. The scanning module is used to scan the BMC nodes on the host control end, and the scanned BMC node information is stored in the storage medium. The scanning module is connected to the controlled end machine to obtain the CPU frequency, the core number, the memory size, the network bandwidth and other data of the controlled end machine, and the data is stored in the storage medium. The SSH protocol is used to establish an SSH channel between the host control end and the controlled end, and the distribution module is used to distribute the scanned BMC nodes to the controlled end according to the performance of the controlled end machine and according to a certain algorithm. The number of batches is calculated according to the number of BMC nodes and the number of controlled ends, the number of groups is consistent with the number of controlled ends, and then the groups of BMC are distributed to the controlled end together with the upgrade module and the write-back module to perform the BMC upgrade. The upgrade module calculates the appropriate number of concurrent threads according to the performance data of the controlled end, and then performs the upgrade operation. After each upgrade is completed, the completion data is written back to the host control end. The regret mechanism is introduced. When the BMC upgrade of the controlled end is completed, the host control end calculates the percentage according to the number of each group in the grouping and the number of completed groups. The percentage is used as an influencing factor to adjust the grouping strategy next time, and the BMC upgrade task is distributed again until all batches are completed.

[0039] In some embodiments of the application, the method further comprises: calculating the number of concurrent threads for performing the upgrade based on the memory size of the controlled end, the preset memory occupancy ratio and the single-thread memory occupancy number, and concurrently executing the BMC upgrade on the controlled end based on the number of concurrent threads.

[0040] In some embodiments of the application, the method further comprises: receiving the execution result returned by the controlled end, and judging whether there is a controlled end that has completed all the BMC upgrade tasks; if there is a controlled end that has completed all the BMC upgrade tasks, calculating the number of controlled ends that have not completed and the percentage of the number of completed groups, and using the percentage as an influencing factor to adjust the performance of the controlled end; further adjusting the grouping strategy based on the adjusted performance of the controlled end, and continuing to distribute the BMC upgrade task to the corresponding controlled end for upgrading based on the adjusted grouping strategy.

[0041] In the embodiment, the write-back module is responsible for writing back the execution result of the execution module from the controlled end to the host control end. When the BMC upgrade of the controlled end is completed, the host control end calculates the percentage according to the number of each group in the grouping and the number of completed groups. The percentage is used as an influencing factor to adjust the grouping strategy next time, and the BMC upgrade task is distributed again until all batches are completed.

[0042] In some embodiments of the present application, the method further comprises: configuring the local IP address and the username and password, and configuring the IP address and the username and password of the controlled terminal to ensure the communication with the controlled terminal; configuring the IP address and the username and password of the BMC node to ensure the communication between the BMC node and the controlled terminal.

[0043] In some embodiments of the present application, the scanning each controlled terminal to obtain the number of controlled terminals and the performance data of each controlled terminal, and calculating the performance of each controlled terminal based on the performance data and the corresponding preset performance weight comprises: scanning each controlled terminal to obtain the CPU frequency, the CPU core number, the memory size and the network bandwidth, and calculating the performance of the controlled terminal based on the CPU frequency weight, the CPU core number weight, the memory size weight and the network bandwidth weight; the performance of the controlled terminal = CPU frequency × CPU frequency weight + CPU core number × CPU core number weight + memory size × memory size weight + network bandwidth × network bandwidth weight.

[0044] In the present embodiment, the scanning module scans to discover the BMC node; the scanning module connects the controlled terminal machine to obtain the CPU frequency, the core number and the memory size of the controlled terminal machine and the network bandwidth data, and calculates the performance weight of each controlled terminal machine according to the scanned controlled terminal. The calculation formula of the performance weight of the controlled terminal is:

[0045] Ph=r×(CH×Pch+CN×Pcn+MS×Pms+NS×Pns)

[0046] wherein, Ph represents the performance weight of the controlled terminal, CH represents the CPU frequency, Pch represents the CPU frequency weight, CN represents the CPU core number, Pcn represents the CPU core number weight, MS represents the memory size, Pms represents the memory size weight, NS represents the network bandwidth, Pns represents the network bandwidth weight, and r represents the regret mechanism influence factor, which is 1 by default. c h represents the CPU frequency weight, CN represents the CPU core number, P c n represents the CPU core number weight, MS represents the memory size, Pm s s represents the memory size weight, NS represents the network bandwidth, Pn s s represents the network bandwidth weight, and r represents the regret mechanism influence factor, which is 1 by default.

[0047] In some embodiments of the present application, the grouping strategy based on the number of nodes, the number of controlled terminals and the performance of the controlled terminals comprises: taking the remainder of the number of BMC nodes and the number of BMC nodes of each controlled terminal in each batch to obtain the number of batches, and calculating the grouping strategy by the following formula

[0048]

[0049] wherein, Bc n n represents the number of BMC nodes of the nth group of controlled terminals, BAb m m represents the number of nodes in the mth batch, and ph nCt represents the number of controlled ends, Phi represents the controlled end performance of the i-th controlled end, n represents the number of groups, m represents the number of batches, and i represents the controlled end count.

[0050] In some embodiments of the present application, the number of concurrent threads for performing the upgrade based on the memory size of the controlled end, the preset memory proportion, and the single-thread memory occupation number comprises: the number of concurrent threads = the memory size of the controlled end x the preset memory proportion / the single-thread memory occupation number.

[0051] In this embodiment, the execution module calculates the number of concurrent threads based on the memory size of the controlled end, and performs concurrent execution, and upgrades multiple BMC nodes until all the BMC nodes are completely upgraded. For example, only half of the memory of the controlled end machine is used to prevent too much memory occupation and cause the machine to hang. The concurrent thread number calculation formula is:

[0052]

[0053] Wherein, MT represents the single-thread memory occupation number, T represents the number of concurrent threads, and MZ represents the memory size of the controlled end.

[0054] It should be particularly pointed out that each step in each of the above-mentioned embodiments of the batch upgrade method of the BMC can be crossed, replaced, added, deleted, and reduced, and therefore, these reasonable permutations and combinations of the batch upgrade method of the BMC should also belong to the protection scope of the present application, and the protection scope of the present application should not be limited to the embodiments.

[0055] Based on the above purpose, a second aspect of the embodiment of the present application provides a batch upgrade device of a BMC. Figure 2 The figure shows an embodiment of the batch upgrade device of the BMC provided by the present application. As shown in the figure, Figure 2 The batch upgrade device of the BMC of the embodiment of the present application comprises the following modules: a first module 011 configured to scan each BMC node to obtain the number of nodes and the node information of each BMC node; a second module 012 configured to scan each controlled end to obtain the number of controlled ends and the performance data of each controlled end, and calculate the controlled end performance of each controlled end based on the performance data and the corresponding preset performance weight; a third module 013 configured to calculate a grouping strategy based on the number of nodes, the number of controlled ends, and the controlled end performance; and a fourth module 014 configured to distribute the BMC upgrade task to the corresponding controlled end for upgrading based on the grouping strategy.

[0056] Based on the above purpose, a third aspect of the embodiment of the present application provides a computer device. Figure 3 The figure shows an embodiment of the computer device provided by the present application. As shown in the figure, Figure 3As shown, the computer device of the embodiment of the present application comprises the following devices: at least one processor 021; and a memory 022, which stores computer instructions 023 executable on the processor, and the instructions, when executed by the processor, implement the steps of the method, including: scanning each BMC node to obtain the number of nodes and node information of each BMC node; scanning each controlled end to obtain the number of controlled ends and performance data of each controlled end, and calculating the performance of each controlled end based on the performance data and corresponding preset performance weights; calculating the grouping strategy based on the number of nodes, the number of controlled ends and the performance of the controlled ends; and distributing the BMC upgrade task to the corresponding controlled end for upgrading based on the grouping strategy.

[0057] In some embodiments of the present application, the steps of the method further comprise: calculating the number of concurrent threads for executing the upgrade based on the memory size of the controlled end, the preset memory occupancy ratio and the single-thread occupied memory number, and executing the BMC upgrade concurrently on the controlled end based on the number of concurrent threads.

[0058] In some embodiments of the present application, the steps of the method further comprise: receiving the execution result returned by the controlled end, and judging whether there is a controlled end that has completed all the BMC upgrade tasks; if there is a controlled end that has completed all the BMC upgrade tasks, calculating the number of controlled ends that have not completed and the percentage of the number of controlled ends that have completed, and taking the percentage as an influencing factor to adjust the performance of the controlled end; further adjusting the grouping strategy based on the adjusted performance of the controlled end, and continuing to distribute the BMC upgrade task to the corresponding controlled end for upgrading based on the adjusted grouping strategy.

[0059] In some embodiments of the present application, the steps of the method further comprise: configuring the local IP address and the username and password, and configuring the IP address and the username and password of the controlled end to ensure communication with the controlled end; configuring the IP address and the username and password of the BMC node to ensure communication between the BMC node and the controlled end.

[0060] In some embodiments of the present application, the steps of scanning each controlled end to obtain the number of controlled ends and the performance data of each controlled end, and calculating the performance of each controlled end based on the performance data and corresponding preset performance weights comprise: scanning each controlled end to obtain the CPU frequency, the number of CPU cores, the memory size and the network bandwidth, and calculating the performance of the controlled end based on the CPU frequency weight, the number of CPU cores weight, the memory size weight and the network bandwidth weight; the performance of the controlled end = CPU frequency x CPU frequency weight + number of CPU cores x number of CPU cores weight + memory size x memory size weight + network bandwidth x network bandwidth weight.

[0061] In some embodiments of the present application, the calculating the grouping strategy based on the number of nodes, the number of controlled ends and the performance of the controlled ends comprises: taking the number of BMC nodes and the number of BMC nodes of each controlled end in each batch as the modulus to obtain the number of batches, and calculating the grouping strategy by the following formula

[0062]

[0063] wherein, Bc n represents the number of BMC nodes of the nth group of controlled ends, BAb m represents the number of nodes in the mth batch, ph n represents the performance of the controlled end of the nth group, Ct represents the number of controlled ends, Phi represents the performance of the i th controlled end, n represents the number of groups, m represents the number of batches, and i represents the controlled end count.

[0064] In some embodiments of the present application, the number of concurrent threads for executing the upgrade based on the memory size of the controlled end, the preset memory occupancy ratio and the single-thread memory occupancy number comprises: the number of concurrent threads = the memory size of the controlled end x the preset memory occupancy ratio / single-thread memory occupancy number.

[0065] The present application also provides a computer readable storage medium. Figure 4 Shown is a schematic diagram of an embodiment of the computer readable storage medium provided by the present application. As Figure 4 shown, the computer readable storage medium 031 stores a computer program 032 which is executed by the processor to perform the above method.

[0066] Finally, it should be noted that those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program to instruct related hardware, and the program of the batch upgrade method of the BMC can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments of each method. Among them, the storage medium of the program can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM) and the like. The above-mentioned computer program embodiments can achieve the same or similar effects as the corresponding any method embodiments.

[0067] In addition, the method disclosed in the embodiments of the present application can also be implemented as a computer program executed by a processor, which can be stored in a computer readable storage medium. When the computer program is executed by the processor, the above-mentioned functions defined in the method disclosed in the embodiments of the present application are executed.

[0068] In addition, the above-mentioned method steps and system units can also be realized by using a controller and a computer readable storage medium for storing a computer program for enabling the controller to realize the above-mentioned steps or unit functions.

[0069] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein can be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans can implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments disclosure.

[0070] In one or more exemplary designs, the functions described can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. Storage media can be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code means in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or other wire-based, fiber-based, or wireless technologies, then the coaxial cable, fiber optic cable, twisted pair, DSL, or other wire-based, fiber-based, or wireless technologies are included in the definition of medium. Disk and disc, as used herein, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0071] The foregoing is a summary of the exemplary embodiments disclosed herein, but it should be noted that numerous changes and modifications can be made without departing from the scope of the embodiments disclosed in the claims. The functions, steps and / or actions of the method claims in accordance with the embodiments described herein need not be performed in any particular order. Furthermore, although the elements of the embodiments disclosed herein can be described or claimed in individual forms, other embodiments can include a combination of elements from two or more of these disclosures.

[0072] It should be understood that, as used herein, the singular form "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising", or "includes" and / or "including" when used herein, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0073] The above-mentioned embodiment serial number of the present application is only for description, not representing the advantages and disadvantages of the embodiments.

[0074] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or can be completed by programs instructing relevant hardware, and the programs can be stored in a computer readable storage medium, such as read-only memory, magnetic disk or optical disk.

[0075] Those skilled in the art should understand that the above discussion of any embodiment is only exemplary, and is not intended to imply that the scope of the embodiments of the present application (including the claims) is limited to these examples; under the idea of the embodiments of the present application, the above embodiments or technical features in different embodiments can also be combined, and there are many other changes of different aspects of the embodiments of the present application as above. In order to be brief, they are not provided in details. Therefore, any omission, modification, equivalent replacement, improvement, etc. made in the spirit and principle of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.

Claims

1. A BMC bulk upgrade method, characterized in that, The method comprises the following steps: scanning each BMC node to obtain the number of nodes and node information of each BMC node; scanning each controlled terminal to obtain the number of controlled terminals and performance data of each controlled terminal, and calculating the performance of each controlled terminal based on the performance data and corresponding preset performance weights; calculating a grouping strategy based on the number of nodes, the number of controlled terminals, and the performance of the controlled terminals; and distributing BMC upgrade tasks to corresponding controlled terminals for upgrading based on the grouping strategy; wherein calculating the grouping strategy based on the number of nodes, the number of controlled terminals, and the performance of the controlled terminals comprises: taking the remainder of the number of BMC nodes and the number of controlled terminals in each batch to obtain the number of batches, and calculating the grouping strategy by the following formula wherein, represents the number of BMC nodes of the nth group of the controlled end, represents the number of nodes in the mth batch, represents the performance of the controlled end of the nth group of the controlled end, Ct represents the number of controlled ends, represents the performance of the controlled end of the ith controlled end, represents the number of groups, represents the number of batches, represents the controlled end count.

2. The BMC bulk upgrade method according to claim 1, wherein, further comprising: calculating the number of concurrent threads for executing the upgrade based on the memory size of the controlled terminal, the preset memory occupancy ratio, and the single-thread memory occupancy number, and executing the BMC upgrade concurrently on the controlled terminal based on the number of concurrent threads.

3. The BMC bulk upgrade method according to claim 1, wherein, further comprising: receiving the execution results returned by the controlled terminal, and determining whether there is a controlled terminal that has completed all BMC upgrade tasks; if there is a controlled terminal that has completed all BMC upgrade tasks, calculating the number of controlled terminals that have not completed and the percentage of the number of controlled terminals that have completed, and taking the percentage as an influencing factor to adjust the performance of the controlled terminal; further adjusting the grouping strategy based on the adjusted performance of the controlled terminal, and continuing to distribute BMC upgrade tasks to corresponding controlled terminals for upgrading based on the adjusted grouping strategy.

4. The BMC bulk upgrade method according to claim 1, wherein, further comprising: configuring the local IP address and username and password, and configuring the IP address and username and password of the controlled terminal to ensure communication with the controlled terminal; configuring the IP address and username and password of the BMC node to ensure communication between the BMC node and the controlled terminal.

5. The BMC bulk upgrade method according to claim 1, wherein, scanning each controlled terminal to obtain the number of controlled terminals and performance data of each controlled terminal, and calculating the performance of each controlled terminal based on the performance data and corresponding preset performance weights comprises: scanning each controlled terminal to obtain CPU frequency, CPU core number, memory size, and network bandwidth, and calculating the performance of the controlled terminal based on CPU frequency weight, CPU core number weight, memory size weight, and network bandwidth weight; the performance of the controlled terminal = CPU frequency × CPU frequency weight + CPU core number × CPU core number weight + memory size × memory size weight + network bandwidth × network bandwidth weight.

6. The BMC bulk upgrade method according to claim 2, wherein, calculating the number of concurrent threads for executing the upgrade based on the memory size of the controlled terminal, the preset memory occupancy ratio, and the single-thread memory occupancy number comprises: the number of concurrent threads = memory size of the controlled terminal × preset memory occupancy ratio / single-thread memory occupancy number.

7. A BMC bulk upgrade apparatus, comprising: comprising: a first module configured to scan each BMC node to obtain the number of nodes and node information of each BMC node; a second module configured to scan each controlled terminal to obtain the number of controlled terminals and performance data of each controlled terminal, and calculate the performance of each controlled terminal based on the performance data and corresponding preset performance weights; a third module configured to calculate a grouping strategy based on the number of nodes, the number of controlled ends and the performance of the controlled ends; and a fourth module configured to distribute a BMC upgrade task to the corresponding controlled ends for upgrading based on the grouping strategy; wherein the third module is further configured to take the remainder of the number of BMC nodes and the number of BMC nodes of each of the controlled ends in each batch to obtain a number of batches, and calculate the grouping strategy by the following formula wherein, represents the number of BMC nodes of the nth group of the controlled end, represents the number of nodes in the mth batch, represents the performance of the controlled end of the nth group of the controlled end, Ct represents the number of controlled ends, represents the performance of the i th controlled end of the controlled end, represents the number of groups, represents the number of batches, represents the controlled end count.

8. A computer device, characterized by comprising: at least one processor; and a memory storing computer instructions executable on the processor, the instructions being executed by the processor to implement the steps of the method of any one of claims 1-6.

9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. The computer program is executed by the processor to implement the steps of the method of any one of claims 1-6. The computer program is executed by the processor to implement the steps of the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Cabinet server multi-level refresh progress acquisition method, device and equipment

    CN109088783A

  • Method for upgrading BMC and BIOS in matched mode, and device and readable medium

    CN110427199A