Server asset information reporting method, device, equipment and medium
By using enhanced serial peripheral interface and shared memory technology in the server, server asset information is reported in batches, which solves the problems of slow data communication speed and data length limitation in the existing technology, and achieves efficient asset information reporting.
Patent Information
- Application Number
- CN202411375243.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-24
AI Technical Summary
In the prior art, the KCS and BT interface protocols are called through the IPMI interface specification to report server asset information, which slow data communication speed and affects efficiency. Moreover, the IPMI interface specification has a limit on the data length, so it is impossible to complete the transmission of large data volumes at one time.
By connecting the basic input and output system and the baseboard management controller in the server through the enhanced serial peripheral interface, the server's asset information and its priority are obtained, and the asset information is reported to the baseboard in batches through shared memory. Management controller.
The efficiency of server asset information reporting has been improved. Through the information communication of the enhanced serial interface and the substrate management controller, and the asset information is stored through the stages of shared memory, the data communication speed in the traditional method is slow and the data length is limited. question.
Smart Images

Figure CN119356975A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for reporting server asset information. Background Art
[0002] In server application scenarios, the basic input and output system needs to configure the server asset information to the baseboard management controller during the boot process.
[0003] In the related art, the traditional IPMI (Intelligent Platform Management Interface) interface specification is used to call the KCS (Keyboard Controller Style) and BT (Bit Torrent) interface protocols to achieve this. However, these interfaces are based on I / O Port (input and output port) interfaces, and the data communication speed is slow, which affects the efficiency. In addition, the IPMI interface specification also limits the length of data transmitted each time.
[0004] In view of this, a method for reporting server asset information with high efficiency is needed. Summary of the invention
[0005] In view of this, the present invention provides a server asset information reporting method, which can improve the efficiency of server asset reporting.
[0006] In a first aspect, the present invention provides a method for reporting server asset information, which is used for a server, wherein a basic input / output system in the server is connected to a baseboard management controller via an enhanced serial peripheral interface; the method comprises: obtaining various asset information of the server, and the priority of each asset information; applying for a shared memory from the baseboard management controller to obtain the target position corresponding to each asset information of the server in the shared memory; and reporting each asset information to the target position in the shared memory at each stage of server startup according to the corresponding relationship between the stage of server startup and the priority of each asset information.
[0007] In this embodiment, the basic input and output system is connected to the baseboard management controller through the enhanced serial peripheral interface in the server. At this time, the basic input and output system obtains various asset information of the server during the startup process of the server, and there is a priority between the various asset information; the basic input and output system first applies for shared memory from the baseboard management controller, and obtains the location of various asset information of the server in the shared memory, and then the basic input and output system can report the asset information in batches to the shared memory in the baseboard management controller through the shared memory and the enhanced serial port peripheral interface according to the priority of each asset information. The above scheme communicates information with the baseboard management controller through the enhanced serial peripheral interface, and stores the asset information in the shared memory in stages through the shared memory, thereby improving the efficiency of reporting server asset information.
[0008] In an optional implementation, applying for a shared memory from a baseboard management controller includes: applying for a shared memory from a baseboard management controller through a memory mapping baseboard management controller interface protocol.
[0009] In this implementation, by using the memory-mapped baseboard management controller interface protocol to apply for shared memory from the baseboard management controller, the efficiency of asset information reporting can be improved.
[0010] In an optional implementation, before acquiring each asset information of the server, the method further includes: in response to starting the basic input and output system, mapping the shared memory area of the baseboard management controller to the memory address space of the basic input and output system.
[0011] In this implementation, by mapping the shared memory area of the baseboard management controller to the memory address space of the basic input and output system, the reporting efficiency of the asset information can be improved, thereby improving the flexibility of the method.
[0012] In an optional embodiment, the method also includes: loading a memory-mapped baseboard management controller interface protocol protocol function in a basic input / output system; the memory-mapped baseboard management controller interface protocol protocol function includes various function pointers; and each function pointer is used to call the baseboard management controller interface protocol protocol function to report asset information.
[0013] In this embodiment, asset information is reported by calling a protocol function of the baseboard management controller interface protocol, which can increase data transmission speed and thus improve the efficiency of asset information reporting.
[0014] In an optional implementation, the method further includes: for any stage of server startup, when there is asset information reported to a target location in the shared memory, notifying the baseboard management controller to obtain the asset information at the target location.
[0015] In this implementation, the basic management controller obtains the asset information at the target location in the shared memory, which can improve the access speed of the asset information and improve the security and flexibility of the method.
[0016] In an optional embodiment, according to the correspondence between the stage of server startup and the priority of each asset information, at each stage of server startup, each asset information is reported to the target location in the shared memory, including: in response to the initialization operation of the central processing unit in the basic input and output system, the basic input and output system information and the central processing unit information are obtained; in response to the completion of the initialization of the central processing unit, the basic input and output system information and the central processing unit information are reported to the target location in the shared memory; in response to the initialization operation of the server memory, the server memory information is obtained; the server memory information includes at least one of the memory size, memory type and memory speed; in response to the completion of the initialization of the server memory, the server memory information is reported to the target location in the shared memory; the high-speed serial computer expansion bus device connected to the server is detected, and system resources are allocated to the high-speed serial computer expansion bus device; the system resources include at least one of the input and output address and the memory space; in response to the completion of the initialization with the high-speed serial computer expansion bus device, the high-speed serial computer expansion bus device information is written to the target location of the shared memory; the high-speed serial computer expansion bus device information includes at least one of the device type, the device identification and the resource allocation status.
[0017] In this embodiment, by initializing the central processing unit in the basic input and output system, the server memory, the high-speed serial computer expansion bus device connected to the server, and the high-speed serial computer expansion bus device, and writing the information obtained after initialization into the target location of the shared memory, the asset information of the server can be obtained in the first place, preventing the user from making a wrong judgment due to the failure to update the asset information.
[0018] In an optional embodiment, the method also includes: determining a reference indicator sequence according to application requirements of the server; obtaining a performance indicator sequence of the server based on asset information stored at a target location of the shared memory, wherein the performance indicator sequence corresponds to the reference indicator sequence; comparing the performance indicator sequence and the reference indicator sequence, and determining whether an abnormality occurs in the server based on the comparison result.
[0019] In this embodiment, by obtaining the application requirements of the server, a reference indicator sequence under normal working state of the server can be determined. By comparing the reference indicator sequence with the performance indicator sequence obtained from the asset information, abnormal conditions of the server can be discovered in time.
[0020] In a second aspect, the present invention provides a server asset information reporting device, the device comprising: an acquisition module, used to acquire various asset information of the server, and the priority of each asset information; a memory module, used to apply for shared memory from a baseboard management controller to acquire the target location corresponding to each asset information of the server in the shared memory; a reporting module, used to report each asset information to the target location in the shared memory at each stage of server startup according to the correspondence between the stage of server startup and the priority of each asset information.
[0021] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the server asset information reporting method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0022] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the server asset information reporting method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 is a schematic diagram of a server connection structure according to an embodiment of the present invention;
[0025] Figure 2 is a flow chart of a method for reporting server asset information according to an embodiment of the present invention;
[0026] Figure 3 is a flow chart of another server asset information reporting method according to an embodiment of the present invention;
[0027] Figure 4 is a flow chart of another server asset information reporting method according to an embodiment of the present invention;
[0028] Figure 5 is a flow chart of another server asset information reporting method according to an embodiment of the present invention;
[0029] Figure 6is a flow chart of another server asset information reporting method according to an embodiment of the present invention;
[0030] Figure 7 is a flow chart of another server asset information reporting method according to an embodiment of the present invention;
[0031] Figure 8 is a structural block diagram of a server asset information reporting device according to an embodiment of the present invention;
[0032] Fig. 9 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] 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.
[0034] In the application scenario of the server, the basic input and output system needs to report the asset information of the server to the baseboard management controller during the boot process.
[0035] In the related art, the IPMI interface specification or the shared memory of the baseboard management controller is usually used to implement asset information reporting.
[0036] Among them, the IPMI interface specification implements this function through the KCS and BT interface protocols. These interfaces are based on the I / O Port interface, so the speed is slow during the data communication process, affecting efficiency. In addition, the IPMI interface specification limits the length of data transmitted each time to no more than 255 bytes. In the case of large amounts of data such as asset information reporting, this will result in the inability to complete data transmission in one go and requires multiple times, increasing the complexity of communication and time delay.
[0037] The shared memory method of the baseboard management controller lacks standardized specification definition, cannot guarantee the integrity and completeness of data, and relies on the MMIO (Memory-mapped I / O) resources of the PCIe (Peripheral Component Interconnect express, a high-speed serial computer expansion bus standard) device. If the PCIe device is not recognized or the resources are not allocated, this method cannot be used, reducing the flexibility of the method.
[0038] Therefore, a method for reporting server asset information with high speed and security is needed to ensure the stability and security of the server.
[0039] Figure 1 FIG. 1 is a schematic diagram of a server connection structure according to an embodiment of the present invention. Figure 1 As shown, multiple servers (CPUs) are connected via a high-speed interconnect bus (Ultra Path Interconnect, UPI), the basic input and output system in the server is connected to the baseboard management controller via an enhanced serial peripheral interface (eSPI, Enhanced Serial Peripheral Interface), and the memory-mapped baseboard management controller interface protocol (MMBI, memory-mapped BMC interface) is used to apply for shared memory and report asset information. After receiving the asset information, the baseboard management controller puts the asset information into the double data rate synchronous dynamic random access memory DDR.
[0040] According to an embodiment of the present invention, an embodiment of a server asset information reporting method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0041] In this embodiment, a method for reporting server asset information is provided. The method is used for a server. A basic input / output system in the server is connected to a baseboard management controller via an enhanced serial peripheral interface. Figure 2 is a flow chart of a method for reporting server asset information according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0042] Step S101, obtaining each asset information of the server and the priority of each asset information.
[0043] Among them, the asset information of the server is not restricted, and the type of asset information to be obtained can be determined according to the actual situation, which can be the model and configuration of the server. The priority of each asset information can be set by the staff according to its importance, or the priority of the server's device initialization can be directly used.
[0044] In an actual application, the priority of each asset information can be the priority of the server's device initialization. The priorities of the server device are system initialization, CPU initialization, memory initialization, and high-speed serial computer expansion bus device initialization. Then the priority of the asset information is also basic input and output system information, CPU information, memory information, and high-speed serial computer expansion bus device information.
[0045] In another possible implementation, the priority of each asset information may be pre-stored in the server, that is, different priority tables may be pre-stored in different servers, each priority table including the priority relationship between each asset information.
[0046] When the BIOS (Basic Input Output System) in the server obtains various asset information of the server (such as CPU information, memory information), etc. during the server startup process, it can sort them according to the requirements of the priority table to determine the asset information that needs to be sent to the BMC (Baseboard Management Controller) first.
[0047] Optionally, not all asset information needs to be sent to the BMC for processing. In this case, if the priority of the target asset information in each asset information is not found in the priority table, the target asset information is not sent to the BMC.
[0048] Furthermore, if the priority corresponding to the target asset information is not found in the priority table, it may be that the priority table does not completely correspond to the resources of the server. This does not mean that the target asset information in the server is unimportant asset information. Therefore, the server's BIOS can default the target asset information to the lowest priority, and wait until all asset information of other priorities are sent to the BMC before sending the target asset information of the lowest priority to the BMC. This avoids the loss of asset information as much as possible without affecting the sending of asset information of other priorities.
[0049] By obtaining the priority of each asset information, the order of subsequent asset information reporting can be determined, which facilitates user management and improves the efficiency of asset information reporting.
[0050] Step S102: Apply for a shared memory from a baseboard management controller to obtain a target location corresponding to each asset information of the server in the shared memory.
[0051] Among them, the size of the shared memory can be determined according to the size of the asset information data contained in the server, so as to facilitate the storage of the server asset information. After determining the size of the shared memory, the shared memory can be applied to the baseboard management controller through the relevant interface function. In a practical application, the eSPI (Enhanced Serial Peripheral Interface) interface function is used. The basic input and output system and the basic management controller are connected through the eSPI interface, which can improve the efficiency of communication between the two and realize complex system management functions.
[0052] After the shared memory is applied, the shared memory can be allocated according to the priority of the asset information. According to the shared memory allocation result, the target location corresponding to the asset information in the shared memory is determined.
[0053] Step S103, reporting each asset information to a target location in the shared memory at each stage of server startup according to the corresponding relationship between the stage of server startup and the priority of each asset information.
[0054] Among them, in different startup stages of the server, the asset information related to the current stage can be obtained, and the asset information can be reported to the corresponding target location of the shared memory one by one according to the priority, so as to facilitate the access of the baseboard management server.
[0055] After the server is started, the corresponding asset information can be repeatedly collected according to the priority, and the new asset information can be reported to the corresponding location of the shared memory to complete the update of the asset information. This is convenient for users to manage the server. And the asset information is constantly updated. When the server has an abnormality, the user can also understand it in time and take corresponding measures.
[0056] The server asset information reporting method provided in this embodiment connects the basic input and output system with the baseboard management controller through the enhanced serial peripheral interface in the server. At this time, the basic input and output system obtains various asset information of the server during the startup process of the server, and there is a priority between the various asset information; the basic input and output system first applies for shared memory from the baseboard management controller, and obtains the location of various asset information of the server in the shared memory, and then the basic input and output system can report the asset information in batches to the shared memory in the baseboard management controller through the shared memory and the enhanced serial port peripheral interface according to the priority of each asset information. The above scheme communicates information with the baseboard management controller through the enhanced serial peripheral interface, and stores the asset information in the shared memory in stages through the shared memory, thereby improving the efficiency of server asset information reporting.
[0057] In this embodiment, a method for reporting server asset information is provided. The method is used for a server. A basic input / output system in the server is connected to a baseboard management controller via an enhanced serial peripheral interface. Figure 3 is a flow chart of a method for reporting server asset information according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0058] Step S201, obtaining each asset information of the server and the priority of each asset information.
[0059] For details, please see Figure 2 Step S101 of the illustrated embodiment will not be described in detail here.
[0060] Step S202: Apply for a shared memory from a baseboard management controller to obtain a target location corresponding to each asset information of the server in the shared memory.
[0061] Specifically, the above step S202 includes:
[0062] Step S2021, applying for shared memory from the baseboard management controller through the memory mapping baseboard management controller interface protocol.
[0063] Before applying for shared memory from the baseboard management controller, it is necessary to determine the shared memory requirements. The shared memory requirements include memory size, alignment requirements, etc. The shared memory size can be determined according to the amount of asset information.
[0064] After determining the need for shared memory, you can apply for shared memory from the baseboard management controller through the memory mapping basic management controller interface protocol. After receiving the request, the baseboard management controller will determine whether the request can be met based on the resources in the baseboard management controller. If the request can be met, it will be allocated. If the request cannot be met, it will reply with a request failure signal.
[0065] Step S2022, obtaining the target location corresponding to each asset information of the server in the shared memory.
[0066] The shared memory can be allocated according to the priority of the asset information, and the target location corresponding to the asset information in the shared memory is determined according to the shared memory allocation result.
[0067] Step S203, reporting each asset information to a target location in the shared memory at each stage of server startup according to the corresponding relationship between the stage of server startup and the priority of each asset information.
[0068] For details, please see Figure 2 Step S103 of the illustrated embodiment will not be described in detail here.
[0069] In some optional implementations, a protocol function of a memory-mapped baseboard management controller interface protocol is loaded in a basic input / output system; the protocol function of the memory-mapped baseboard management controller interface protocol includes various function pointers; and each function pointer is used to call the protocol function of the baseboard management controller interface protocol to report asset information.
[0070] When the BIOS starts to start, it will initialize the hardware interface. After the initialization is completed, the BIOS will map the shared memory to the local memory space. Then the protocol function of the memory-mapped baseboard management controller interface protocol is loaded so that the BIOS can call the protocol function to complete the reporting of asset information. Each time the asset information is reported, the corresponding protocol function needs to be called. In addition, the BIOS and the baseboard management controller can also use the protocol function to respond.
[0071] By calling the protocol function of the baseboard management controller interface protocol to report asset information, the data transmission speed can be increased, thereby improving the efficiency of asset information reporting.
[0072] The server asset information reporting method provided in this embodiment can improve the efficiency of asset information reporting by applying for shared memory from the baseboard management controller through the memory mapping baseboard management controller interface protocol.
[0073] In this embodiment, a method for reporting server asset information is provided. The method is used for a server. A basic input / output system in the server is connected to a baseboard management controller via an enhanced serial peripheral interface. Figure 4 is a flow chart of a method for reporting server asset information according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:
[0074] Step S301 , in response to the startup of a basic input / output system, mapping a shared memory area of a baseboard management controller to a memory address space of the basic input / output system.
[0075] During the startup of the BIOS, a system memory space map is created and the baseboard management controller is initialized. The BIOS can map the shared memory area in the baseboard management controller to its own memory address space by calling related functions to access the shared memory.
[0076] Step S302, obtaining each asset information of the server and the priority of each asset information.
[0077] For details, please see Figure 2 Step S101 of the illustrated embodiment will not be described in detail here.
[0078] Step S303: Apply for a shared memory from the baseboard management controller to obtain the target location corresponding to each asset information of the server in the shared memory.
[0079] For details, please see Figure 2 Step S102 of the illustrated embodiment will not be described in detail here.
[0080] Step S304, reporting each asset information to a target location in the shared memory at each stage of server startup according to the corresponding relationship between the stage of server startup and the priority of each asset information.
[0081] For details, please see Figure 2 Step S103 of the illustrated embodiment will not be described in detail here.
[0082] The server asset information reporting method provided in this embodiment connects the basic input and output system with the baseboard management controller through the enhanced serial peripheral interface in the server. At this time, the basic input and output system obtains various asset information of the server during the startup process of the server, and there is a priority between the various asset information; the basic input and output system first applies for shared memory from the baseboard management controller, and obtains the location of various asset information of the server in the shared memory, and then the basic input and output system can report the asset information in batches to the shared memory in the baseboard management controller through the shared memory and the enhanced serial port peripheral interface according to the priority of each asset information. The above scheme communicates information with the baseboard management controller through the enhanced serial peripheral interface, and stores the asset information in the shared memory in stages through the shared memory, which can improve the reporting efficiency of asset information.
[0083] In this embodiment, a method for reporting server asset information is provided. The method is used for a server. A basic input / output system in the server is connected to a baseboard management controller via an enhanced serial peripheral interface. Figure 5 is a flow chart of a method for reporting server asset information according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:
[0084] Step S401, obtaining each asset information of the server and the priority of each asset information.
[0085] For details, please see Figure 2 Step S101 of the illustrated embodiment will not be described in detail here.
[0086] Step S402: Apply for a shared memory from a baseboard management controller to obtain a target location corresponding to each asset information of the server in the shared memory.
[0087] For details, please see Figure 2 Step S102 of the illustrated embodiment will not be described in detail here.
[0088] Step S403: Apply for a shared memory from the baseboard management controller to obtain the target location corresponding to each asset information of the server in the shared memory.
[0089] Specifically, the above step S403 includes:
[0090] Step S4031, in response to the initialization operation of the central processing unit in the basic input and output system, obtaining the basic input and output system information and the central processing unit information.
[0091] The initialization operation of the CPU in the BIOS includes setting the clock speed, cache configuration, etc. The information of the BIOS can be obtained through relevant commands. The information of the BIOS is not limited and may include the system version, manufacturer information, etc. The substrate information of the CPU is not limited and may include the model, number of cores, number of threads, etc. of the CPU.
[0092] Step S4032, in response to the completion of the initialization of the CPU, reporting the basic input and output system information and the CPU information to the target location in the shared memory.
[0093] After obtaining the basic input and output system information and the central processing unit information, the information is reported to the target location in the shared memory by calling the interface. If the shared memory is unavailable during the reporting process, a reminder can be directly sent to the user. After the information is reported, a signal can also be sent to the baseboard control manager to remind the baseboard control manager to receive the information.
[0094] Step S4033, in response to the initialization operation of the server memory, obtaining the information of the server memory; the information of the server memory includes at least one of the memory size, the memory type and the memory speed.
[0095] When the server memory performs initialization operations, the basic input and output system will identify the memory module installed on the server to obtain the server memory information. The server memory information can be obtained directly through relevant commands or through relevant software.
[0096] Step S4034, in response to completion of initialization of the server memory, reporting the information of the server memory to the target location in the shared memory.
[0097] After the memory information is obtained, the information is reported to the target location in the shared memory by calling the interface. If the shared memory is unavailable during the reporting process, a reminder can be directly sent to the user. After the information is reported, a signal can also be sent to the substrate control manager to remind the substrate control manager to receive the information.
[0098] Step S4035, detecting a high-speed serial computer expansion bus device connected to the server, and allocating system resources to the high-speed serial computer expansion bus device; the system resources include at least one of an input / output address and a memory space.
[0099] By detecting the high-speed serial computer expansion bus device connected to the server and allocating system resources to it, the high-speed serial computer expansion bus device information can be obtained, wherein the high-speed serial computer expansion bus device information includes the high-speed serial computer expansion bus device system resource allocation status, etc.
[0100] Step S4036, in response to the completion of the initialization of the high-speed serial computer expansion bus device, write the information of the high-speed serial computer expansion bus device into the target location of the shared memory; the information of the high-speed serial computer expansion bus device includes at least one of the device type, device identification and resource allocation status.
[0101] Among them, the high-speed serial computer expansion bus device information can be directly obtained through relevant commands. After obtaining, the information can be written to the target location of the shared memory by calling the interface. If the shared memory is unavailable during the reporting process, a reminder can be directly issued to the user. After the information is reported, a signal can also be sent to the baseboard control manager to remind the baseboard control manager to receive the information.
[0102] In some optional implementations, at any stage of server startup, when there is asset information reported to a target location in the shared memory, the baseboard management controller is notified to obtain the asset information at the target location.
[0103] The basic input and output system can notify the baseboard management controller through interruption, message queue, etc. that the asset information has been updated and stored in the target location in the shared memory. After detecting the notification, the baseboard management controller can read the asset information from the target location.
[0104] In an actual application, after the basic input and output system reports the asset information to the target location in the shared memory, it triggers an interrupt request signal to the baseboard management controller. After receiving the interrupt signal, the baseboard management controller reads the asset information from the shared memory.
[0105] The basic management controller obtains the asset information at the target location in the shared memory, which can improve the access speed of the asset information and improve the security and flexibility of the method.
[0106] The server asset information reporting method provided in this embodiment initializes the central processing unit in the basic input and output system, the server memory, the high-speed serial computer expansion bus device connected to the server, and the high-speed serial computer expansion bus device, and writes the information obtained after initialization into the target location of the shared memory. The server asset information can be obtained in the first place, preventing users from making wrong judgments due to the failure to update the asset information.
[0107] In this embodiment, a method for reporting server asset information is provided. The method is used for a server. A basic input / output system in the server is connected to a baseboard management controller via an enhanced serial peripheral interface. Figure 6 is a flow chart of a method for reporting server asset information according to an embodiment of the present invention. Figure 6 As shown, the process includes the following steps:
[0108] Step S501, obtaining each asset information of the server and the priority of each asset information.
[0109] For details, please see Figure 2 Step S101 of the illustrated embodiment will not be described in detail here.
[0110] Step S502: Apply for a shared memory from a baseboard management controller to obtain a target location corresponding to each asset information of the server in the shared memory.
[0111] For details, please see Figure 2 Step S102 of the illustrated embodiment will not be described in detail here.
[0112] Step S503, reporting each asset information to a target location in the shared memory at each stage of server startup according to the corresponding relationship between the server startup stage and the priority of each asset information.
[0113] For details, please see Figure 2 Step S103 of the illustrated embodiment will not be described in detail here.
[0114] Step S504: Determine a reference indicator sequence according to the application requirements of the server.
[0115] According to the application requirements of the server, reasonable server performance indicators can be set to determine a reference indicator sequence, where the reference indicator sequence can include CPU usage, memory usage, etc.
[0116] In an actual application, the reference indicator sequence includes memory usage. If the server needs to process a large amount of data, it is necessary to set a larger memory usage in the reference indicator sequence.
[0117] Step S505: acquiring a performance indicator sequence of the server based on the asset information stored at the target location of the shared memory, wherein the performance indicator sequence corresponds to the reference indicator sequence.
[0118] Among them, by reading and analyzing the asset information included in the target location of the shared memory, a performance indicator sequence can be obtained, wherein the performance indicators included in the performance indicator sequence are the same as the reference indicators included in the reference indicator sequence, and may include CPU usage, memory usage, etc.
[0119] Step S506, comparing the performance indicator sequence with the reference indicator sequence, and determining whether an abnormality occurs in the server based on the comparison result.
[0120] By comparing the performance indicator sequence with the reference indicator sequence, it is determined whether there is a performance indicator in the performance indicator sequence that exceeds the reference indicator corresponding to the performance indicator. If it exceeds, it is determined that the server is abnormal, and an alarm can be issued to remind the staff.
[0121] In some optional implementations, in response to an asset information display instruction triggered by a user, the asset information stored at the target location of the shared memory is displayed on the target interface.
[0122] The user can trigger the asset information display command by inputting in the command line or operating in the graphical interface. Different triggering methods will display asset information in different forms. After viewing the displayed information on the target interface, the user can also process the information through other operation commands.
[0123] In an actual application, after the user enters an asset information display instruction in the command line, the asset information is displayed in the command line interface in the form of text.
[0124] In another practical application, a user inputs an asset information display instruction in a graphical user interface, and the asset information is displayed in a table format. The data in the table is updated as the asset information stored at the target location is updated.
[0125] Furthermore, in an embodiment of the present application, a user can obtain various asset information stored in the baseboard management controller BMC through an asset information acquisition command; and since in an embodiment of the present application, various asset information stored in the baseboard management controller BMC are sent in batches by BIOS according to priority at various stages of server startup, if the server crashes during startup after the BIOS is updated, the various asset information obtained by the user from the baseboard management controller BMC through the asset information acquisition command includes the asset information transmitted to the BMC by BIOS before the server crashes, so after the server crashes, the server's crash status can be obtained based on the various asset information stored in the baseboard management controller BMC, that is, the stage at which the server crashed during startup can be obtained.
[0126] The server asset information reporting method provided in this embodiment displays the asset information in the target interface, which can improve the visibility of the asset information and reduce the time for users to search for the asset information.
[0127] In this embodiment, a method for reporting server asset information is provided. The method is used for a server. A basic input / output system in the server is connected to a baseboard management controller via an enhanced serial peripheral interface. Figure 7 is a flow chart of a method for reporting server asset information according to an embodiment of the present invention. Figure 7 As shown, when the basic input and output system starts, the enhanced serial peripheral interface is mapped to the shared memory protocol of the baseboard management controller during the initialization process to ensure that the basic input and output system can directly access and write to the shared memory. Then the MMBI protocol function is installed so that the subsequent asset information reporting can call this interface function.
[0128] Initialize UPI (Ultra Path Interconnect) / CPU (Central Processing Unit), configure the interconnection between multiple CPUs, and start detecting, configuring and initializing CPU resources to ensure that the CPU can work normally. After the initialization is completed, the basic input and output system will write the platform version information and CPU related information to the specified location in the previously mapped shared memory by calling the interface function of the MMBI protocol, where the platform version information may include the version of the basic input and output system, and the CPU related information may include the number of CPU cores and other information. After the platform version information and CPU related information are written to the shared memory, the basic input and output system will notify the baseboard management controller that there is already available asset information in the shared memory. The baseboard management controller will access the shared memory according to the notification and read the corresponding information. The basic input and output system can be notified by signals such as interrupts.
[0129] After the version information of the tablet and the relevant information of the CPU are reported, the basic input and output system initializes the memory. During the initialization process, the system memory will be detected, and the memory controller, memory module, etc. will be configured to ensure that the memory can be used normally. After the memory is initialized, the basic input and output system will call the interface function of the MMBI protocol to write the memory information to the specified area of the shared memory, and notify the baseboard management controller again to inform that the memory information has been written to the specified location of the shared memory. The baseboard management controller can obtain the memory information by accessing the shared memory.
[0130] After reporting the memory information, the basic input and output system will start to initialize the PCIe device and allocate system resources to it. During the initialization process, the PCIe device will be scanned and detected. System resources may include memory space, address, etc. After the PCIe device is initialized, the basic input and output system will call the interface function of the MMBI protocol to write the PCIe device information to the specified area of the shared memory, and notify the baseboard management controller again that the PCIe device information has been written to the specified location of the shared memory. The baseboard management controller can obtain the PCIe device information by accessing the shared memory.
[0131] In this embodiment, a server asset information reporting device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0132] This embodiment provides a server asset information reporting device, such as Figure 8 As shown, including:
[0133] The acquisition module 601 is used to acquire various asset information of the server and the priority of each asset information.
[0134] The memory module 602 is used to apply for a shared memory from the baseboard management controller to obtain the target location corresponding to each asset information of the server in the shared memory.
[0135] The reporting module 603 is used to report each asset information to a target location in the shared memory at each stage of server startup according to the correspondence between the stage of server startup and the priority of each asset information.
[0136] In some optional implementations, the memory module 602 includes:
[0137] The application unit is used to apply for shared memory from the baseboard management controller through a memory mapping baseboard management controller interface protocol.
[0138] In some optional implementations, the server asset information reporting device further includes:
[0139] The mapping module is used for mapping the shared memory area of the baseboard management controller to the memory address space of the basic input and output system in response to the startup of the basic input and output system.
[0140] In some optional implementations, a protocol function of a memory-mapped baseboard management controller interface protocol is loaded in a basic input / output system; the protocol function of the memory-mapped baseboard management controller interface protocol includes various function pointers; and each function pointer is used to call the protocol function of the baseboard management controller interface protocol to report asset information.
[0141] In some optional implementations, the server asset information reporting device further includes:
[0142] The notification module is used to notify the baseboard management controller to obtain the asset information at the target location when there is asset information reported to the target location in the shared memory at any stage of server startup.
[0143] In some optional implementations, the reporting module 603 includes:
[0144] The first acquisition unit is used for acquiring information of the basic input and output system and information of the central processing unit in response to an initialization operation of the central processing unit in the basic input and output system.
[0145] The first reporting unit is used for reporting the basic input and output system information and the central processing unit information to the target location in the shared memory in response to the completion of the initialization of the central processing unit.
[0146] A second acquisition unit is used to acquire information of the server memory in response to the initialization operation of the server memory; the information of the server memory includes at least one of the memory size, the memory type and the memory speed;
[0147] The second reporting unit is used to report the information of the server memory to a target location in the shared memory in response to completion of initialization of the server memory.
[0148] The allocation unit is used to detect a high-speed serial computer expansion bus device connected to the server and allocate system resources to the high-speed serial computer expansion bus device; the system resources include at least one of an input / output address and a memory space.
[0149] The third reporting unit is used to write the information of the high-speed serial computer expansion bus device into the target location of the shared memory in response to the completion of the initialization with the high-speed serial computer expansion bus device; the information of the high-speed serial computer expansion bus device includes at least one of the device type, device identification and resource allocation status.
[0150] In some optional implementations, the server asset information reporting device further includes:
[0151] The abnormality determination module is used to determine whether an abnormality occurs in the server.
[0152] The abnormality determination module includes:
[0153] A reference acquisition unit, used to determine a reference indicator sequence according to application requirements of the server;
[0154] A performance acquisition unit, configured to acquire a performance indicator sequence of the server based on the asset information stored at the target location of the shared memory, wherein the performance indicator sequence corresponds to the reference indicator sequence;
[0155] The comparison unit is used to compare the performance indicator sequence with the reference indicator sequence, and determine whether the server is abnormal based on the comparison result.
[0156] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0157] The server asset information reporting device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0158] The embodiment of the present invention also provides a computer device having the above Figure 8 The server asset information reporting device shown.
[0159] See also Fig. 9 , Fig. 9 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig. 9As 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). Fig. 9 A processor 10 is taken as an example.
[0160] 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.
[0161] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0162] 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.
[0163] 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.
[0164] 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. Fig. 9 The example of connecting through bus is taken in the following.
[0165] 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.
[0166] 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.
[0167] 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.
[0168] 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 method for reporting server asset information, characterized in that: The method is used for a server, wherein a basic input / output system in the server is connected to a baseboard management controller via an enhanced serial peripheral interface; the method comprises: Acquire each asset information of the server and the priority of each asset information; Applying for a shared memory from a baseboard management controller to obtain a target location corresponding to each asset information of the server in the shared memory; According to the corresponding relationship between the stage of the server startup and the priority of each asset information, at each stage of the server startup, each asset information is reported to the target location in the shared memory.
2. The method according to claim 1, characterized in that The step of applying for a shared memory from the baseboard management controller includes: Request shared memory from the baseboard management controller through the memory mapping baseboard management controller interface protocol.
3. The method according to claim 1, characterized in that Before obtaining each asset information of the server, the method further includes: In response to the startup of the basic input and output system, the shared memory area of the baseboard management controller is mapped to the memory address space of the basic input and output system.
4. The method according to claim 2, characterized in that: The method further comprises: A protocol function of a memory-mapped baseboard management controller interface protocol is loaded in the basic input / output system; the protocol function of the memory-mapped baseboard management controller interface protocol includes various function pointers; and the various function pointers are used to call the protocol function of the baseboard management controller interface protocol to report asset information.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: At any stage of server startup, when there is asset information reported to the target location in the shared memory, the baseboard management controller is notified to obtain the asset information at the target location.
6. The method according to claim 5, characterized in that The step of reporting each asset information to a target location in the shared memory at each stage of the server startup according to the corresponding relationship between the stage of the server startup and the priority of each asset information includes: In response to an initialization operation of a central processing unit in the basic input and output system, acquiring information of the basic input and output system and information of the central processing unit; In response to completion of the initialization of the central processing unit, reporting the information of the basic input and output system and the information of the central processing unit to a target location in the shared memory; In response to an initialization operation of a server memory, acquiring information of the server memory; the information of the server memory includes at least one of a memory size, a memory type, and a memory speed; In response to completion of initialization of the server memory, reporting information of the server memory to a target location in the shared memory; Detecting a high-speed serial computer expansion bus device connected to the server, and allocating system resources to the high-speed serial computer expansion bus device; the system resources include at least one of an input / output address and a memory space; In response to completion of initialization with the high-speed serial computer expansion bus device, information of the high-speed serial computer expansion bus device is written into a target location of a shared memory; the information of the high-speed serial computer expansion bus device includes at least one of a device type, a device identifier, and a resource allocation status.
7. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Determining a reference indicator sequence according to application requirements of the server; Based on the asset information stored at the target location of the shared memory, obtaining a performance indicator sequence of the server, wherein the performance indicator sequence corresponds to the reference indicator sequence; The performance indicator sequence is compared with the reference indicator sequence, and based on the comparison result, it is determined whether the server is abnormal.
8. A server asset information reporting device, characterized in that: The device comprises: An acquisition module, used for acquiring each asset information of the server and the priority of each asset information; A memory module, used for applying for a shared memory from a baseboard management controller to obtain a target location corresponding to each asset information of the server in the shared memory; The reporting module is used to report each asset information to a target location in the shared memory at each stage of the server startup according to the corresponding relationship between the stage of the server startup and the priority of each asset information.
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 asset information reporting 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 asset information reporting method according to any one of claims 1 to 7.
Citation Information
Cited By
Data transmission method and device based on enhanced serial peripheral interface, equipment and medium
CN119988265A
Data transmission method and device based on enhanced serial peripheral interface, equipment and medium
CN119988265B
Server management method, computer program product and server cabinet
CN120196513A
Server management method, computer program product and server cabinet
CN120196513B
Interrupt event processing method and device, storage medium and program product
CN120973504A