Server type monitoring method and device

By reading preset identifiers in the server motherboard and initializing the network controller, loading the target device tree file, and configuring information for the substrate management controller, the monitoring complexity of bare metal and non-bare metal servers is solved, and the development efficiency and Security.

CN119201619APending Publication Date: 2024-12-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411310627.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the prior art, during the research and development process, the server motherboard needs to prepare different substrate management controller (BMC) images for bare metal servers and non-bare metal servers, resulting in complex topology and increasing the inefficiency of product development.

Method used

By reading the preset identifier in the server motherboard during the startup process of the substrate management controller image, determining it is a bare metal model or a non-bare metal model, and initializing the corresponding network controller after verification and loading the target device tree file, set preset configuration information for BMC mirroring, and realize efficient monitoring and configuration of the two models.

Benefits of technology

It improves the development efficiency of server motherboards, simplifies product R&D processes, ensures the integrity and security of motherboards, reduces the complexity of manual configuration and maintenance, and enhances the reliability and security of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201619A_ABST
    Figure CN119201619A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cloud computing, and discloses a server model monitoring method and device. The method comprises the following steps of: reading a preset identifier in a server mainboard at a first stage in a starting process of a substrate management controller mirror image, and initializing a network controller corresponding to a bare metal model when a verification result of the server mainboard is that the verification is passed; in a network configured by the network controller, loading a target device tree file corresponding to the bare metal model in the server mainboard; and setting preset configuration information for a substrate management controller mirror image by adopting the target equipment tree file. According to the method, on the basis that the preset identifier is adopted to determine that the machine type corresponding to the mainboard is the bare metal machine type or the non-bare metal machine type, the step of configuring the substrate management controller mirror image for the bare metal machine type is clarified, so that the configuration of the bare metal machine type can be efficiently completed while two machine types are monitored by adopting one management controller mirror image; therefore, the development efficiency of the mainboard is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cloud computing servers, and in particular to a server model monitoring method and device. Background Art

[0002] With the rapid development and widespread application of cloud computing technology, the performance loss problem of virtualization technology has gradually been exposed. To solve this problem, bare metal servers have emerged by combining the hardware advantages of traditional physical servers with the virtualization service functions of cloud computing.

[0003] In the related art, during the development of a server motherboard, it is often necessary to prepare a corresponding BMC image for a bare metal model and a non-bare metal model in the baseboard management controller (BMC) of the motherboard, which makes the development and testing process of the motherboard more complicated and leads to low product development efficiency. A better solution is needed. Summary of the invention

[0004] In view of this, the present invention provides a server model monitoring method and device to solve the problem of low product development efficiency caused by the complex topology structure of the server motherboard when monitoring bare metal servers and non-bare metal servers.

[0005] On one hand, the present invention provides a server model monitoring method, the method comprising: in the first stage of the startup process of the baseboard management controller image, reading a preset identifier in the server mainboard, the preset identifier is used to indicate whether the server mainboard corresponds to a bare metal model or a non-bare metal model;

[0006] When the preset identifier indicates that the server mainboard is a bare metal model, when the result of verifying the server mainboard is that the verification passes, initializing a network controller corresponding to the bare metal model;

[0007] In the network configured by the network controller, a target device tree file corresponding to the bare metal model in the server motherboard is loaded, and in the second stage of the startup process of the baseboard management controller image, the target device tree file is used to set preset configuration information for the baseboard management controller image.

[0008] Another aspect of the present invention provides a server model monitoring device, the device comprising: a reading module, used to read a preset identifier in a server mainboard in the first stage of the startup process of a baseboard management controller image, the preset identifier being used to indicate whether the server mainboard corresponds to a bare metal model or a non-bare metal model;

[0009] An initialization module, configured to initialize a network controller corresponding to the bare metal model when the preset identifier indicates that the server motherboard is a bare metal model and the result of verifying the server motherboard is that the verification passes;

[0010] A configuration module is used to load a target device tree file corresponding to the bare metal model in the server motherboard in the network configured by the network controller, and in the second stage of the startup process of the baseboard management controller image, use the target device tree file to set preset configuration information for the baseboard management controller image.

[0011] On the other hand, the present invention also provides a computer device, which includes: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor implements the above-mentioned server model monitoring method by executing the computer instructions.

[0012] Another aspect of the present invention further provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable a computer to implement the above-mentioned server model monitoring method.

[0013] Another aspect of the present invention further provides a computer program product, including computer instructions, which are used to enable a computer to execute the server model monitoring method of the first aspect or any corresponding embodiment thereof.

[0014] The server model monitoring method in this embodiment determines whether the model corresponding to the mainboard is a bare metal model or a non-bare metal model based on the preset identifier of the server mainboard during the startup process of the BMC image, and configures the BMC image with preset configuration information corresponding to the bare metal model. While using the preset identifier to determine whether the model corresponding to the mainboard is a bare metal model or a non-bare metal model, the steps for configuring the baseboard management controller image for the bare metal model are clarified, so that the bare metal model can be efficiently configured while monitoring two models using one management controller image, thereby improving the development efficiency of the mainboard. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 It is a flow chart of a server model monitoring method provided by an embodiment of the present invention;

[0017] Figure 2 It is a schematic diagram of a BMC image startup process of a server model monitoring method provided by an embodiment of the present invention;

[0018] Figure 3 It is a specific flow chart of another server model monitoring method provided by an embodiment of the present invention;

[0019] Figure 4 It is a structural schematic diagram of a server model monitoring device provided by an embodiment of the present invention;

[0020] Figure 5 It is a structural schematic diagram of another server model monitoring device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0021] With the rapid development of information technology, cloud computing has become an important platform for enterprises and individuals to process data, store files, and run applications. Cloud computing makes the use of computing resources more flexible and scalable. Enterprises no longer need to invest heavily in building local data centers, but can obtain computing power from cloud service providers on demand. In the architecture of cloud computing, virtualization technology plays a core role. By abstracting physical hardware into multiple virtual machines, resources can be used efficiently, and the system also has elasticity and high availability. However, although virtualization technology has greatly improved the flexible allocation of resources and the reliability of the system, it has also introduced certain performance overhead.

[0022] In a virtualized environment, multiple virtual machines share the computing, storage, and network resources of the same physical server. Although this can effectively improve resource utilization, isolation, scheduling, memory allocation, and other operations between virtual machines will introduce additional system overhead, especially when dealing with high-performance computing, database operations, large-scale concurrent requests, and other tasks that require high real-time and efficiency. These performance losses become more obvious. In addition, virtualization may also bring complex management and security issues. Especially in a multi-tenant environment, how to ensure data isolation and system security between different tenants has become an important challenge facing cloud computing.

[0023] In this technical context, bare metal servers came into being. Unlike virtualization technology, bare metal servers provide the ability to directly use physical hardware, and users do not need to go through the virtual layer to run their applications. This direct access to hardware not only eliminates the performance overhead brought by virtualization, but also maximizes the computing power of physical servers. Bare metal servers have the characteristics of low latency and high performance, and are particularly suitable for high-load work scenarios, such as large databases, complex computing tasks, high-frequency trading systems, etc.

[0024] However, the above technology may have the following problems:

[0025] In the related technology, for bare metal servers and non-bare metal servers derived from the same server motherboard, two different BMC images need to be generated during the research and development stage of the motherboard, one of which is dedicated to monitoring bare metal servers, and the other is dedicated to monitoring non-bare metal servers. This increases the topological complexity of the motherboard, making the production management and R&D testing processes more complicated, increasing the difficulty of management and control, and thus leading to low product development efficiency.

[0026] To solve at least one of the above problems, various embodiments of the present invention provide a server model monitoring method, comprising: in a first stage of a startup process of a baseboard management controller image, reading a preset identifier in a server mainboard, the preset identifier being used to indicate whether the server mainboard corresponds to a bare metal model or a non-bare metal model;

[0027] When the preset identifier indicates that the server mainboard is a bare metal model, when the result of verifying the server mainboard is that the verification passes, initializing a network controller corresponding to the bare metal model;

[0028] In the network configured by the network controller, a target device tree file corresponding to the bare metal model in the server motherboard is loaded, and in the second stage of the startup process of the baseboard management controller image, the target device tree file is used to set preset configuration information for the baseboard management controller image.

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0030] According to an embodiment of the present invention, a server model monitoring method is provided. Figure 1 FIG. 1 is a flow chart of a server model monitoring method provided by an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0031] Step S101, in the first stage of the startup process of the baseboard management controller image, a preset identifier in the server mainboard is read, and the preset identifier is used to indicate whether the server mainboard corresponds to a bare metal model or a non-bare metal model;

[0032] Step S102, when the preset identifier indicates that the server motherboard is a bare metal model, when the result of verifying the server motherboard is that the verification passes, initializing a network controller corresponding to the bare metal model;

[0033] Step S103, in the network configured by the network controller, load the target device tree file corresponding to the bare metal model in the server motherboard, and in the second stage of the startup process of the baseboard management controller image, use the target device tree file to set preset configuration information for the baseboard management controller image.

[0034] In one possible implementation, a baseboard management controller (BMC) may be an embedded microcontroller on a server motherboard, used to provide remote management, hardware monitoring, firmware management, etc. of the server; wherein remote management may include but is not limited to: powering on and off, restarting, monitoring hardware status, and managing firmware updates.

[0035] Furthermore, a BMC image may refer to a BMC firmware file, which is a collection of an operating system and its application programs running on BMC hardware. By loading and running the BMC image, the BMC may implement management functions for servers and systems. Among them, the BMC image may include but is not limited to software components such as the BMC operating system, drivers, application programs, and related configurations.

[0036] In one possible implementation, a server motherboard refers to a main circuit board dedicated to a server; a bare metal server (hereinafter collectively referred to as a bare metal model) refers to a server that has no virtualization layer and runs an operating system and applications directly on physical hardware (i.e., the server motherboard); a non-bare metal server (hereinafter collectively referred to as a non-bare metal model) refers to a server that runs at least one virtual machine on physical hardware.

[0037] Among them, the operating system of the bare metal model interacts directly with the physical hardware without virtualization overhead; the non-bare metal model uses virtualization software as an intermediary for the interaction between the operating system and the physical hardware, which results in virtualization overhead.

[0038] In a possible implementation, the first stage in the startup process of the BMC image may refer to a universal boot loader (Universal Boot Loader, UBOOT) startup stage of the BMC image.

[0039] Here, UBOOT refers to a boot loader program used to initialize the system during the startup process of the BMC image; initializing the system may include but is not limited to: hardware initialization, hardware configuration, and operating system loading.

[0040] In a possible implementation, when the preset identifier indicates that the server motherboard is a bare metal model, when the result of verifying the server motherboard is that the verification passes, initializing a network controller corresponding to the bare metal model includes:

[0041] When the preset identification indicates that the server motherboard is a bare metal model, the BMC image Internet Packet Groper (Ping) corresponding to the bare metal model is used. When the unique component returns the request information, it indicates that the motherboard corresponds to the bare metal model; when the unique component does not return the request information, it indicates that the motherboard does not correspond to the bare metal model, or the unique component does not exist in the bare metal model, triggering an alarm operation.

[0042] Here, the unique components corresponding to the bare metal model may include: a data processing unit (DPU), a unique network adapter; by performing secondary verification on the bare metal model, the generation security of the motherboard during the generation stage can be improved.

[0043] Furthermore, when the preset identifier indicates that the server motherboard is a non-bare metal model, the secondary verification of the non-bare metal model may include: checking the virtual hardware device and checking the network environment.

[0044] In a possible implementation, initializing the network controller corresponding to the bare metal model may refer to identifying the network controller connected to the BMC and initializing the physical network interface directly connected to the bare metal model.

[0045] In a possible implementation, a device tree source (DTS) may refer to a data structure that describes hardware components of a bare metal machine or a non-bare metal machine, and an image of an operating system of a BMC image may manage hardware components of a bare metal machine or a non-bare metal machine based on the DTS; a second stage of a startup process of a BMC image may include but is not limited to: a Linux Kernel stage, an initial RAM filesystem (such as a temporary file system initramfs) stage, and a run time stage.

[0046] Among them, the Linux Kernel stage can refer to the kernel startup stage in the process of starting the operating system of the BMC image; the initramfs stage can refer to the stage after the Linux kernel is started and before the real root file system is mounted, when the kernel uses the temporary file system (initramfs) in the memory to perform initialization tasks; the Run Time stage can refer to the entire running process of the operating system from the completion of startup to the stop or restart.

[0047] Furthermore, the preset configuration information set for the baseboard management controller image using the target device tree file may include: network configuration and hardware configuration information.

[0048] Exemplarily, the network configuration corresponding to the bare metal model may include: static IP configuration, multi-path network configuration, and the network configuration corresponding to the non-bare metal model may include: standard network configuration, enabling the auto-negotiation mechanism; the hardware configuration information corresponding to the bare metal model may include: dedicated hardware device support, large-capacity memory configuration, and the hardware configuration information corresponding to the non-bare metal model may include: virtualization support device configuration, virtual device support.

[0049] Through the above method, by reading the preset identification in the server motherboard, bare metal models and non-bare metal models can be distinguished quickly and accurately; by adding verification steps, the integrity and security of the motherboard can be ensured to prevent unauthorized models from being initialized incorrectly; while using the preset identification to determine whether the corresponding model of the motherboard is a bare metal model or a non-bare metal model, the steps for configuring the baseboard management controller image for the bare metal model are clarified, so that one management controller image can be used to monitor both models while efficiently completing the configuration of the bare metal model, thereby improving the development efficiency of the motherboard.

[0050] In a specific embodiment, reading a preset identifier in a server mainboard is implemented based on the following steps:

[0051] The baseboard management controller is used to read the preset identification in the identification bytes burned in the production process stored in the server mainboard.

[0052] In a possible implementation, the burned identification bytes may be stored in a non-volatile memory of the server mainboard; the identification bytes may include but are not limited to: mainboard model, hardware features, and machine type.

[0053] Specifically, during the UBOOT startup process of the BMC image, a preset identifier in an identifier byte is read from a non-volatile memory of the server mainboard, and the preset identifier is parsed to determine the server model corresponding to the mainboard.

[0054] Exemplarily, the non-volatile memory (Electrically Erasable Programmable Read-Only Memory, EEPROM) of the mainboard may refer to an Electrically Erasable Programmable Read-Only Memory (EEPROM); the preset identifier in the identification byte may use 1 to represent a bare metal model and may use 0 to represent a non-bare metal model.

[0055] Through the above method, by burning the identification bytes during the production process, the accuracy of the identification of each server is ensured, thereby improving the accuracy of BMC monitoring of bare metal models and non-bare metal models.

[0056] In a specific embodiment, initializing a network controller corresponding to a bare metal model includes:

[0057] Identify the media access control device corresponding to the bare metal model in the server motherboard;

[0058] Initialize the hardware information corresponding to the media access control chip in the media access control device, and disable the auto-negotiation mechanism of the media access control device; the hardware information includes: physical address and interface type.

[0059] Specifically, during the UBOOT startup process of the BMC image, the initial hardware information of the Media Access Control (MAC) device corresponding to the mainboard pre-stored in the EEPROM of the BMC is read, and the hardware information of the MAC device is initialized based on the initial hardware information.

[0060] The hardware information of the MAC device is initialized, which may include but is not limited to: initializing the physical address (MAC Address), interface type, and transmission rate of the MAC chip.

[0061] Exemplarily, a MAC device may refer to the part of the network interface controller of the mainboard that is responsible for processing data link layer tasks. The MAC device may include, but is not limited to: a MAC chip, other peripheral hardware, firmware or software components; a MAC chip may be an integrated circuit at the hardware level specifically used to process MAC layer functions.

[0062] In a possible implementation, disabling the auto-negotiation mechanism of the media access control device may refer to turning off the function of automatically negotiating network connection parameters between network devices and directly setting fixed parameters.

[0063] Specifically, the MAC device is configured according to the preset network rate and duplex mode, so that the MAC device communicates using the configured parameters.

[0064] For example, the rate of the MAC device is fixed to 1000 Mbps, and the duplex mode is set to full duplex.

[0065] The auto-negotiation mechanism may refer to allowing the device to automatically negotiate the best transmission rate and duplex mode.

[0066] In a possible implementation, when the mainboard corresponds to a non-bare metal model, initializing the network controller corresponding to the non-bare metal model may include: initializing the MAC address of the MAC device and starting the auto-negotiation mechanism.

[0067] Through the above method, by identifying bare metal and non-bare metal models, the corresponding network controllers are initialized during the BMC image startup process to ensure the network compatibility and flexibility of the BMC image; in the bare metal model, by disabling the auto-negotiation mechanism and explicitly specifying hardware information such as the MAC address and interface type, possible misconfiguration or connection interruption caused by dynamic network negotiation is avoided, thereby enhancing the reliability and security of the network.

[0068] In a specific embodiment, the method further comprises:

[0069] Read the target device tree file corresponding to the bare metal model; the target device tree file includes: model configuration file, basic configuration file and model difference configuration file; the model configuration file is common to bare metal models and non-bare metal models; the basic configuration file is common to bare metal models and non-bare metal models; the model difference configuration file includes: bare metal model configuration file and non-bare metal model configuration file;

[0070] When the kernel of the operating system preset in the baseboard management controller image is started, the kernel is used to parse the hardware information of the media access control chip contained in the device tree file, and the driver of the media access control chip is loaded based on the hardware information; the driver is used to communicate with the media access control chip;

[0071] After the driver is loaded, the kernel is used to further initialize the media access control chip and configure the communication architecture of the media access control chip; the communication architecture includes: network protocol layer, link layer hardware address;

[0072] After the media access control chip is further initialized, the media access control chip is registered as a network device in the kernel's network stack, a connection is established with the media access control chip using the kernel's network interface, and the network interface is enabled to enable the baseboard management controller image to communicate with the media access control chip over the network.

[0073] In one possible implementation, the model configuration file may refer to the machine model .dts file, the basic configuration file may refer to the common.dsti file, the bare metal model configuration file may refer to the baremetal.dtsi file, and the non-bare metal model configuration file may refer to the non-baremetal.dtsi file.

[0074] Specifically, the model configuration file refers to the main file of the device tree, which is a hardware configuration file used to describe the server motherboard; the machine model .dts file may include but is not limited to: the hardware layout and pin definition of the motherboard; the basic configuration file refers to the basic hardware configuration shared by bare metal models and non-bare metal models; the bare metal model configuration refers to the hardware configuration and settings of the bare metal model, and the non-bare metal model configuration file refers to the hardware configuration and settings of the non-bare metal model.

[0075] The machine model .dts file can reference the common.dtsi file, as well as the baremetal.dtsi file or the non-baremetal.dtsi file through the #include syntax.

[0076] In a possible implementation, when the kernel of the preset operating system in the baseboard management controller image is started, the kernel is used to parse the hardware information of the media access control chip contained in the device tree file, and the driver of the media access control chip is loaded based on the hardware information, which is implemented based on the following steps:

[0077] When the kernel starts, the common.dtsi file and the baremetal.dtsi file are referenced by the machine model .dts file using the #include syntax, the hardware information is parsed in the device tree file, and the corresponding MAC chip and MAC chip configuration are determined based on the hardware information;

[0078] Based on the hardware information of the MAC chip determined by the analysis, the corresponding MAC chip driver is obtained and loaded to perform basic communication and control with the MAC chip.

[0079] Here, the fields related to the MAC chip in the device tree file may include but are not limited to: chip model, register address, physical address, communication interface type; the driver of the MAC chip may include specific logic and interface for the MAC chip to communicate with the kernel.

[0080] For example, the device tree file for a bare metal machine may look like this:

[0081] Machine Model A.dts

[0082] #include "commont.dtsi"

[0083] #include "baremetal.dtsi"

[0084] The device tree file for non-bare-metal models can be as follows:

[0085] Machine model B.dts

[0086] #include "commont.dtsi"

[0087] #include "non-baremetal.dtsi"

[0088] In a possible implementation, after the driver is loaded, the kernel is used to further initialize the media access control chip and configure the communication architecture of the media access control chip, which can be implemented based on the following steps:

[0089] Configure the network protocol layer of the MAC chip, determine how the MAC chip interacts with the upper network protocol layer; set the MAC address and communication interface configuration.

[0090] The MAC address is a unique link layer address used to identify a device during network communication, and the communication interface configuration may be a communication interface of a MAC chip initialized by the kernel.

[0091] In a possible implementation, after the media access control chip is further initialized, the media access control chip is registered as a network device in the network stack of the kernel, a connection is established with the media access control chip using the network interface of the kernel, and the network interface is enabled so that the baseboard management controller image communicates with the media access control chip over the network, which is implemented based on the following steps:

[0092] After the MAC chip is initialized, the kernel registers the MAC chip as a network device so that the kernel's network stack can recognize the MAC chip and perform network communication;

[0093] After the MAC chip is registered, the kernel is used to enable the network interface represented by the MAC chip to establish a network connection with the MAC chip through the network interface to send and receive data;

[0094] After the network interface is enabled, the BMC image is used to communicate with network switches, routers and other devices through the MAC chip.

[0095] Through the above method, by reading the target device tree file, the corresponding hardware driver and configuration can be automatically determined and loaded according to the actual hardware configuration and the specific model of the server, thereby increasing the flexibility and compatibility of the BMC image and reducing the complexity of manual configuration and maintenance.

[0096] In a specific embodiment, in the second stage of the boot process of the baseboard management controller image, the target device tree file is used to set the preset configuration information for the baseboard management controller image, including:

[0097] When the kernel of the preset operating system in the baseboard management controller image is started, a marker file corresponding to the bare metal model is created in the temporary root file system of the preset operating system;

[0098] When running the preset operating system in the baseboard management controller image, the system service manager is used to read the tag file corresponding to the bare metal model;

[0099] The system service manager is used to configure parameters for the preset operating system according to the service unit file corresponding to the tag file.

[0100] The preset operating system may refer to the LINUX operating system of the BMC image.

[0101] In one possible implementation, the temporary root file system may refer to initramfs, which is a minimal file system loaded and used in the early stage of the operating system kernel startup, and is used to perform basic tasks in the operating system boot process, including: loading drivers according to device tree files and mounting the root file system.

[0102] Furthermore, the marker file may refer to a file generated during the startup of the operating system, which is used to indicate whether the machine model corresponding to the operating system is a bare metal machine model or a non-bare metal machine model.

[0103] In a possible implementation, a system daemon (systemd for short) may be a system and service manager in a Linux system, which may be responsible for booting the system and managing various services during its operation; a service unit file may refer to a configuration file in systemd for defining and managing system services, and the service unit file includes but is not limited to: service behavior, dependencies, and startup methods.

[0104] Furthermore, when the preset operating system is run in the baseboard management controller image, the system service manager is used to read the tag file corresponding to the bare metal model, including:

[0105] The BMC operating system enters the running state. Systemd reads the tag file through the mounted root file system and determines whether the current motherboard corresponds to a bare metal model or a non-bare metal model based on the tag file.

[0106] Use systemd to load the corresponding service unit file according to different machine models and configure parameters for the operating system.

[0107] Through the above method, by using standardized device tree files, tag files and service unit files, the configuration and initialization process of the BMC image becomes consistent and standardized; by flexibly loading and configuring different service unit files, the compatibility of the BMC image is ensured.

[0108] In a specific embodiment, after the kernel of the preset operating system in the baseboard management controller image is started, a tag file corresponding to the bare metal model is created in the temporary root file system of the preset operating system, including:

[0109] When the kernel is started up, a preset temporary file system embedded in the kernel is loaded, and the preset temporary file system is decompressed into the memory to serve as a temporary root file system of the preset operating system in the baseboard management controller image;

[0110] A marker file corresponding to the bare metal model is created in the temporary root file system, and the actual root file system for mounting the preset operating system is determined based on the marker file; the actual root file system is used to run the preset operating system.

[0111] Specifically, when the kernel completes startup, it is determined that the BMC image enters the initial operation stage, and the kernel is used to decompress the embedded preset temporary file system into the memory; a marker file is created at an appropriate location of the temporary root file system to identify whether the current machine is a bare metal model; the marker file in the temporary root file system is read to determine the type or path of the actual root file system, the actual root file system is mounted to the root directory, the root file system is switched, and the BMC enters the actual root file system environment.

[0112] Among them, when the model is a bare metal model, the path to create a marker file in an appropriate location of the temporary root file system can be / run / initramfs / baremetal; when the model is a non-bare metal model, the path to create a marker file in an appropriate location of the temporary root file system can be / run / initramfs / non-baremeta.

[0113] Through the above method, the temporary root file system is used for initial startup and tag creation, so that necessary configuration operations can be performed at the early stage of system startup; through the information in the tag file, the actual root file system can be accurately loaded and mounted, which can ensure that the system uses the correct configuration and driver in the final startup stage to support the specific requirements of BMC images for different models.

[0114] In a specific embodiment, a system service manager is used to configure parameters for a preset operating system according to a service unit file corresponding to a tag file, including:

[0115] The system service manager is used to create a service unit file corresponding to the tag file, and the service unit file is placed in the directory corresponding to the system service manager. According to the startup conditions and configuration commands contained in the service unit file, parameters are configured for the preset operating system.

[0116] Specifically, create a service unit file corresponding to the motherboard model, place the service unit file in the service unit directory of systemd, and systemd configures necessary parameters for the operating system based on the configuration information in the service unit file.

[0117] Among them, the path existence (ConditionPathExists) condition in systemd can be used to determine whether the model corresponding to the current motherboard is a bare metal model or a non-bare metal model.

[0118] For example, when ConditionPathExists = / run / initramfs / baremetal, it indicates that there is a bare metal model marker file in initramfs, and the model corresponding to the current motherboard is determined to be a bare metal model; when ConditionPathExists = / run / initramfs / !baremetal, it indicates that there is no bare metal model marker file in initramfs, and the model corresponding to the current motherboard is determined to be a non-bare metal model.

[0119] In one possible implementation, the service unit file is started only when there is a bare metal model marker file and no user default settings have been made; after the service executes the baremetal-user-default-setting script, a marker file is generated to prevent repeated execution; the service unit file is started only when there is no bare metal model marker file and no user default settings have been made; after the service executes the user-default-setting script, a marker file is generated to prevent repeated execution.

[0120] Through the above method, unnecessary configuration operations can be avoided by checking the tag file to prevent the service from being executed repeatedly.

[0121] In one possible implementation, the above service unit file is also used in basic network configuration, Web / Ipmi user configuration, Link Layer Discovery Protocol (LLDP) configuration and power policy configuration to enable different configuration scripts for bare metal models or non-bare metal models.

[0122] Here, Web / Ipmi user configuration may refer to setting up users and their permissions for managing the server through the Web interface or IPMI interface; LLDP configuration may refer to dynamically loading a suitable LLDP configuration script according to different configuration requirements indicated by the tag file; power policy configuration may refer to dynamically adjusting the power management policy according to the current hardware environment.

[0123] Through the above method, the configurations of different models can be managed and maintained separately, reducing the risk of errors and conflicts, while ensuring that each model obtains the corresponding configuration.

[0124] For example, Figure 2 FIG. 1 is a schematic diagram of a BMC image startup process of a server model monitoring method provided by an embodiment of the present invention. Figure 2 As shown, the figure includes the following steps:

[0125] Step S201, UBOOT startup phase;

[0126] Here, the hardware is initialized and the device tree file is loaded during the UBOOT startup phase;

[0127] Step S202, kernel startup phase;

[0128] Here, during the kernel startup phase, the device tree file is parsed, the devices related to the operating system are identified and initialized, and the driver for the MAC chip is loaded;

[0129] Step S203, initramfs startup phase;

[0130] Here, during the initramfs startup phase, a marker file representing a bare metal file or a non-bare metal file is set in the / run / initramfs / path, and the actual root file system is mounted;

[0131] Step S204, run time stage;

[0132] Here, in the run time stage, after the operating system completes initialization and startup, it enters the normal operation state, uses systemd to run the BMC image operating system service, and starts the network configuration program.

[0133] Figure 3 FIG. 1 is a specific flow chart of another server model monitoring method provided by an embodiment of the present invention. Figure 3 As shown, the figure includes the following steps:

[0134] Step S301, UBOOT starts;

[0135] Here, the UBOOT of the BMC image starts to start;

[0136] Step S302, determining whether it is a bare metal model;

[0137] Here, it is determined whether the server motherboard is a bare metal model according to a preset identifier; if so, the process proceeds to step S303; if not, the process proceeds to step S308;

[0138] Step S303, initializing the MAC controller corresponding to the bare metal model;

[0139] Here, determine the network controller connected to the BMC, identify the MAC chip corresponding to the bare metal model in the MAC controller, and disable the auto-negotiation mechanism in the MAC chip;

[0140] Step S304, loading the device tree file corresponding to the bare metal model and starting the kernel;

[0141] Here, the target device tree file corresponding to the bare metal model is loaded in the storage unit of the server motherboard;

[0142] Step S305, during the kernel startup phase, the corresponding network driver is loaded according to the device tree file;

[0143] Here, according to the device tree file of the bare metal model, initialize the network driver corresponding to the MAC chip;

[0144] Step S306, in the initramfs stage, create a tag file corresponding to the bare metal model;

[0145] Here, create / run / initramfs / baremetal;

[0146] Step S307, in the run time stage, starting the corresponding service unit file according to the tag file corresponding to the bare metal model;

[0147] Here, the ConditionPathExists condition in systemd is used to determine whether the model corresponding to the current motherboard is a bare metal model, and the corresponding service unit file is started;

[0148] Step S308, initializing the MAC controller corresponding to the non-bare metal model;

[0149] Here, determine the network controller connected to the BMC, identify the MAC chip corresponding to the non-bare metal model in the MAC controller, and enable the auto-negotiation mechanism in the MAC chip;

[0150] Step S309, loading the device tree file corresponding to the non-bare metal model and starting the kernel;

[0151] Here, the target device tree file corresponding to the non-bare metal model is loaded in the storage unit of the server motherboard;

[0152] Step S310, during the kernel startup phase, load the corresponding network driver according to the device tree file;

[0153] Here, according to the device tree file of the non-bare metal model, initialize the network driver corresponding to the MAC chip;

[0154] Step S311, in the initramfs stage, creating a tag file corresponding to a non-bare metal model;

[0155] Here, create / run / initramfs / non-baremetal;

[0156] Step S312, in the run time stage, starting the corresponding service unit file according to the tag file corresponding to the non-bare metal model;

[0157] Here, the ConditionPathExists condition in systemd is used to determine whether the model corresponding to the current motherboard is a non-bare metal model, and the corresponding service unit file is started.

[0158] Figure 4 is a schematic diagram of the structure of a server model monitoring device provided by an embodiment of the present invention, such as Figure 4 As shown, the device can be applied to intelligent electronic devices such as servers and computers; the device includes: a reading module 401, an initialization module 402 and a configuration module 403;

[0159] The reading module 401 is used to read a preset identifier in the server mainboard in the first stage of the startup process of the baseboard management controller image, and the preset identifier is used to indicate whether the server mainboard corresponds to a bare metal model or a non-bare metal model;

[0160] Initialization module 402, for initializing a network controller corresponding to the bare metal model when the preset identifier indicates that the server motherboard is a bare metal model and the result of verifying the server motherboard is that the verification passes;

[0161] Configuration module 403 is used to load the target device tree file corresponding to the bare metal model in the server motherboard in the network configured by the network controller. In the second stage of the startup process of the baseboard management controller image, the target device tree file is used to set preset configuration information for the baseboard management controller image.

[0162] In a specific embodiment, the reading module 401 is used to read a preset identifier in an identifier byte burned in a production process and stored in a server mainboard by using a baseboard management controller.

[0163] In a specific embodiment, the initialization module 402 is used to determine a network controller connected to the baseboard management controller, identify a media access control chip corresponding to a bare metal model in the network controller, and disable an auto-negotiation mechanism in the media access control chip.

[0164] In a specific embodiment, the configuration module 403 is used to load a target device tree file corresponding to the bare metal model in a storage unit of the server mainboard;

[0165] The apparatus further includes: a second configuration module 404;

[0166] A second configuration module 404 is used to configure the media access control chip to correspond to the target device tree file corresponding to the bare metal model based on the target device tree file corresponding to the bare metal model;

[0167] Based on the configured media access control chip, the baseboard management controller presets the kernel of the operating system in the baseboard management controller image and performs the following operations when starting:

[0168] Read the target device tree file corresponding to the bare metal model; the device tree file includes: model configuration file, basic configuration file, and bare metal version configuration file in the model difference configuration file; the model configuration file and the basic configuration file are common to bare metal models and non-bare metal models, and the model difference configuration file includes: bare metal version configuration file and non-bare metal version configuration file;

[0169] Based on the target device tree file, the network driver corresponding to the media access control chip is initialized so that the baseboard management controller image and the media access control chip perform network communication.

[0170] In a specific embodiment, the configuration module 403 is used to create a tag file corresponding to the bare metal model in a temporary root file of the preset operating system after the kernel of the preset operating system in the baseboard management controller image completes startup;

[0171] When the marker file is created, the preset service manager is used to read the marker file corresponding to the bare metal model, and the configuration program corresponding to the bare metal model is enabled for the preset operating system.

[0172] In a specific embodiment, the configuration module 403 is used to enter the temporary root file stage of the preset operating system after the kernel of the preset operating system in the baseboard management controller image completes startup, create a marker file corresponding to the bare metal model in the storage path of the temporary root file of the preset operating system, and enter the initial operation stage of the preset operating system.

[0173] In a specific embodiment, the configuration module 403 is used to use a preset service manager to read a marker file in a storage path of a temporary root file when the preset operating system in the baseboard management controller image enters an initial operation phase;

[0174] When the marker file in the storage path exists and the configuration program does not exist, the configuration program corresponding to the bare metal model is enabled for the preset operating system.

[0175] It should be noted that: the server model monitoring device provided in the above embodiment only uses the division of the above program modules as an example to illustrate when implementing the corresponding server model monitoring method. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the above-described processing. Figure 1 The embodiments of the method shown belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.

[0176] The embodiment of the present invention also provides a computer device having the above Figure 4 Server model monitoring device shown.

[0177] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of the structure of another server model monitoring device provided by an embodiment of the present invention. Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0178] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0179] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0180] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0181] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0182] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0183] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0184] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0185] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0186] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0187] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A server model monitoring method, characterized in that: The method comprises: In the first stage of the boot process of the baseboard management controller image, a preset identifier in the server mainboard is read, and the preset identifier is used to indicate whether the server mainboard corresponds to a bare metal model or a non-bare metal model; When the preset identifier indicates that the server mainboard is a bare metal model, when the result of verifying the server mainboard is that the verification passes, initializing a network controller corresponding to the bare metal model; In the network configured by the network controller, a target device tree file corresponding to the bare metal model in the server motherboard is loaded, and in the second stage of the startup process of the baseboard management controller image, the target device tree file is used to set preset configuration information for the baseboard management controller image.

2. The method according to claim 1, characterized in that Read the preset logo in the server motherboard, based on the following steps: The baseboard management controller is used to read the preset identification in the identification bytes burned in the production process stored in the server mainboard.

3. The method according to claim 1, characterized in that Initializing the network controller corresponding to the bare metal model includes: Determine a network controller connected to a baseboard management controller, identify a media access control chip corresponding to a bare metal model in the network controller, and disable an auto-negotiation mechanism in the media access control chip.

4. The method according to claim 3, characterized in that The loading of the target device tree file corresponding to the bare metal model in the server mainboard includes: loading the target device tree file corresponding to the bare metal model in the storage unit of the server mainboard; The method further includes: configuring a media access control chip to correspond to the target device tree file corresponding to the bare metal model based on the target device tree file corresponding to the bare metal model; Based on the configured media access control chip, the baseboard management controller presets the kernel of the operating system in the baseboard management controller image and performs the following operations when starting: Reading a target device tree file corresponding to the bare metal model; the device tree file includes: a bare metal version configuration file in a model configuration file, a basic configuration file, and a model difference configuration file; the model configuration file and the basic configuration file are common to the bare metal model and the non-bare metal model, and the model difference configuration file includes: a bare metal version configuration file and a non-bare metal version configuration file; Based on the target device tree file, a network driver corresponding to the media access control chip is initialized so that the baseboard management controller image performs network communication with the media access control chip.

5. The method according to claim 4, characterized in that The second stage in the process of starting the baseboard management controller image, using the target device tree file to set preset configuration information for the baseboard management controller image, includes: When the kernel of the preset operating system in the baseboard management controller image is started, a tag file corresponding to the bare metal model is created in the temporary root file of the preset operating system; When the marker file is created, the preset service manager is used to read the marker file corresponding to the bare metal model, and the configuration program corresponding to the bare metal model is enabled for the preset operating system.

6. The method according to claim 5, characterized in that After the kernel of the preset operating system in the baseboard management controller image is started, a tag file corresponding to the bare metal model is created in the temporary root file of the preset operating system, including: When the kernel of the preset operating system in the baseboard management controller image completes startup, it enters the temporary root file stage of the preset operating system, creates a marker file corresponding to the bare metal model in the storage path of the temporary root file of the preset operating system, and enters the initial operation stage of the preset operating system.

7. The method according to claim 6, characterized in that When the marker file is created, the preset service manager is used to read the marker file corresponding to the bare metal model, and the configuration program corresponding to the bare metal model is enabled for the preset operating system, including: When the preset operating system in the baseboard management controller image enters the initial operation stage, the preset service manager is used to read the marker file in the storage path of the temporary root file; When the marker file in the storage path exists and the configuration program does not exist, the configuration program corresponding to the bare metal model is enabled for the preset operating system.

8. A server model monitoring device, characterized in that: The device comprises: A reading module, used for reading a preset identifier in a server mainboard in the first stage of the startup process of the baseboard management controller image, wherein the preset identifier is used to indicate whether the server mainboard corresponds to a bare metal model or a non-bare metal model; An initialization module, configured to initialize a network controller corresponding to the bare metal model when the preset identifier indicates that the server motherboard is a bare metal model and the result of verifying the server motherboard is that the verification passes; A configuration module is used to load a target device tree file corresponding to the bare metal model in the server motherboard in the network configured by the network controller, and in the second stage of the startup process of the baseboard management controller image, use the target device tree file to set preset configuration information for the baseboard management controller image.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the server model monitoring method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the server model monitoring method according to any one of claims 1 to 7.