Device management method, device, computer equipment and storage medium
By generating a unified device number, the cumbersome problem of numbering and location mapping in PCIe device management in the server is solved, and fast positioning and efficient management are achieved.
Patent Information
- Application Number
- CN202411190180.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-08-28
AI Technical Summary
When managing PCIe devices in a server, it is necessary to frequently map device numbers and physical locations, resulting in cumbersome and inefficient operations.
By obtaining component identification and device identification, a unified device number is generated and written to registers, ensuring that the BMC logs and chassis silkscreen of the server OS system and device expansion components use the same number, so as to achieve the one-to-one correspondence between the software number and the physical location. .
It simplifies the physical location positioning process of PCIe devices, reduces dependence on mapped documents, improves operational efficiency and user experience, and facilitates and quickly manages and troubleshoots.
Smart Images

Figure CN118708518B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of servers, and in particular to a device management method, device, computer equipment and storage medium. Background Art
[0002] The most widely used communication bus in servers is the PCIe (peripheral component interconnect express, a high-speed serial communication bus). The server CPU (Central Processing Unit) and PCIe devices communicate data through the PCIe bus. PCIe devices include: network cards, GPU (graphics processing unit, graphics processor) cards, Raid (Redundant Arrays of Independent Disk, disk array) cards, NVME (Non-Volatile Memory Host Controller Interface Specification) hard disks, etc.
[0003] Servers will be equipped with a large number of PCIe devices, especially servers with JBOG (Just a Bunch Of GPUs, a device containing multiple independent GPU cards) components, which will be equipped with more types and quantities of PCIe devices, for example: a conventional JBOG device can be installed with 8 GPU cards, 8 network cards, and 8 NVME hard disks. When managing the above PCIe devices, it is necessary to efficiently locate the physical location of the PCIe device for server management, data center operations, troubleshooting, and hardware maintenance. Currently, when locating the physical location of a PCIe device, the BDF (Bus / Device / Function) number of the PCIe device is first queried through the server OS (Operating System), and then the physical location is manually found based on the mapping document between the BDF number and the physical location.
[0004] Therefore, the related art has the problem that locating the physical location of the PCIe device requires frequent manual mapping of the device number and the physical location, which is cumbersome and inefficient. Summary of the invention
[0005] In view of this, the present invention provides a device management method, apparatus, computer equipment and storage medium to solve the problem that locating the physical location of a PCIe device requires frequent manual mapping of the device number and the physical location, which is cumbersome and inefficient.
[0006] In a first aspect, the present invention provides a device management method, which is applied to a device extension component, comprising:
[0007] Obtain a component identifier from a server and write the component identifier into a first register;
[0008] Acquire a second number and a second arrangement order of devices in the device extension component, and generate a device identifier of the device according to the second number and the second arrangement order;
[0009] Concatenate the component identifier and the device identifier in the first register to obtain the device number;
[0010] Manage the devices according to the number and write the number into the second register of the device.
[0011] In the device management method provided in this embodiment, the device expansion component generates a device identifier of the device according to the second number and the second arrangement order of the devices in the device expansion component, and then splices the component identifier and the device identifier generated by the server to obtain the device number. This makes it possible for the server's OS system log, the BMC log in the device expansion component, and the chassis silk screen to all use the same PCIe device number, and the PCIe device numbers used by the three are consistent. In this way, the three use the same numbering method to achieve a one-to-one correspondence between the software number and the physical location, which greatly facilitates the positioning of the physical location. There is no need to search for mapping documents, and the physical location of the PCIe device can be quickly located, which is convenient and fast, and improves the user experience. It solves the problem that locating the physical location of the PCIe device requires frequent manual mapping of the device number and the physical location, which is cumbersome and inefficient.
[0012] In some optional implementations, writing the serial number into a second register of the device includes:
[0013] Get the part ID and equipment ID in the number;
[0014] According to the first preset number of digits, the component identification is converted into the first data, and according to the second preset number of digits, the device identification is converted into the second data;
[0015] Concatenate the first data and the second data to obtain third data corresponding to the number;
[0016] The third data is written into a preset field of a second register, wherein the second register is used to be accessed by the server and the device expansion component.
[0017] In this embodiment, the component identifier is converted into the first data, the device identifier is converted into the second data, the first data and the second data are spliced to obtain the third data corresponding to the number and written into the second register. The server and the device expansion component can both use the third data stored in the second register to obtain the device number, so that the server's OS system log, the BMC log in the device expansion component, and the chassis silk screen all use the same numbering management device.
[0018] In some optional implementations, after concatenating the component identifier and the device identifier in the first register to obtain the device serial number, the method further includes:
[0019] Writing the serial numbers of the second number of devices into the serial number summary file;
[0020] The number summary file is passed to the server, instructing the server to manage the devices according to the numbers in the number summary file.
[0021] In this embodiment, the numbers of the second number of devices are written into a number summary file, and the number summary file is transmitted to the server, so that the server obtains the numbers of all PCIe devices, thereby facilitating the management of PCIe devices according to the numbers.
[0022] In some optional implementations, managing devices according to numbers includes:
[0023] When receiving a device management command from the server, obtaining the operation to be performed and the number of the device to be controlled from the device management command;
[0024] Determine the device to be controlled according to the serial number of the device to be controlled;
[0025] Control the device to be controlled to perform the operation to be performed.
[0026] In this embodiment, the server sends a device management command containing the number of the operation to be executed and the device to be controlled to the device extension component. The numbers used by the server and the device extension component are unified. Therefore, the device extension component can confirm the device to be controlled according to the number and control the device to be controlled to execute the operation to be executed. It is convenient and fast, and greatly facilitates the location of the physical location.
[0027] In some optional implementations, managing devices according to numbers includes:
[0028] Read the status data of the device through the communication bus;
[0029] Determine whether the status data exceeds a preset threshold value. If so, treat the device corresponding to the status data exceeding the preset threshold value as a faulty device, and determine the fault type of the faulty device according to the status data exceeding the preset threshold value;
[0030] Determine the number of the faulty device;
[0031] Generate an alarm message including the fault type and the number of the faulty device, and write the alarm message into the operation log;
[0032] The alarm display unit corresponding to the faulty device is located according to the number of the faulty device in the operation log, and the alarm display unit is controlled to issue a fault alarm.
[0033] In this embodiment, the device expansion component uses a newly generated number instead of the original number to manage the device, reads the status data of the device, determines the faulty device based on the status data, generates an alarm message including the fault type and the number of the faulty device, writes the alarm message to the operation log, and issues a fault alarm, thereby implementing PCIe device operation monitoring and fault alarms to prevent equipment failures from affecting server services.
[0034] In a second aspect, the present invention provides a device management method, which is applied to a server and includes:
[0035] Acquire a first quantity and a first arrangement order of device expansion components, and generate a component identifier of the device expansion component according to the first quantity and the first arrangement order, wherein the device expansion component includes a plurality of devices;
[0036] Sending the component identification to the device extension component, instructing the device extension component to write the component identification into the first register, and concatenating the device identification with the component identification in the first register to obtain a device number, wherein the device identification is generated by the device extension component according to the second number of devices and the second arrangement order of the devices;
[0037] Get the device number from the second register of the device and manage the device according to the number.
[0038] In the device management method provided in this embodiment, the server generates a component identifier of the device expansion component according to the first quantity and the first arrangement order of the device expansion component. The device extension component splices the component identifier and the device identifier to obtain the device number. The server can obtain the number by accessing the second register and manage the device according to the number. The server's OS system log, the BMC log in the device expansion component, and the chassis silk screen all use the same PCIe device number, and the PCIe device numbers used by the three are consistent. In this way, the three use the same numbering method to achieve a one-to-one correspondence between the software number and the physical location, which greatly facilitates the positioning of the physical location. There is no need to look up the mapping document, and the physical location of the PCIe device can be quickly located, which is convenient and fast, and improves the user experience. It solves the problem that locating the physical location of the PCIe device requires frequent manual mapping of the device number and the physical location, which is cumbersome and inefficient.
[0039] In some optional implementations, obtaining the device number from the second register of the device includes:
[0040] Querying a preset field in the second register to obtain first data and second data;
[0041] The first data is converted into a component identification, the second data is converted into a device identification, and the component identification and the device identification are combined to obtain a device number.
[0042] In this embodiment, the server obtains the first data and the second data, converts them into a component identifier and a device identifier respectively, and merges them into a device number. The server manages the device according to the number, so that the server's OS system log, the BMC log in the device expansion component, and the chassis silk screen all use the same number to manage the device.
[0043] In some optional implementations, managing devices according to numbers includes:
[0044] Obtaining a number summary file from the device extension component, wherein the number summary file includes numbers of the second number of devices;
[0045] Obtaining the component identification and the equipment identification included in the numbers of the second number of equipment from the number summary file;
[0046] Obtaining device identification information and device status information of a second number of devices;
[0047] A device management file is generated, and the devices are managed according to the device management file, wherein the device management file includes device identification information, device status information, and component identifiers and device identifiers in the serial numbers of the second number of devices.
[0048] In this implementation, the server aggregates the device identification information, device status information, and component identifiers and device identifiers in the serial numbers of the second number of devices to generate a device management file, thereby facilitating management of the PCIe devices.
[0049] In some optional implementations, managing devices according to numbers includes:
[0050] Obtain the device detection log and determine whether there is device error information in the device detection log;
[0051] In the case of device error information, filter out the faulty device code from the device error information;
[0052] Determine a number corresponding to the faulty device code, wherein the number corresponding to the faulty device code is used to determine a physical location of the faulty device;
[0053] Generate a log copy of the device detection log, and replace the faulty device code in the log copy with the number corresponding to the faulty device code.
[0054] In this embodiment, a log copy of the device detection log is generated, and the faulty device code in the log copy is replaced with the number corresponding to the faulty device code. This allows the server's OS system log, the BMC log in the device expansion component, and the chassis silk screen to all use the same PCIe device number, and the three use the same PCIe device number. In this way, the three use the same numbering method to achieve a one-to-one correspondence between the software number and the physical location, which greatly facilitates the location of the physical location.
[0055] In some optional implementations, managing devices according to numbers includes:
[0056] Determine the device to be controlled and the operation to be performed on the device to be controlled;
[0057] Determine the number of the device to be controlled;
[0058] A device management command including the operation to be performed and the number of the device to be controlled is generated, and the device management command is sent to the device extension component to instruct the device extension component to control the device to be controlled to perform the operation to be performed.
[0059] In some optional implementations, obtaining a first quantity and a first arrangement order of device expansion components, and generating a component identifier of the device expansion component according to the first quantity and the first arrangement order includes:
[0060] issuing a communication bus scan command to query a first quantity of connected device expansion components;
[0061] Obtaining the interface serial number of the communication bus, and determining the first arrangement order of the device expansion components according to the interface serial number;
[0062] According to the first arrangement sequence, a starting sequence number is determined, and according to the starting sequence number, the first quantity and a preset step length, a component identifier of the device extension component is generated.
[0063] In this embodiment, the starting sequence number is determined according to the first arrangement sequence of the device expansion components, and the component identification of the device expansion component is generated according to the starting sequence number, the first quantity and the preset step length, so that the subsequent device expansion component can generate the device number and manage the device.
[0064] In a third aspect, the present invention provides a device management apparatus, which is deployed in a device extension component and includes:
[0065] A first acquisition module, used for acquiring a component identifier from a server and writing the component identifier into a first register;
[0066] A generating module, used for acquiring a second number and a second arrangement order of devices in the device extension component, and generating a device identification of the device according to the second number and the second arrangement order;
[0067] A splicing module, used for splicing the component identification and the device identification in the first register to obtain the device number;
[0068] The first management module is used to manage the device according to the number and write the number into the second register of the device.
[0069] In a fourth aspect, the present invention provides a device management apparatus, which is deployed on a server and includes:
[0070] A second acquisition module is used to acquire a first quantity and a first arrangement order of the device expansion component, and generate a component identifier of the device expansion component according to the first quantity and the first arrangement order, wherein the device expansion component includes a plurality of devices;
[0071] a sending module, configured to send the component identification to the device extension component, instruct the device extension component to write the component identification into the first register, and concatenate the device identification with the component identification in the first register to obtain a device number, wherein the device identification is generated by the device extension component according to the second number of devices and the second arrangement order of the devices;
[0072] The second management module is used to obtain the device number from the second register of the device and manage the device according to the number.
[0073] In a fifth 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, computer instructions are stored in the memory, and the processor executes the device management method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions, or executes the device management method of the above-mentioned second aspect or any corresponding embodiment thereof.
[0074] In a sixth 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 device management method of the first aspect or any corresponding embodiment thereof, or to execute the device management method of the second aspect or any corresponding embodiment thereof.
[0075] In the seventh aspect, the present invention provides a computer program product, including computer instructions, which are used to enable a computer to execute the device management method of the above-mentioned first aspect or any corresponding embodiment, or to execute the device management method of the above-mentioned second aspect or any corresponding embodiment. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] 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.
[0077] Figure 1 is a schematic diagram of a PCIe connection topology between a server and a device expansion component according to an embodiment of the present invention;
[0078] Figure 2 is a schematic diagram of an I2C connection topology between a server and a device expansion component according to an embodiment of the present invention;
[0079] Figure 3 is a schematic diagram of a PCIe connection topology between one server and four device expansion components according to an embodiment of the present invention;
[0080] Figure 4 is a schematic diagram of an I2C connection topology between one server and four device expansion components according to an embodiment of the present invention;
[0081] Figure 5 is a flow chart of a device management method applied to a device extension component according to an embodiment of the present invention;
[0082] Figure 6 is a schematic diagram of a preset field of a second register according to an embodiment of the present invention;
[0083] Figure 7 is a flow chart of a device management method applied to a server according to an embodiment of the present invention;
[0084] Figure 8 is a structural block diagram of a device management apparatus deployed in a device extension component according to an embodiment of the present invention;
[0085] Fig. 9 is a structural block diagram of a device management apparatus deployed on a server according to an embodiment of the present invention;
[0086] Fig.10 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0087] 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.
[0088] Servers will be equipped with a large number of PCIe devices, especially those with device expansion components such as JBOG components. They will be equipped with more types and quantities of PCIe devices. Taking the device expansion component as JBOG as an example, the server and JBOG are two independent devices, which are connected to each other through PCIe connectors and high-speed cables. For example: Figure 1 As shown in the figure, when a server is connected to a JBOG, the corresponding PCIe topology is that the uplink interface of each PCIe Switch (PCIe bus switching chip) in the JBOG is connected to the interface of the server's CPU, and the downlink interface of the PCIe Switch is connected to PCIe devices such as GPU, network card, NVME hard disk, etc. The PCIe Switch is used to expand the number of PCIe buses. Figure 2 As shown in the figure, when a server is connected to a JBOG, the corresponding I2C communication topology is that the server's BMC (Board Management Controller) is connected to the JBOG's BMC through the I2C link of interface 0, and the JBOG's BMC has independent I2C communication signals with each PCIe device. Figure 3 As shown in the figure, when a server is connected to 4 JBOGs, the corresponding PCIe topology is as follows. The CPU is connected to the switch chips of the 4 JBOGs through interfaces 0 to 4. Figure 4As shown in the figure, when a server is connected to four JBOGs, its corresponding I2C communication topology. The server BMC has four independent I2C signals, which are connected to the BMC chips of the four JBOGs through interfaces 0 to 4. The BMC in each JBOG has independent I2C communication signals with each PCIe device. When managing a large number of PCIe devices on a server, a method is needed to efficiently locate the physical location of the PCIe device for server management, data center operations, troubleshooting, and hardware maintenance. The BDF number is calculated by the BIOS (Basic Input Output System) according to an algorithm, and the specific value cannot be specified. The JBOGBMC can only access the PCIe device out-of-band and cannot obtain the in-band BDF number. Once the product configuration is changed, the BDF number may change, so the JBOG BMC cannot preset a fixed BDF number. When a server is connected to multiple JBOGs, even if the PCIe device positions are the same in different JBOGs, the BDF numbers are different. Therefore, when managing PCIe devices, the PCIe device numbering method is different. The BDF number (for example, 0001:08:02.0a) is used in the OS system, the BMC log displays the physical location number of the PCIe device (for example, GPU0, NVME1), and the chassis window silk screen is a digital number (for example, 0, 1, 2, 3). The OS system log is inconsistent with the BMC log and the chassis window silk screen. When analyzing the log, the PCIe device numbers in different logs need to be mapped. Therefore, when locating the physical location of the PCIe device, the BDF number of the PCIe device is queried through the OS, and then the physical location is manually found based on the BDF and physical location mapping document. Multiple BDF and physical location mapping documents are required. When the configuration of the same type of product is different, such as the CPU model, the type / quantity of PCIe devices, etc., the BDF number of the PCIe device in the OS system is different, which makes the management and fault location cumbersome and inefficient. In addition, the BDF and physical location mapping document can only be produced after actual testing. Once the product configuration is changed, the BDF number may change, such as changing the CPU model, increasing or decreasing the number of PCIe devices, updating the BIOS version, etc. Therefore, in order to facilitate server management, data center operations, troubleshooting, and maintenance of PCIe devices, it is necessary to solve the cumbersome problem of BDF number search for physical location operations.
[0089] Based on the above content, an embodiment of the present invention provides a device management method, in which the OS system log of the server, the BMC log in the device expansion component, and the chassis silk screen all use the same PCIe device number, and the PCIe device numbers used by the three are consistent. The server first generates a component identifier of the device expansion component, and the device expansion component then generates a device identifier of the device according to the second number and second arrangement order of the devices in the device expansion component, and splices the component identifier and the device identifier in the first register to obtain the number of the device. The server and the device expansion component manage the PCIe device according to the number. It can be achieved that the OS system log, BMC log, and chassis silk screen all use the same number to represent the PCIe device, so that the three use the same numbering method to achieve a one-to-one correspondence between the software number and the physical location, which greatly facilitates the location of the physical location. There is no need to search for mapping documents, and the physical location of the PCIe device can be quickly located, which is convenient and fast, and improves the user experience.
[0090] According to an embodiment of the present invention, a device management embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in the device extension component, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.
[0091] In this embodiment, a device management method is provided, which can be used for device expansion components. Figure 5 is a flow chart of a device management method according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:
[0092] Step S501: Obtain a component identifier from a server, and write the component identifier into a first register.
[0093] Specifically, the device expansion component is such as JBOG, and the device is such as PCIe device, such as Figure 3 As shown, JBOG is connected to the server, and the same server can be connected to multiple JBOGs. When the server is connected to different numbers / types of JBOGs, and multiple PCIe devices are expanded through the PCIe Switch. The PCIE topology is different. Its diversity and variability make it impossible to know the BDF number in advance, and then the physical Slot number corresponding to the BDF number cannot be known in advance. It is not as simple as an ordinary computer motherboard, which can fix the PCIe topology in advance and solidify the PCIe BDF and physical Slot number values. Therefore, it is necessary to regenerate the number of the PCIe device.
[0094] The server's BMC uses the Standby power supply and can start working after the AC power is turned on. After the server's BMC starts, it queries how many device expansion components are connected. Then, the server BMC numbers the scanned device expansion components and generates a component identification (JBOG ID), as shown in Table 1.
[0095] Table 1 Component identification
[0096]
[0097] The JBOG ID of the JBOG is set in decimal, for example, 0-15 means there are 16 JBOGs, namely JBOG0-15.
[0098] The BMC of the server sends the JBOG ID to the device expansion component through different I2C buses. The BMC of the device expansion component, namely the JBOG BMC, obtains the JBOG ID from the server. After receiving the JBOG ID, the JBOG BMC stores it in the first register, which is an internal register of the JBOG BMC.
[0099] Step S502: acquiring a second quantity and a second arrangement order of devices in the device extension component, and generating a device identification of the device according to the second quantity and the second arrangement order.
[0100] Specifically, after the circuit design of the device expansion component is completed, the second number and the second arrangement order of the devices in the device expansion component are determined. The device expansion component, such as the JBOG BMC of the JBOG, reads the configuration information to determine the second number and the second arrangement order of the devices. The second number is set according to actual needs, and no specific number limit is made here. The arrangement order is, for example: from left to right, from top to bottom, etc.
[0101] According to the second quantity and the second arrangement order, a rule for generating a device ID is determined, and a device ID (Device ID) of the device is generated according to the rule. For example, the rule is as follows: from left to right and from top to bottom, the device ID increases in sequence, and each device ID (Device ID) is generated. Then, the Device ID is saved in the FW (firework) in the PCIe Switch and remains fixed.
[0102] In addition, the field ranges of different Device IDs may be divided according to the device type, for example, as shown in Table 2.
[0103] Table 2 Equipment identification
[0104]
[0105] There are three types of devices, namely GPU, NVME hard disk and NIC network card. The field range of GPU Device ID is 0~99, indicating that there are 100 GPUs, namely GPU0~GPU99; the field range of NVME hard disk Device ID is 100~199, indicating that there are 100 NVME hard disks, namely NVME0~NVME99; the field range of NIC Device ID is 200~255, indicating that there are 56 NIC network cards, namely NIC0~NIC55.
[0106] Step S503: concatenate the component identifier and the device identifier in the first register to obtain the device serial number.
[0107] Specifically, the device extension component concatenates the component identifier (JBOG ID) and the device identifier (Device ID) in the first register, that is, JBOG ID+Device ID. For example, if the JBOG ID is 06 and the Device ID is 001, the concatenated number is 06_001. In addition, the device type can be written into the device number. The device numbering method is JBOG ID+Device ID+Device type. For example, if the JBOG ID is 06 and the Device ID is 001, the concatenated number is 06_001_GPU.
[0108] Step S504: Manage the device according to the number, and write the number into the second register of the device.
[0109] Specifically, when a device expansion component such as JBOG is powered on, the JBOG Switch in the JBOG starts to initialize. At this time, the JBOG ID value is obtained from the JBOG BMC register through the I2C interface, and after being combined with the Device ID, the device number is obtained. The second register, such as the Slot capabilities register, writes the number to the second register of the PCIe device. The JBOG writes the device number to the Physical SlotNumber field in the Slot capabilities register of the corresponding downstream interface.
[0110] In the device management method provided in this embodiment, the device expansion component generates a device identifier of the device according to the second number and the second arrangement order of the devices in the device expansion component, and then splices the component identifier and the device identifier generated by the server to obtain the device number. This makes it possible for the server's OS system log, the BMC log in the device expansion component, and the chassis silk screen to all use the same PCIe device number, and the PCIe device numbers used by the three are consistent. In this way, the three use the same numbering method to achieve a one-to-one correspondence between the software number and the physical location, which greatly facilitates the positioning of the physical location. There is no need to search for mapping documents, and the physical location of the PCIe device can be quickly located, which is convenient and fast, and improves the user experience. It solves the problem that locating the physical location of the PCIe device requires frequent manual mapping of the device number and the physical location, which is cumbersome and inefficient.
[0111] In some optional implementations, writing the serial number into a second register of the device includes:
[0112] Get the part ID and equipment ID in the number;
[0113] According to the first preset number of digits, the component identification is converted into the first data, and according to the second preset number of digits, the device identification is converted into the second data;
[0114] Concatenate the first data and the second data to obtain third data corresponding to the number;
[0115] The third data is written into a preset field of a second register, wherein the second register is used to be accessed by the server and the device expansion component.
[0116] Specifically, the preset field is, for example, Physical Slot Number. In JBOG, all PCIe devices are connected to the downstream interface of the PCIe Switch chip. The Physical Slot Number field of each downstream interface needs to be configured in the Switch FW. When considering AI model applications, a server will be connected to multiple JBOGs. This embodiment borrows the Physical Slot Number field in the Slot capabilities register defined in the PCIe specification, such as Figure 6 As shown in the figure, Physical Slot Number occupies the 20th to 31st bits of the second register. Physical Slot Number is the PCIE slot number, which refers to the physical number of the PCI Express slot. The PCIe slot is an interface standard for connecting expansion cards (such as graphics cards, sound cards, network cards, etc.). A computer motherboard usually provides multiple PCIe slots, and each slot has a unique number.
[0117] The number of bits (20-31 bits) contained in the Physical Slot Number is split into the first preset number of bits and the second preset number of bits. For example, the first preset number of bits is 28-31 bits, and the second preset number of bits is 20-27 bits. The first preset number of bits in the Physical Slot Number is used to record the JBOG ID, and the second preset number of bits is used to record the Device ID. The first preset number of bits is 4 bits in total, which can support up to 16 JBOGs, and the second preset number of bits is 8 bits in total, which can support up to 256 PCIe devices.
[0118] Get the component ID (JBOG ID) and device ID (Device ID) in the serial number. According to the first preset number of digits, convert the decimal component ID into the first binary data, for example: if the first preset number of digits is 28-31 bit, the JBOG ID is 06, and the converted first data is 0110. According to the second preset number of digits, convert the decimal device ID into the second binary data, for example: if the second preset number of digits is 20-27 bit, the JBOG ID is 001, and the converted second data is 00000001.
[0119] The first data and the second data are concatenated to obtain third data corresponding to the number. For example, if the first data is 0110 and the second data is 00000001, the third data corresponding to the number is 0110_00000001.
[0120] The second register is, for example, a Slot capabilities register, and the preset field is, for example, a Physical Slot Number. The third data is written into the preset field of the second register, and the second register is used to be accessed by the server and the device expansion component.
[0121] In this embodiment, the component identifier is converted into the first data, the device identifier is converted into the second data, the first data and the second data are spliced to obtain the third data corresponding to the number and written into the second register. The server and the device expansion component can both use the third data stored in the second register to obtain the device number, so that the server's OS system log, the BMC log in the device expansion component, and the chassis silk screen all use the same numbering management device.
[0122] In some optional implementations, after concatenating the component identifier and the device identifier in the first register to obtain the device serial number, the method further includes:
[0123] Writing the serial numbers of the second number of devices into the serial number summary file;
[0124] The number summary file is passed to the server, instructing the server to manage the devices according to the numbers in the number summary file.
[0125] Specifically, the number summary file is, for example, an ID.txt file. The second register is, for example, a Slot capabilities register. The BIOS reads the Slot capabilities register of the PCIe device, obtains bits 20 to 31, obtains the third data, converts the third data into the device number according to the ID encoding format of the present invention, and parses out the JBOG ID + Device ID. The BIOS writes all the codes into the number summary file in the BIOS chip.
[0126] The BIOS passes the number summary file to the server's BMC through the USB interface, so that the server's BMC obtains the numbers of all PCIe devices. PCIe devices can be managed based on these numbers.
[0127] In this embodiment, the numbers of the second number of devices are written into a number summary file, and the number summary file is transmitted to the server, so that the server obtains the numbers of all PCIe devices, thereby facilitating the management of PCIe devices according to the numbers.
[0128] In some optional implementations, managing devices according to numbers includes:
[0129] When receiving a device management command from the server, obtaining the operation to be performed and the number of the device to be controlled from the device management command;
[0130] Determine the device to be controlled according to the serial number of the device to be controlled;
[0131] Control the device to be controlled to perform the operation to be performed.
[0132] Specifically, the server BMC can control the PCIe devices in each device expansion component through custom commands, namely device management commands, for example: limiting device power consumption, resetting the device, etc.
[0133] Under the server OS system, determine the number of the device to be controlled and the operation to be performed, generate a device management command containing the number of the device to be controlled and the operation to be performed, send the device management command to the server BMC, and the server BMC sends the command to the corresponding device expansion component BMC.
[0134] After receiving the device management command from the server, the device extension component obtains the number of the operation to be performed and the device to be controlled from the device management command, determines the device to be controlled according to the number of the device to be controlled, and controls the device to be controlled to perform the operation to be performed, such as: limiting device power consumption, resetting the device, etc.
[0135] In this embodiment, the server sends a device management command containing the number of the operation to be executed and the device to be controlled to the device extension component. The numbers used by the server and the device extension component are unified. Therefore, the device extension component can confirm the device to be controlled according to the number and control the device to be controlled to execute the operation to be executed. It is convenient and fast, and greatly facilitates the location of the physical location.
[0136] In some optional implementations, managing devices according to numbers includes:
[0137] Read the status data of the device through the communication bus;
[0138] Determine whether the status data exceeds a preset threshold value. If so, treat the device corresponding to the status data exceeding the preset threshold value as a faulty device, and determine the fault type of the faulty device according to the status data exceeding the preset threshold value;
[0139] Determine the number of the faulty device;
[0140] Generate an alarm message including the fault type and the number of the faulty device, and write the alarm message into the operation log;
[0141] The alarm display unit corresponding to the faulty device is located according to the number of the faulty device in the operation log, and the alarm display unit is controlled to issue a fault alarm.
[0142] Specifically, the device expansion component is such as JBOG. A set of I2C communication buses are designed between the BMC of JBOG and each PCIe device. Because it is a physical line connection, the connection relationship is fixed. Therefore, in the JBOG BMC code, each BMC I2C channel corresponds to a PCIe device at a fixed physical location.
[0143] The device expansion component reads the device status data through the above-mentioned I2C communication bus every 1S, and the status data includes: voltage, temperature, power consumption, in-position information, etc. It is judged whether the status data exceeds the preset threshold value. For example, when JBOG I2C channel 3 is connected to PCIe physical slot 1, GPU1 is installed on physical slot 1, and the status data of the device is read through the I2C communication bus, and it is judged that the temperature in the status data returned by I2C channel 3 exceeds the upper limit set by the GPU. If it exceeds, the device corresponding to the status data exceeding the preset threshold value is regarded as a faulty device, and the fault type of the faulty device is determined according to the status data exceeding the preset threshold value. For example, if the temperature in the acquired status data of GPU1 exceeds the upper limit set by GPU1, then the GPU1 is a faulty device, and the fault type of the faulty device is overtemperature.
[0144] Generates an alarm message containing the fault type and the fault device number, such as: GPU1 overtemperature, 06_001_GPU OVER TEMPERATURE TRIP; NVME disk 2 overtemperature alarm, alarm message 06_102_NVME OVERTEMPERATURE TRIP; network card 3 overtemperature alarm, alarm message 06_203_GPU OVER TEMPERATURE TRIP. The alarm message is written to the server BMC operation log.
[0145] The alarm display unit, such as the red health light on the front window of the server chassis, locates the alarm display unit corresponding to the faulty device according to the number of the faulty device in the operation log, and controls the alarm display unit to issue a fault alarm. For example, the physical position of the faulty device in the server chassis is determined according to the number of the faulty device, the red health light corresponding to the faulty device is determined according to the physical position, and the red health light corresponding to the faulty device is lit.
[0146] In addition, the data center monitoring system will regularly capture the operation log of each server's BMC. When the alarm information is found, it will trigger the computer room maintenance work order and notify the operation and maintenance personnel.
[0147] In this embodiment, the device expansion component uses a newly generated number instead of the original number to manage the device, reads the status data of the device, determines the faulty device based on the status data, generates an alarm message including the fault type and the number of the faulty device, writes the alarm message to the operation log, and issues a fault alarm, thereby implementing PCIe device operation monitoring and fault alarms to prevent equipment failures from affecting server services.
[0148] In this embodiment, a device management method is provided, which can be used for a server. Figure 7 is a flow chart of a device management method according to an embodiment of the present invention. Figure 7 As shown, the process includes the following steps:
[0149] Step S701, obtaining a first quantity and a first arrangement order of device expansion components, and generating a component identifier of the device expansion component according to the first quantity and the first arrangement order, wherein the device expansion component includes a plurality of devices.
[0150] Specifically, JBOG is connected to the server, and the same server can be connected to multiple JBOGs. When the server is connected to different numbers / types of JBOGs, and multiple PCIe devices are expanded through the PCIe Switch. The PCIE topology is different. Its diversity and variability make it impossible to know the BDF number in advance, and then the physical Slot number corresponding to the BDF number cannot be known in advance. It is not as simple as an ordinary computer motherboard, which can fix the PCIe topology in advance and solidify the PCIe BDF and physical Slot number values. Therefore, it is necessary to regenerate the device identifier (JBOG ID) of the PCIe device.
[0151] When a server is connected to multiple JBOGs, the server BMC software needs to number the multiple JBOGs. In this embodiment, a set of I2C communication buses are designed between the server BMC and the BMC of each JBOG.
[0152] The server obtains the first quantity and first arrangement order of the connected device expansion components. The first quantity is set according to actual needs. There is no specific quantity limit here. For example, the BMC of the server uses the Standby power supply and can start working after AC power is turned on. After the BMC of the server is started, the first quantity is obtained by querying how many device expansion components are connected. The first arrangement order is, for example, from left to right, from top to bottom. The server BMC can customize the order and generate the component identification of the device expansion component according to the first quantity and the first arrangement order. For example, according to the physical position, from left to right, from top to bottom, the number increases in sequence. The physical interface corresponding to I2C0 of the server BMC is on the far left, so the device identification of the JBOG connected to it is 00. By analogy, the device identification of the JBOG connected to the rightmost interface is 03.
[0153] Step S702, sending the component identification to the device extension component, instructing the device extension component to write the component identification into the first register, and concatenating the device identification and the component identification in the first register to obtain the device number, wherein the device identification is generated by the device extension component according to the second number of devices and the second arrangement order of the devices.
[0154] Specifically, the server's BMC sends the device identifier (JBOG ID) to the BMC of the corresponding device expansion component, such as the BMC of JBOG, through different I2C buses. After receiving the JBOG ID, the BMC of JBOG writes the component identifier into the first register, such as the internal register of the JBOG BMC. The device expansion component splices the component identifier (JBOG ID) and the device identifier (Device ID) in the first register, that is, JBOG ID+Device ID. For example, if the JBOG ID is 06 and the Device ID is 001, the spliced number is 06_001.
[0155] Step S703, obtaining the device number from the second register of the device, and managing the device according to the number.
[0156] Specifically, the second register is, for example, a Slot capabilities register. The OS system of the server can obtain the device number generated after the device expansion components are spliced from the second register, and manage the device according to the number.
[0157] In the device management method provided in this embodiment, the server generates a component identifier of the device expansion component according to the first quantity and the first arrangement order of the device expansion component. The device extension component splices the component identifier and the device identifier to obtain the device number. The server can obtain the number by accessing the second register and manage the device according to the number. The server's OS system log, the BMC log in the device expansion component, and the chassis silk screen all use the same PCIe device number, and the PCIe device numbers used by the three are consistent. In this way, the three use the same numbering method to achieve a one-to-one correspondence between the software number and the physical location, which greatly facilitates the positioning of the physical location. There is no need to look up the mapping document, and the physical location of the PCIe device can be quickly located, which is convenient and fast, and improves the user experience. It solves the problem that locating the physical location of the PCIe device requires frequent manual mapping of the device number and the physical location, which is cumbersome and inefficient.
[0158] In some optional implementations, obtaining the device number from the second register of the device includes:
[0159] Querying a preset field in the second register to obtain first data and second data;
[0160] The first data is converted into a component identification, the second data is converted into a device identification, and the component identification and the device identification are combined to obtain a device number.
[0161] Specifically, the second register is, for example, a Slot capabilities register. The preset field is, for example, a Physical Slot Number. The OS system of the server can query the previously written first binary data converted from a decimal component identifier (JBOG ID) and second binary data converted from a decimal device identifier (Device ID) by querying the Physical Slot Number field in the Slot capabilities register of the PCIe device.
[0162] The first data is converted into a component identifier, the second data is converted into a device identifier, and the component identifier and the device identifier are combined to obtain the device number. For example, if the first data is 0110 and the second data is 00000001, the first data is converted into a component identifier 06 and the second data is converted into a device identifier 001. The component identifier and the device identifier are combined to obtain the device number 06_001.
[0163] In this embodiment, the server obtains the first data and the second data, converts them into a component identifier and a device identifier respectively, and merges them into a device number. The server manages the device according to the number, so that the server's OS system log, the BMC log in the device expansion component, and the chassis silk screen all use the same number to manage the device.
[0164] In some optional implementations, managing devices according to numbers includes:
[0165] Obtaining a number summary file from the device extension component, wherein the number summary file includes numbers of the second number of devices;
[0166] Obtaining the component identification and the equipment identification included in the numbers of the second number of equipment from the number summary file;
[0167] Obtaining device identification information and device status information of a second number of devices;
[0168] A device management file is generated, and the devices are managed according to the device management file, wherein the device management file includes device identification information, device status information, and component identifiers and device identifiers in the serial numbers of the second number of devices.
[0169] Specifically, the number summary file is, for example, an ID.txt file. The server BMC obtains the number summary file from the device extension component, and obtains the component identifier (JBOG ID) and the device identifier (Device ID) contained in the numbers of the second number of devices from the number summary file, so that the server BMC obtains the numbers of all PCIe devices.
[0170] Device expansion components, such as JBOG. The server BMC queries the device identification information and device status information of each connected JBOG PCIe device through round-robin training. The number of devices is 1, and the second number is set according to actual needs. There is no specific number limit here. Device identification information, such as BDF number, serial number (SN), etc., and device status information, such as temperature, in-place status, power consumption, health / fault status, etc.
[0171] The server BMC collects all data and generates a device management file, such as an XML file, and manages the device according to the device management file. The device management file contains device identification information, device status information, and component identifiers and device identifiers in the numbers of the second number of devices. For example, the device management file is an XML file, which contains device identification information, device status information, and component identifiers and device identifiers in the numbers of the second number of devices for each device. For example, the first column of the device management file records the JBOG ID, the second column records the Device ID, the third column records the BDF number, and the fourth column records the device SN. The subsequent columns are the temperature, power consumption, in-place status, health / fault status, etc. in the device status information.
[0172] In this implementation, the server aggregates the device identification information, device status information, and component identifiers and device identifiers in the serial numbers of the second number of devices to generate a device management file, thereby facilitating management of the PCIe devices.
[0173] In some optional implementations, managing devices according to numbers includes:
[0174] Obtain the device detection log and determine whether there is device error information in the device detection log;
[0175] In the case of device error information, filter out the faulty device code from the device error information;
[0176] Determine a number corresponding to the faulty device code, wherein the number corresponding to the faulty device code is used to determine a physical location of the faulty device;
[0177] Generate a log copy of the device detection log, and replace the faulty device code in the log copy with the number corresponding to the faulty device code.
[0178] Specifically, a new PCIe monitoring program is opened in the server, and the PCIe monitoring program is made to capture the device detection log every set time, the set time is, for example, 100ms, and the device detection log is, for example, dmesg log. The PCIe monitoring program filters the device error information related to the PCIe device in the device detection log. When the PCIe monitoring program finds that there is device error information of the PCIe device in the device detection log, the faulty device code and the error content are filtered out in the device detection log, for example, the faulty device code and the BDF code of the faulty device.
[0179] The PCIe monitoring program queries the Physical Slot Number field in the Slot capabilities register of the faulty device corresponding to the faulty device code to determine the number corresponding to the faulty device code. For example, the faulty device code is the BDF code of the faulty device, which is 0001:08:02.0a. By querying the Physical Slot Number field in the Slotcapabilities register of the faulty device corresponding to the faulty device code, it is determined that the number corresponding to the faulty device code is 01_002. The number corresponding to the faulty device code is used to determine the physical location of the faulty device. In addition, the number corresponding to the faulty device code can also be queried by reading the above-mentioned device management file, including: component identification (JBOG ID) and device identification (Device ID).
[0180] Save the device detection log as a copy to generate a log copy of the device detection log, for example: "dmesg pro" log. Replace the faulty device code in the log copy with the number corresponding to the faulty device code.
[0181] In this embodiment, a log copy of the device detection log is generated, and the faulty device code in the log copy is replaced with the number corresponding to the faulty device code. This allows the server's OS system log, the BMC log in the device expansion component, and the chassis silk screen to all use the same PCIe device number, and the three use the same PCIe device number. In this way, the three use the same numbering method to achieve a one-to-one correspondence between the software number and the physical location, which greatly facilitates the location of the physical location.
[0182] In some optional implementations, managing devices according to numbers includes:
[0183] Determine the device to be controlled and the operation to be performed on the device to be controlled;
[0184] Determine the number of the device to be controlled;
[0185] A device management command including the operation to be performed and the number of the device to be controlled is generated, and the device management command is sent to the device extension component to instruct the device extension component to control the device to be controlled to perform the operation to be performed.
[0186] Specifically, the server uses JBOG ID and Device ID to replace the original BDF number for device operation monitoring and alarm. For example, the BDF number (0001:08:02.0a) in the previous server system log is replaced by JBOG ID and Device ID number (01_002), which represents PCIe device 2 of JBOG1.
[0187] The server BMC can control the PCIe devices in each device expansion component through custom commands, namely device management commands, such as limiting device power consumption, resetting devices, etc.
[0188] Under the server OS system, determine the number of the device to be controlled and the operation to be performed, generate a device management command containing the number of the device to be controlled and the operation to be performed, send the device management command to the server BMC, and the server BMC sends the command to the corresponding device expansion component BMC.
[0189] After receiving the device management command from the server, the device extension component obtains the number of the operation to be performed and the device to be controlled from the device management command, determines the device to be controlled according to the number of the device to be controlled, and controls the device to be controlled to perform the operation to be performed, such as: limiting device power consumption, resetting the device, etc.
[0190] In some optional implementations, obtaining a first quantity and a first arrangement order of device expansion components, and generating a component identifier of the device expansion component according to the first quantity and the first arrangement order includes:
[0191] issuing a communication bus scan command to query a first quantity of connected device expansion components;
[0192] Obtaining the interface serial number of the communication bus, and determining the first arrangement order of the device expansion components according to the interface serial number;
[0193] According to the first arrangement sequence, a starting sequence number is determined, and according to the starting sequence number, the first quantity and a preset step length, a component identifier of the device extension component is generated.
[0194] Specifically, the device expansion component is, for example, a JBOG. A set of I2C communication buses are designed between the server BMC and the BMC of each JBOG. Therefore, the server BMC can query the first number of connected device expansion components by issuing a bus scan command.
[0195] After the server's BMC is started, it issues a communication bus scan command to query the first number of connected device expansion components. Then, the server BMC obtains the interface serial number of the communication bus and determines the first arrangement order of the device expansion components according to the interface serial number. For example: Figure 4 As shown, the interface numbers include interface 0, interface 1, interface 2, and interface 3, and the determined first arrangement order is JBOG0, JBOG1, JBOG2, and JBOG3.
[0196] According to the first arrangement sequence, a starting sequence number is determined, for example, the starting sequence number is 00. The preset step length is, for example, 1 or other values. According to the starting sequence number, the first quantity and the preset step length, a component identifier of the device extension component is generated, for example, the preset step length is 1, the starting sequence number is 00, the component identifier of JBOG0 is 00, the component identifier of JBOG1 is 01, the component identifier of JBOG2 is 02, and the component identifier of JBOG3 is 03.
[0197] In this embodiment, the starting sequence number is determined according to the first arrangement sequence of the device expansion components, and the component identification of the device expansion component is generated according to the starting sequence number, the first quantity and the preset step length, so that the subsequent device expansion component can generate the device number and manage the device.
[0198] In some optional implementations, the server BMC may monitor the link status of the PCIe device and issue an alarm, and the process includes steps A1 to A4.
[0199] Step A1: The server BMC obtains the presence information of several PCIe devices.
[0200] Step A2: The server BMC receives the link status information of the PCIe device sent by the BIOS, and determines whether the number of link status information is equal to the number of in-place information.
[0201] Step A3: If the number of link status information is not equal to the number of in-place information, a log is triggered to record information of the missing PCIe device in the link status information.
[0202] Step A4, in response to receiving the abnormal information of the link status of the PCIe device sent by the BIOS, triggering a log to record the abnormal information, and lighting up the corresponding system alarm light to issue an alarm.
[0203] Specifically, the device expansion device is, for example, JBOG, the server is only connected to 1 JBOG, and the JBOG has 8 GPUs. This embodiment fixes the vulnerability of the monitoring and alarm function for the GPU Link status in the current 8-GPU server, and the GPU loss situation that occurs in any case can be logged by the BMC and trigger an alarm.
[0204] After powering on, the server BMC reads the in-position signals of GPIO0, GPIO1, GPIO2, GPIO3, GPIO4, GPIO6, and GPIO7, and the GPU corresponding to GPIO5 is not in position, indicating that 7 GPUs are connected to the system at this time, among which the position numbered 01_001_GPU is not connected to the GPU. The server's BIOS system captures the GPU PCIe Link information and finds that the GPU numbered 01_008_GPU has no Link, that is, GPU8 is missing. The device expansion device transmits the captured information to the server BMC through the I2C communication bus. The server BMC parses the GPU PCIe Link information passed over and finds that only 6 GPUs are normally Linked, and the missing GPU is GPU1. The asset list under the BMC management webpage only displays the information and PCIe Link status of the six GPUs GPU0, GPU2, GPU3, GPU4, GPU6, and GPU7; the server BMC triggers log recording, records the log of CPU0_SW0_GPU1 loss, and triggers the alarm light to light up.
[0205] In this embodiment, by combining the passive acceptance of BIOS information by the BMC and the active judgment through the logic device, effective logging and alarm are performed for the situation where the PCIe device is lost during the initial power-on, thereby filling the monitoring blind spot and making the server's monitoring and alarm method for the PCIe device link status more complete.
[0206] In this embodiment, a device management device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of 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.
[0207] This embodiment provides a device management device, which is deployed in a device expansion component, such as Figure 8 As shown, including:
[0208] A first acquisition module 801 is used to acquire a component identifier from a server and write the component identifier into a first register;
[0209] A generating module 802 is used to obtain a second number and a second arrangement order of devices in the device extension component, and generate a device identifier of the device according to the second number and the second arrangement order;
[0210] A concatenation module 803 is used to concatenate the component identifier and the device identifier in the first register to obtain a device number;
[0211] The first management module 804 is used to manage the device according to the serial number and write the serial number into the second register of the device.
[0212] In some optional implementations, the first management module 804 writes the serial number into the second register of the device, including:
[0213] Get the part ID and equipment ID in the number;
[0214] According to the first preset number of digits, the component identification is converted into the first data, and according to the second preset number of digits, the device identification is converted into the second data;
[0215] Concatenate the first data and the second data to obtain third data corresponding to the number;
[0216] The third data is written into a preset field of a second register, wherein the second register is used to be accessed by the server and the device expansion component.
[0217] In some optional implementations, after concatenating the component identifier and the device identifier in the first register to obtain the device serial number, the apparatus is used to:
[0218] Writing the serial numbers of the second number of devices into the serial number summary file;
[0219] The number summary file is passed to the server, instructing the server to manage the devices according to the numbers in the number summary file.
[0220] In some optional implementations, the first management module 804 manages the devices according to the serial numbers, including:
[0221] When receiving a device management command from the server, obtaining the operation to be performed and the number of the device to be controlled from the device management command;
[0222] Determine the device to be controlled according to the serial number of the device to be controlled;
[0223] Control the device to be controlled to perform the operation to be performed.
[0224] In some optional implementations, the first management module 804 manages the devices according to the serial numbers, including:
[0225] Read the status data of the device through the communication bus;
[0226] Determine whether the status data exceeds a preset threshold value. If so, treat the device corresponding to the status data exceeding the preset threshold value as a faulty device, and determine the fault type of the faulty device according to the status data exceeding the preset threshold value;
[0227] Determine the number of the faulty device;
[0228] Generate an alarm message including the fault type and the number of the faulty device, and write the alarm message into the operation log;
[0229] The alarm display unit corresponding to the faulty device is located according to the number of the faulty device in the operation log, and the alarm display unit is controlled to issue a fault alarm.
[0230] This embodiment provides a device management apparatus, which is deployed on a server, such as Fig. 9 As shown, including:
[0231] The second acquisition module 901 is used to acquire a first quantity and a first arrangement order of device expansion components, and generate a component identifier of the device expansion component according to the first quantity and the first arrangement order, wherein the device expansion component includes a plurality of devices;
[0232] A sending module 902 is used to send the component identification to the device extension component, instruct the device extension component to write the component identification into the first register, and concatenate the device identification with the component identification in the first register to obtain the device number, wherein the device identification is generated by the device extension component according to the second number of devices and the second arrangement order of the devices;
[0233] The second management module 903 is used to obtain the device number from the second register of the device and manage the device according to the number.
[0234] In some optional implementations, the second management module 903 obtains the device number from the second register of the device, including:
[0235] Querying a preset field in the second register to obtain first data and second data;
[0236] The first data is converted into a component identification, the second data is converted into a device identification, and the component identification and the device identification are combined to obtain a device number.
[0237] In some optional implementations, the second management module 903 manages the devices according to the serial numbers, including:
[0238] Obtaining a number summary file from the device extension component, wherein the number summary file includes numbers of the second number of devices;
[0239] Obtaining the component identification and the equipment identification included in the numbers of the second number of equipment from the number summary file;
[0240] Obtaining device identification information and device status information of a second number of devices;
[0241] A device management file is generated, and the devices are managed according to the device management file, wherein the device management file includes device identification information, device status information, and component identifiers and device identifiers in the serial numbers of the second number of devices.
[0242] In some optional implementations, the second management module 903 manages the devices according to the serial numbers, including:
[0243] Obtain the device detection log and determine whether there is device error information in the device detection log;
[0244] In the case of device error information, filter out the faulty device code from the device error information;
[0245] Determine a number corresponding to the faulty device code, wherein the number corresponding to the faulty device code is used to determine a physical location of the faulty device;
[0246] Generate a log copy of the device detection log, and replace the faulty device code in the log copy with the number corresponding to the faulty device code.
[0247] In some optional implementations, the second management module 903 manages the devices according to the serial numbers, including:
[0248] Determine the device to be controlled and the operation to be performed on the device to be controlled;
[0249] Determine the number of the device to be controlled;
[0250] A device management command including the operation to be performed and the number of the device to be controlled is generated, and the device management command is sent to the device extension component to instruct the device extension component to control the device to be controlled to perform the operation to be performed.
[0251] In some optional implementations, the second acquisition module 901 acquires a first quantity and a first arrangement order of the device expansion components, and generates a component identifier of the device expansion component according to the first quantity and the first arrangement order, including:
[0252] issuing a communication bus scan command to query a first quantity of connected device expansion components;
[0253] Obtaining the interface serial number of the communication bus, and determining the first arrangement order of the device expansion components according to the interface serial number;
[0254] According to the first arrangement sequence, a starting sequence number is determined, and according to the starting sequence number, the first quantity and a preset step length, a component identifier of the device extension component is generated.
[0255] 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.
[0256] The equipment management 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.
[0257] The embodiment of the present invention also provides a computer device having the above Figure 8 or Fig. 9 The device management device shown.
[0258] See also Fig.10 , Fig.10 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.10 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). Fig.10 A processor 10 is taken as an example.
[0259] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include an 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.
[0260] 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.
[0261] 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.
[0262] 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.
[0263] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0264] 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.
[0265] 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.
[0266] 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 in this application.
Claims
1. A device management method, It is characterized in that The method is applied to a device expansion component, and the method comprises: Obtain a component identification from a server, and write the component identification into a first register; Acquire a second number and a second arrangement order of devices in the device extension component, and generate a device identifier of the device according to the second number and the second arrangement order; Generating the device identification of the device according to the second quantity and the second arrangement order includes: determining a rule for generating the device identification according to the second quantity and the second arrangement order, wherein the rule for generating the device identification includes: the device identification increases from left to right or from top to bottom; generating the device identification of the device according to the rule for generating the device identification; Concatenate the component identifier in the first register and the device identifier to obtain a serial number of the device, wherein the serial number is used to identify the device in a server log, a baseboard management controller log, and a chassis silk screen; The device is managed according to the number, and the number is written into a second register of the device.
2. The method according to claim 1, It is characterized in that Writing the number into a second register of the device comprises: Obtain the component identification and the device identification in the serial number; According to a first preset number of digits, the component identification is converted into first data, and according to a second preset number of digits, the device identification is converted into second data; Concatenate the first data and the second data to obtain third data corresponding to the number; The third data is written into a preset field of the second register, wherein the second register is used to be accessed by the server and the device expansion component.
3. The method according to claim 1, It is characterized in that After the component identifier and the device identifier in the first register are concatenated to obtain the device serial number, the method further includes: Writing the serial numbers of the second number of devices into a serial number summary file; The number summary file is transmitted to the server, and the server is instructed to manage the device according to the number in the number summary file.
4. The method according to claim 1, It is characterized in that The managing the device according to the number includes: When receiving a device management command from the server, obtaining the number of the operation to be performed and the device to be controlled from the device management command; Determine the device to be controlled according to the serial number of the device to be controlled; Control the device to be controlled to execute the operation to be executed.
5. The method according to claim 1, It is characterized in that The managing the device according to the number includes: Reading status data of the device via a communication bus; Determine whether the status data exceeds a preset threshold value, and if so, regard the device corresponding to the status data exceeding the preset threshold value as a faulty device, and determine the fault type of the faulty device according to the status data exceeding the preset threshold value; Determine the serial number of the faulty device; Generate an alarm message including the fault type and the serial number of the faulty device, and write the alarm message into an operation log; The alarm display unit corresponding to the faulty device is located according to the number of the faulty device in the operation log, and the alarm display unit is controlled to issue a fault alarm.
6. A device management method, It is characterized in that The method is applied to a server, and the method comprises: Acquire a first quantity and a first arrangement order of device expansion components, and generate a component identifier of the device expansion component according to the first quantity and the first arrangement order, wherein the device expansion component includes a plurality of devices; Generating the component identification of the device extension component according to the first quantity and the first arrangement order includes: determining a rule for generating the component identification according to the first quantity and the first arrangement order, wherein the rule for generating the component identification includes: the component identification increases from left to right or from top to bottom; generating the component identification of the device extension component according to the rule for generating the component identification; Sending the component identification to the device extension component, instructing the device extension component to write the component identification into a first register, wherein the device extension component is used to concatenate the device identification with the component identification in the first register to obtain a number of the device, the device identification is generated by the device extension component according to the second number of devices and the second arrangement order of the devices, and the number is used to identify the device in a server log, a baseboard management controller log, and a chassis silk screen; The number of the device is obtained from the second register of the device, and the device is managed according to the number.
7. The method according to claim 6, It is characterized in that The acquiring the serial number of the device from the second register of the device comprises: Querying a preset field in the second register to obtain first data and second data; The first data is converted into the component identification, the second data is converted into the equipment identification, and the component identification and the equipment identification are combined to obtain the serial number of the equipment.
8. The method according to claim 6, It is characterized in that The managing the device according to the number includes: Obtaining a number summary file from the device extension component, wherein the number summary file includes numbers of the second number of devices; Obtaining, from the number summary file, component identifiers and device identifiers contained in the serial numbers of the second number of devices; Obtaining device identification information and device status information of the second number of devices; A device management file is generated, and the device is managed according to the device management file, wherein the device management file includes the device identification information, the device status information, and the component identifiers and device identifiers in the serial numbers of the second number of devices.
9. The method according to claim 6, It is characterized in that The managing the device according to the number includes: Obtaining a device detection log, and determining whether there is device error information in the device detection log; In the case where the device error information exists, filtering out the faulty device code from the device error information; Determine a number corresponding to the faulty device code, wherein the number corresponding to the faulty device code is used to determine a physical location of the faulty device; A log copy of the device detection log is generated, and the faulty device code in the log copy is replaced with a number corresponding to the faulty device code.
10. The method according to claim 6, It is characterized in that The managing the device according to the number includes: Determine a device to be controlled and an operation to be performed on the device to be controlled; Determine the serial number of the device to be controlled; Generate a device management command including the operation to be performed and the serial number of the device to be controlled, and send the device management command to the device extension component to instruct the device extension component to control the device to be controlled to perform the operation to be performed.
11. The method according to claim 6, It is characterized in that The acquiring a first quantity and a first arrangement order of device extension components, and generating a component identifier of the device extension component according to the first quantity and the first arrangement order, includes: issuing a communication bus scan command to query a first quantity of connected device expansion components; Acquire the interface serial number of the communication bus, and determine the first arrangement order of the device expansion components according to the interface serial number; A starting sequence number is determined according to the first arrangement sequence, and a component identifier of the device extension component is generated according to the starting sequence number, the first quantity, and a preset step size.
12. A device management apparatus, It is characterized in that The device is deployed in a device extension component, and the device includes: A first acquisition module, used for acquiring a component identification from a server, and writing the component identification into a first register; A generating module, used for acquiring a second number and a second arrangement order of devices in the device extension component, and generating a device identification of the device according to the second number and the second arrangement order; generating the device identification of the device according to the second number and the second arrangement order comprises: determining a rule for generating the device identification according to the second number and the second arrangement order, wherein the rule for generating the device identification comprises: the device identification increases in sequence from left to right or from top to bottom; generating the device identification of the device according to the rule for generating the device identification; A concatenation module, used for concatenating the component identification in the first register and the device identification to obtain a serial number of the device, wherein the serial number is used to identify the device in a server log, a baseboard management controller log, and a chassis silk screen; The first management module is used to manage the device according to the number and write the number into a second register of the device.
13. A device management apparatus, It is characterized in that The device is deployed on a server, and includes: A second acquisition module is used to acquire a first quantity and a first arrangement order of device expansion components, and generate a component identification of the device expansion component according to the first quantity and the first arrangement order, wherein the device expansion component includes a plurality of devices; the generating the component identification of the device expansion component according to the first quantity and the first arrangement order comprises: determining a rule for generating the component identification according to the first quantity and the first arrangement order, wherein the rule for generating the component identification comprises: the component identification increases in sequence from left to right or from top to bottom; generating the component identification of the device expansion component according to the rule for generating the component identification; a sending module, configured to send the component identification to the device extension component, instructing the device extension component to write the component identification into a first register, wherein the device extension component is configured to concatenate the device identification with the component identification in the first register to obtain a number of the device, the device identification is generated by the device extension component according to a second number of devices and a second arrangement order of the devices, and the number is used to identify the device in a server log, a baseboard management controller log, and a chassis silk screen; The second management module is used to obtain the number of the device from the second register of the device and manage the device according to the number.
14. A computer device, It is 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 device management method according to any one of claims 1 to 11 by executing the computer instructions.
15. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the device management method according to any one of claims 1 to 11.
