Server management methods, server systems, computer equipment and storage media
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-23
- Publication Date
- 2026-08-14
AI Technical Summary
并且,在对服务器进行批量升级时,一旦出现某些台服务器固件升级失败时,需要升级失败的服务器逐一进行排查并继续尝试升级,维护及升级的成本较高
[0015] The aforementioned server management method, server system, computer equipment, and computer-readable storage medium classify business codes into first code and second code based on their relevance to server hardware, forming a first code with high relevance to server hardware and a second code with weaker relevance. The first code is burned to the BMC (Browser Control Center) of each server in the server cluster, while the second code is burned to a functional device independent of each server's BMC. That is, the first code is retrieved and executed by the BMC of each server in the server cluster, while the second code is retrieved and executed by the functional device. This reduces the need for the same second code to be repeatedly burned to each BMC, thereby saving storage space resources for each BMC. Simultaneously, since the second code is burned to the functional device, when upgrading the server, the upgrade can be performed on the functional device based on the second code, without needing to upgrade the firmware of each individual BMC, simplifying firmware/code upgrades and maintenance. Furthermore, even if the functional device upgrade fails, the cause of the failure can be investigated and resolved without needing to investigate the failure cause of each failed server individually, simplifying the tedious process of troubleshooting and resolving upgrade anomalies.
Smart Images

Figure CN116431162B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of server technology, and in particular to a server management method, server system, computer device, and computer-readable storage medium. Background Technology
[0002] In real-world applications, a server cluster with multiple servers typically needs to work simultaneously. Each server contains a BMC (Baseboard Management Controller), which can burn business code and monitor, manage, and schedule the servers.
[0003] This means that when a server cluster with multiple servers is used in the same scenario, the same set of business code needs to be flashed and run separately in the BMC of each server. Furthermore, when performing batch upgrades on servers, if the firmware upgrade fails on some servers, each failed server needs to be checked and upgraded again, resulting in high maintenance and upgrade costs. Summary of the Invention
[0004] Therefore, it is necessary to provide a server management method, server system, computer equipment, and computer-readable storage medium that can save BMC resources, simplify code upgrades and maintenance, and simplify troubleshooting and resolving cumbersome upgrade anomalies, in order to address the above-mentioned technical problems.
[0005] On the one hand, a server management method is provided, the method comprising: acquiring business code including first code and second code, the business code being used to drive the operation of a server cluster; wherein, the first code is more correlated with the server hardware than the second code is correlated with the server hardware, the first code is acquired and executed by the BMC of each server in the server cluster, the second code is acquired and executed by a functional device, the functional device and the BMC of each server being independent of each other; scheduling the functional device to execute the second code and the server to execute the first code.
[0006] In one embodiment of this application, the first code being more relevant to the server hardware than the second code being more relevant to the server hardware includes: the first code being a hardware-related code and the second code being a hardware-unrelated code.
[0007] In one embodiment of this application, the scheduling function device running second code and the server running first code include: the function device running second code to generate a service request and sending the service request to the target interface of the BMC; the BMC responding to receiving the service request, identifying the process information and / or process control required by the service request, obtaining the process information and / or process control from the matching server hardware according to the requirements of the first code, and returning it to the function device through the target interface; the function device receiving the process information and / or process control and processing it according to the requirements of the second code.
[0008] In one embodiment of this application, the process information includes at least one of CPU information, sensor information, and memory information; the process control includes remote control.
[0009] In one embodiment of this application, the functional device includes a communication module; before scheduling the functional device to run the second code and the server to run the first code, the method further includes: scheduling the communication module to build a local area network; and connecting each server in the server cluster to the local area network.
[0010] In one embodiment of this application, the functional device includes a hard disk; the server management method further includes: trimming the operating system kernel based on preset conditions and writing the trimmed operating system kernel to the hard disk; the preset conditions include at least one of the storage space of the functional device and the modules whose business code involves the operating system kernel.
[0011] In one embodiment of this application, the functional device includes a flash memory and a main memory; the acquisition of the second code by the functional device includes: burning the second code into the flash memory; scheduling the functional device to run the second code includes: scheduling the second code to run in the main memory.
[0012] On the other hand, a server system is provided, comprising: a server cluster, functional devices, and a management device; the server cluster includes multiple servers, each server having server hardware and a BMC, wherein the BMC of each server in the server cluster is used to acquire and run first code; the functional devices are connected to the server cluster, and the functional devices and the BMC of each server are independent of each other, and the functional devices are used to acquire and run second code; the management device is connected to the server cluster and the functional devices, and is used to acquire business code including the first code and the second code, the business code being used to drive the operation of the server cluster; wherein the first code has a higher correlation with the server hardware than the second code has a higher correlation with the server hardware, and the management device schedules the functional devices to run the second code and the servers to run the first code.
[0013] On another front, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps: acquiring business code including a first code and a second code, the business code being used to drive the operation of a server cluster; wherein the first code has a higher correlation with the server hardware than the second code, the first code is acquired and executed by the BMC of each server in the server cluster, the second code is acquired and executed by a functional device, and the functional device and the BMC of each server are independent of each other; scheduling the functional device to execute the second code and the server to execute the first code.
[0014] On another front, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are performed: acquiring business code including first code and second code, the business code being used to drive the operation of a server cluster; wherein the first code is more correlated with the server hardware than the second code is correlated with the server hardware, the first code is acquired and executed by the BMC of each server in the server cluster, the second code is acquired and executed by a functional device, and the functional device and the BMC of each server are independent of each other; scheduling the functional device to execute the second code and the server to execute the first code.
[0015] The aforementioned server management method, server system, computer equipment, and computer-readable storage medium classify business codes into first code and second code based on their relevance to server hardware, forming a first code with high relevance to server hardware and a second code with weaker relevance. The first code is burned to the BMC (Browser Control Center) of each server in the server cluster, while the second code is burned to a functional device independent of each server's BMC. That is, the first code is retrieved and executed by the BMC of each server in the server cluster, while the second code is retrieved and executed by the functional device. This reduces the need for the same second code to be repeatedly burned to each BMC, thereby saving storage space resources for each BMC. Simultaneously, since the second code is burned to the functional device, when upgrading the server, the upgrade can be performed on the functional device based on the second code, without needing to upgrade the firmware of each individual BMC, simplifying firmware / code upgrades and maintenance. Furthermore, even if the functional device upgrade fails, the cause of the failure can be investigated and resolved without needing to investigate the failure cause of each failed server individually, simplifying the tedious process of troubleshooting and resolving upgrade anomalies. Attached Figure Description
[0016] Figure 1 This is an application environment diagram of an embodiment of the server management method of this application;
[0017] Figure 2 This is a flowchart illustrating an embodiment of the server management method of this application;
[0018] Figure 3 This is a schematic diagram of the structure of an embodiment of the server system of this application;
[0019] Figure 4 This is a schematic diagram of the structure of one embodiment of the functional device of this application;
[0020] Figure 5 This is a schematic diagram of the structure of an embodiment of the server cluster and functional device of this application;
[0021] Figure 6 This is a flowchart illustrating another embodiment of the server management method of this application;
[0022] Figure 7 This is a flowchart illustrating an embodiment of the first and second codes of this application.
[0023] Figure 8 This is a schematic diagram showing the connection between the BMC and the functional device according to an embodiment of this application;
[0024] Figure 9 This is a schematic diagram of the structure of an embodiment of the computer device of this application. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0026] The server management method provided in this application can be applied to, for example... Figure 1 In the application environment shown, Figure 1 This is an application environment diagram of an embodiment of the server management method of this application.
[0027] Terminal 102 communicates with server 104 via a network. This application can be applied to the management of server 104 and the server's implementation of services. It primarily saves BMC resources by separating the second code and the first code from the service code and storing them separately in functional devices and the server BMC, which are independent of the server BMC. The first code has a higher correlation with the server hardware than the second code. The BMC and functional devices are scheduled to run the first and second codes respectively, enabling server 104 to implement its desired services, thereby allowing server 104 to serve terminal 102.
[0028] The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets and portable wearable devices, and the server 104 can be implemented using a server cluster composed of multiple servers.
[0029] In one embodiment, such as Figure 2 As shown, a server management method is provided. Figure 2 This is a flowchart illustrating an embodiment of the server management method of this application. The method is applied to... Figure 1 Taking the server in the example, the following steps are included:
[0030] S201: Obtain business code including first code and second code, the business code is used to drive the server cluster to run; wherein, the first code is more related to the server hardware than the second code is related to the server hardware, the first code is obtained and run by the BMC of each server in the server cluster, the second code is obtained and run by the functional device, and the functional device and the BMC of each server are independent of each other.
[0031] In this embodiment, the server cluster includes multiple servers used in the same scenario. It is easy to understand that each server relies on code written by technical personnel to run and execute business functions; the business code is the code on which it relies.
[0032] The business code includes a first code and a second code. The first code is more relevant to the server hardware than the second code. The relevance of the code to the server hardware can be determined using several metrics, including whether it's used to drive the server hardware or respond to remote server control requests, etc., which are not limited here. For example, code used to drive the server hardware is more relevant to the server hardware than code not used to drive the server hardware.
[0033] In other words, the first code, which is highly dependent on the server hardware, is burned to the BMC (Baseboard Management Controller) to ensure the stable and timely operation of the server hardware. The second code is burned to a functional device independent of the server BMC to reduce the amount of code stored in the server BMC and save BMC resources. It's easy to understand that the first code burned to each server can be the same or different, but the second code of each server in a server cluster serving the same scenario should be the same. This reduces the amount of identical code stored in each BMC, thus reducing the storage space occupied by identical code in the server cluster.
[0034] The server hardware can be a CPU (Central Processing Unit), sensors, CPLD (Complex Programmable Logic Device), BIOS (Basic Input Output System), etc., and is not limited here.
[0035] At the same time, the number of functional devices should be less than the number of servers in the server cluster. This reduces the number of devices required to refresh the second code when upgrading the server, simplifying firmware / code upgrades and maintenance. Furthermore, even if a functional device upgrade fails, the cause of the failure can be investigated and resolved, reducing the number of devices required to investigate the failure and refresh the second code again, thus simplifying the tedious process of troubleshooting and resolving upgrade anomalies.
[0036] Optionally, the number of functional devices can be one, further simplifying the upgrade and maintenance process. In the event of an upgrade failure, only one functional device needs to be investigated and refreshed, which further simplifies the tedious operations of troubleshooting and resolving upgrade anomalies. Alternatively, the number of functional devices can be proportional to the number of servers in the server cluster, such as 1:5 or 1:10, to reduce the performance requirements of the functional devices and reduce the data processing volume of the functional devices.
[0037] S202: The scheduling function device runs the second code and the server runs the first code.
[0038] In this embodiment, in response to the BMC and the functional device being able to acquire and run the first code and the second code respectively, the server BMC is scheduled to run the first code and the functional device is scheduled to run the second code, so that the two cooperate to realize the business to be implemented by the server cluster, thereby enabling the server system to serve the terminal.
[0039] In the aforementioned server management method, the second code, which is less dependent on server hardware, is acquired and executed by the functional device, thus saving storage space resources on each BMC. Simultaneously, since the second code is burned into the functional device, upgrading the functional device can be performed on the second code portion when upgrading the server, simplifying firmware / code upgrades and maintenance. Furthermore, even if the functional device upgrade fails, the cause of the failure can be investigated and resolved without needing to investigate the failure causes of each failed server individually, simplifying the tedious process of troubleshooting and resolving upgrade anomalies.
[0040] Furthermore, the first code and the second code can be distinguished by technicians, or written separately when writing business code, to reduce the steps required for the computer to separate the first and second codes, thus reducing the computational burden on the computer. Alternatively, technicians do not need to specifically distinguish between the first and second codes when writing business code; a management device can separate the first and second codes within the business code, automating the separation and reducing the workload of technicians. The following example illustrates this using a management device to separate the first and second codes within the business code.
[0041] In one embodiment, such as Figure 3 As shown, a server system is provided. Figure 3 This is a schematic diagram of the structure of an embodiment of the server system of this application.
[0042] The server system includes: a server cluster 31, functional devices 32, and a management device 33, wherein:
[0043] Server cluster 31 includes multiple servers, each with server hardware and a BMC. The BMC of each server is used to acquire and run the first code.
[0044] Functional device 32 is connected to server cluster 31, and functional device 32 is independent of the BMC of each server. Functional device 32 is used to acquire and run second code.
[0045] The management device 33 is connected to the server cluster 31 and the functional device 32, and is used to obtain business code including a first code and a second code. The business code is used to drive the server cluster to run. The first code has a higher correlation with the server hardware than the second code. The management device schedules the second code to run and the server to run the first code.
[0046] In one embodiment, such as Figure 4 As shown, a functional device is provided. Figure 4 This is a schematic diagram of the structure of an embodiment of the functional device of this application.
[0047] The functional device 32 includes a flash memory 321 and a main memory 322. The flash memory 321 is used to burn the second code; the main memory 322 is used to run the second code.
[0048] Furthermore, the functional device 32 also includes a hard disk 323, which is used to store the operating system kernel after being trimmed based on preset conditions.
[0049] Optionally, the functional device 32 further includes a communication module 324, which is used to construct a local area network. For example... Figure 5 As shown, Figure 5This is a schematic diagram of a server cluster and functional device according to an embodiment of this application. The communication module 324 can be a network card. If so, the functional device 32 is connected to each server in the server cluster 31 through a local area network (i.e., LAN).
[0050] If so, the server system can also perform the following steps, the details of which will be described later:
[0051] S601: Obtain the business code that drives the server cluster to run.
[0052] S602: Divide the business code into first code and second code.
[0053] In this embodiment, based on the correlation between the business code and the server hardware, the business code is divided into a first code and a second code. The correlation between the first code and the server hardware is higher than that between the second code and the server hardware.
[0054] Furthermore, the first code is hardware-related code, and the second code is hardware-unrelated code.
[0055] S603: Burn the first code to the BMC and burn the second code to the functional device.
[0056] In this embodiment, the first code is burned to the BMC of each server in the server cluster, and the second code is burned to the functional device; wherein the functional device and the BMC of each server are independent of each other.
[0057] Alternatively, the second code can be burned into flash memory, or it can be scheduled to run in main memory.
[0058] S604: The scheduling function device constructs a local area network.
[0059] In this embodiment, after burning the first code and the second code, the communication module of the functional device can be scheduled to build a local area network; each server of the server cluster is connected to the local area network to realize the communication connection between the functional device and the server cluster.
[0060] S605: Schedules the execution of the first and second code.
[0061] In this embodiment, the scheduling function device runs the second code and the server runs the first code; that is, the first code and the second code run on the function device and the server BMC, respectively, to implement the server's services. Of course, there will be services that require cooperation between the function device and the server. The following are examples of working methods that require cooperation between the function device and the server to implement services:
[0062] S6051: The functional device generates a service request and sends the service request to the server.
[0063] In this embodiment, the functional device runs the second code to generate a service request and sends the service request to the target interface of the BMC.
[0064] S6052: BMC identifies service requests.
[0065] In this embodiment, the BMC responds to receiving a service request by identifying the process information and / or process control required by the service request.
[0066] Process information includes at least one of CPU information, sensor information, and memory information; process control includes remote control.
[0067] S6053: The BMC obtains the data requested by the business request and returns it to the functional device through the target interface.
[0068] In this embodiment, process information and / or process control are obtained from the self-matching server hardware as required by the first code, and the functional device is returned through the target interface.
[0069] S6054: The functional device receives the requested data and processes it.
[0070] In this embodiment, the functional device receives process information and / or process control, and performs processing according to the requirements of the second code.
[0071] In this embodiment, the operating system kernel can also be trimmed based on preset conditions, and the trimmed operating system kernel can be written to the hard disk of the functional device. The preset conditions include at least one of the following: the storage space of the functional device and modules whose business code involves the operating system kernel. The operation of trimming the operating system kernel can be performed before step S604, as long as the complete process steps are achieved; the specific timing of implementation is not limited here.
[0072] Specific limitations regarding the server system can be found in the limitations of the server management methods described above and below, and will not be repeated here. Each module in the aforementioned server system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module. The following details the specific steps of the server management method in the server system.
[0073] In one embodiment, such as Figure 6 As shown, another server management method is provided. Figure 6 This is a flowchart illustrating another embodiment of the server management method of this application.
[0074] S601: Obtain the business code that drives the server cluster to run.
[0075] In this embodiment, business code written by technicians is obtained, and each server in the server cluster relies on the business code to implement business functions in order to serve the terminal.
[0076] S602: Divide the business code into first code and second code.
[0077] In this embodiment, based on the correlation between the business code and the server hardware, the business code is divided into a first code and a second code. The correlation between the first code and the server hardware is higher than that between the second code and the server hardware, so as to reasonably divide the first code and the second code, thereby improving the stability of the server system operation and the timeliness of the server response.
[0078] Furthermore, the first code is hardware-related code, and the second code is hardware-independent code. For example, the server BMC runs the first code to drive the temperature sensor to detect the temperature, and the functional device runs the second code to obtain the temperature detected by the temperature sensor and determine whether it is necessary to drive the fan to work / adjust the fan speed.
[0079] Optionally, the business code can be divided into a first code and a second code by identifying and separating them through a pre-trained model; or, when writing the business code, the technicians can mark the first code and the second code differently and identify the marks to separate the first code and the second code; or, the technicians can separate the first code and the second code, or write the first code and the second code separately, which is not limited here.
[0080] S603: Burn the first code to the BMC and burn the second code to the functional device.
[0081] In this embodiment, first code is programmed to the BMC of each server in the server cluster, and second code is programmed to the functional device. The functional device and the BMC of each server are independent of each other. Optionally, the first code can be programmed to the BMC and the second code can be programmed to the functional device in response to receiving a programming instruction.
[0082] Alternatively, the second code can be burned into a flash memory (such as Flash), and the second code can be scheduled to run in main memory (i.e., RAM).
[0083] Furthermore, the number of functional devices is less than the number of servers in the server cluster. For example, the number of functional devices can be one; or the number of functional devices can be proportional to the number of servers, such as 1:5, 1:10, etc. In other words, the number of functional devices can match the number of servers. A proportional relationship between the two helps to reduce the performance requirements of the functional devices and also reduces the amount of data processing done by the functional devices.
[0084] Optionally, the first code and / or the second code can be compiled into binary files before burning, and the first code and / or the second code in binary file form can be burned.
[0085] Generally, during firmware upgrades, the primary hardware-related code is typically modified only slightly or not at all. However, after separating the primary and secondary code, the frequency of updating the secondary code may be higher than that of updating the primary code. Therefore, when performing batch upgrades on a server cluster, if the current upgrade only updates the secondary code, only the updated secondary code needs to be flashed to the functional devices, eliminating the need for batch upgrades on each server. In other words, this design simplifies the upgrade and maintenance process and also facilitates the maintenance of the secondary code.
[0086] S604: The scheduling function device constructs a local area network.
[0087] In this embodiment, after burning the first and second codes, the communication module of the functional device can be scheduled to build a local area network (LAN). Each server in the server cluster connects to the LAN to realize communication between the functional device and the server cluster, thereby enabling interaction between the functional device and the server cluster.
[0088] S605: Schedules the execution of the first and second code.
[0089] In this embodiment, the scheduling function device runs the second code and the server runs the first code; that is, the first code and the second code run on the function device and the server BMC, respectively, to implement the server's services. Of course, there will be services that require cooperation between the function device and the server, such as... Figure 7 As shown, Figure 7 This is a flowchart illustrating an embodiment of the first and second codes of this application. The following provides examples of the working method requiring the cooperation of functional devices and a server to implement business functions:
[0090] S6051: The functional device generates a service request and sends the service request to the server.
[0091] In this embodiment, as Figure 8 The examples shown in the text, Figure 8This is a schematic diagram illustrating the connection between the BMC and the functional device according to an embodiment of this application. Each server's BMC can provide several interfaces, each used to provide different information / services / controls. Correspondingly, the functional device can also have several interfaces, each used to receive different information / services / controls.
[0092] The functional device executes second code to generate a service request and sends the service request to the target interface of the BMC. The target interface is one of several interfaces of the server BMC. For example, if the service request is to obtain CPU information, the functional device sends the service request to the interface used to provide CPU information.
[0093] S6052: BMC identifies service requests.
[0094] In this embodiment, the BMC responds to receiving a service request by identifying the process information and / or process control required by the service request.
[0095] The process information includes at least one of CPU information, sensor information, and memory information; the process control includes remote control such as KVM (Kernel-based Virtual Machine, an open-source system virtualization module).
[0096] S6053: The BMC obtains the data requested by the business request and returns it to the functional device through the target interface.
[0097] In this embodiment, process information and / or process control are obtained from the self-matching server hardware as required by the first code, and the interface matching the functional device is returned through the target interface.
[0098] S6054: The functional device receives the requested data and processes it.
[0099] In this embodiment, the functional device receives process information and / or process control, and performs processing according to the requirements of the second code.
[0100] In this embodiment, the operating system kernel can also be trimmed based on preset conditions, and the trimmed operating system kernel can be written to the hard disk of the functional device, thereby reducing redundant operating system kernels and reducing the space occupied on the hard disk. The preset conditions include at least one of the following: the storage space of the functional device and modules whose business code involves the operating system kernel. The operating system kernel trimming operation can be performed before step S604, as long as the complete process steps are achieved; the specific timing of implementation is not limited here.
[0101] Therefore, in this embodiment, the hardware-independent second code of the BMC is "stripped" into an independent layer (application layer) and runs on an independent module outside the server BMC. That is, the second code runs on the functional device, which is equivalent to memory sharing in this embodiment. The functional device can be used to simultaneously monitor and manage multiple servers in a server cluster within the same scenario. With this design, this embodiment can effectively reduce the memory occupied by the BMC on each server, saving BMC resources and thus reducing memory-related costs. At the same time, the server management method of this embodiment also facilitates the separate operation, maintenance, and upgrade of the hardware-related first code and the hardware-independent second code, effectively reducing BMC code development and maintenance costs. It also simplifies the tedious operations of troubleshooting and resolving upgrade anomalies, reducing the time and manpower costs associated with troubleshooting potential "firmware upgrade failures on some server BMCs" issues during batch upgrades.
[0102] It should be understood that, although Figure 2 , Figure 6 as well as Figure 7 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2 , Figure 6 as well as Figure 7 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0103] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, Figure 9 This is a schematic diagram of the structure of an embodiment of the computer device of this application.
[0104] The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores server management and server system operational data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a server management method.
[0105] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0106] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:
[0107] S201: Obtain business code including a first code and a second code. The business code is used to drive the server cluster operation. The first code is more dependent on the server hardware than the second code. The first code is obtained and executed by the BMC of each server in the server cluster, while the second code is obtained and executed by the functional device. The functional device and the BMC of each server are independent of each other.
[0108] S202: The scheduling function device runs the second code and the server runs the first code.
[0109] In one embodiment, the processor, when executing the computer program, further performs the following steps:
[0110] S601: Obtain the business code that drives the server cluster to run.
[0111] S602: Divide the business code into first code and second code.
[0112] In this embodiment, based on the correlation between the business code and the server hardware, the business code is divided into a first code and a second code. The correlation between the first code and the server hardware is higher than that between the second code and the server hardware.
[0113] Furthermore, the first code is hardware-related code, and the second code is hardware-unrelated code.
[0114] S603: Burn the first code to the BMC and burn the second code to the functional device.
[0115] In this embodiment, the first code is burned to the BMC of each server in the server cluster, and the second code is burned to the functional device; wherein the functional device and the BMC of each server are independent of each other.
[0116] Alternatively, the second code can be burned into flash memory, or it can be scheduled to run in main memory.
[0117] S604: The scheduling function device constructs a local area network.
[0118] In this embodiment, after burning the first code and the second code, the communication module of the functional device can be scheduled to build a local area network; each server of the server cluster is connected to the local area network to realize the communication connection between the functional device and the server cluster.
[0119] S605: Schedules the execution of the first and second code.
[0120] In this embodiment, the scheduling function device runs the second code and the server runs the first code; that is, the first code and the second code run on the function device and the server BMC, respectively, to implement the server's services. Of course, there will be services that require cooperation between the function device and the server. The following are examples of working methods that require cooperation between the function device and the server to implement services:
[0121] S6051: The functional device generates a service request and sends the service request to the server.
[0122] In this embodiment, the functional device runs the second code to generate a service request and sends the service request to the target interface of the BMC.
[0123] S6052: BMC identifies service requests.
[0124] In this embodiment, the BMC responds to receiving a service request by identifying the process information and / or process control required by the service request.
[0125] Process information includes at least one of CPU information, sensor information, and memory information; process control includes remote control.
[0126] S6053: The BMC obtains the data requested by the business request and returns it to the functional device through the target interface.
[0127] In this embodiment, process information and / or process control are obtained from the self-matching server hardware as required by the first code, and the functional device is returned through the target interface.
[0128] S6054: The functional device receives the requested data and processes it.
[0129] In this embodiment, the functional device receives process information and / or process control, and performs processing according to the requirements of the second code.
[0130] In this embodiment, the operating system kernel can also be trimmed based on preset conditions, and the trimmed operating system kernel can be written to the hard disk of the functional device. The preset conditions include at least one of the following: the storage space of the functional device and modules whose business code involves the operating system kernel. The operation of trimming the operating system kernel can be performed before step S604, as long as the complete process steps are achieved; the specific timing of implementation is not limited here.
[0131] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0132] S201: Obtain business code including first code and second code, the business code is used to drive the server cluster to run; wherein, the first code is more related to the server hardware than the second code is related to the server hardware, the first code is obtained and run by the BMC of each server in the server cluster, the second code is obtained and run by the functional device, and the functional device and the BMC of each server are independent of each other.
[0133] S202: The scheduling function device runs the second code and the server runs the first code.
[0134] In one embodiment, when the computer program is executed by the processor, it further performs the following steps:
[0135] S601: Obtain the business code that drives the server cluster to run.
[0136] S602: Divide the business code into first code and second code.
[0137] In this embodiment, based on the correlation between the business code and the server hardware, the business code is divided into a first code and a second code. The correlation between the first code and the server hardware is higher than that between the second code and the server hardware.
[0138] Furthermore, the first code is hardware-related code, and the second code is hardware-unrelated code.
[0139] S603: Burn the first code to the BMC and burn the second code to the functional device.
[0140] In this embodiment, the first code is burned to the BMC of each server in the server cluster, and the second code is burned to the functional device; wherein the functional device and the BMC of each server are independent of each other.
[0141] Alternatively, the second code can be burned into flash memory, or it can be scheduled to run in main memory.
[0142] S604: The scheduling function device constructs a local area network.
[0143] In this embodiment, after burning the first code and the second code, the communication module of the functional device can be scheduled to build a local area network; each server of the server cluster is connected to the local area network to realize the communication connection between the functional device and the server cluster.
[0144] S605: Schedules the execution of the first and second code.
[0145] In this embodiment, the scheduling function device runs the second code and the server runs the first code; that is, the first code and the second code run on the function device and the server BMC, respectively, to implement the server's services. Of course, there will be services that require cooperation between the function device and the server. The following are examples of working methods that require cooperation between the function device and the server to implement services:
[0146] S6051: The functional device generates a service request and sends the service request to the server.
[0147] In this embodiment, the functional device runs the second code to generate a service request and sends the service request to the target interface of the BMC.
[0148] S6052: BMC identifies service requests.
[0149] In this embodiment, the BMC responds to receiving a service request by identifying the process information and / or process control required by the service request.
[0150] Process information includes at least one of CPU information, sensor information, and memory information; process control includes remote control.
[0151] S6053: The BMC obtains the data requested by the business request and returns it to the functional device through the target interface.
[0152] In this embodiment, process information and / or process control are obtained from the self-matching server hardware as required by the first code, and the functional device is returned through the target interface.
[0153] S6054: The functional device receives the requested data and processes it.
[0154] In this embodiment, the functional device receives process information and / or process control, and performs processing according to the requirements of the second code.
[0155] In this embodiment, the operating system kernel can also be trimmed based on preset conditions, and the trimmed operating system kernel can be written to the hard disk of the functional device. The preset conditions include at least one of the following: the storage space of the functional device and modules whose business code involves the operating system kernel. The operation of trimming the operating system kernel can be performed before step S604, as long as the complete process steps are achieved; the specific timing of implementation is not limited here.
[0156] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0157] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0158] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A server management method, characterized in that, include: A business code, including a first code and a second code, is acquired to drive the operation of the server cluster. The first code is more correlated with the server hardware than the second code. The first code is acquired and executed by the BMC of each server in the server cluster, and the second code is acquired and executed by a functional device. The functional device is independent of the BMC of each server. The number of functional devices is less than the number of servers in the server cluster. The functional device is scheduled to run the second code, and the server is scheduled to run the first code; The higher correlation between the first code and the server hardware compared to the second code includes: The first code is hardware-related code, and the second code is hardware-unrelated code; The scheduling of the functional device to run the second code and the server to run the first code includes: The functional device runs the second code to generate a service request and sends the service request to the target interface of the BMC; In response to receiving the service request, the BMC identifies the process information and / or process control required by the service request, obtains the process information and / or process control according to the self-matching server hardware required by the first code, and returns the functional device through the target interface. The functional device receives the process information and / or the process control, and performs processing according to the requirements of the second code.
2. The server management method according to claim 1, characterized in that, The process information includes at least one of CPU information, sensor information, and memory information; the process control includes remote control.
3. The server management method according to claim 1, characterized in that, The functional device includes a communication module; Before scheduling the functional device to run the second code and the server to run the first code, the following steps are also included: The communication modules are scheduled to build a local area network; Each server in the server cluster is connected to the local area network.
4. The server management method according to claim 1, characterized in that, The functional device includes a hard disk; The server management method also includes: The operating system kernel is trimmed based on preset conditions, and the trimmed operating system kernel is written to the hard disk; The preset conditions include at least one of the storage space of the functional device and the modules in the operating system kernel involved in the business code.
5. The server management method according to claim 1, characterized in that, The functional device includes a flash memory and a main memory; The acquisition of the second code by the functional device includes: burning the second code into the flash memory; The scheduling of the functional device to run the second code includes: scheduling the second code to run in the main memory.
6. A server system for implementing the server management method as described in any one of claims 1 to 5, characterized in that, The server system includes: A server cluster includes multiple servers, each server having server hardware and a BMC, wherein the BMC of each server in the server cluster is used to acquire and run first code; A functional device is connected to the server cluster, and the functional device is independent of the BMC of each server. The functional device is used to acquire and run second code; the number of the functional devices is less than the number of servers in the server cluster. A management device, connected to the server cluster and the functional device, is used to acquire business code including the first code and the second code, the business code being used to drive the server cluster to run; wherein the first code has a higher correlation with the server hardware than the second code has a higher correlation with the server hardware, and schedules the functional device to run the second code and the server to run the first code.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the server management method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the server management method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Implementation method and system of BMC (baseboard management controller) code logic
CN108920175A
Data processing method and device for micro-service application and computer equipment
CN112667204A