Device status determination method, device, medium and product

By comparing the in-bit hardware signals with the device information obtained by the BIOS, the problem of PCIE devices in the server being disabled is solved, and the accurate identification and monitoring of the target device status is achieved, and the system management and performance is improved.

CN119046107BActive Publication Date: 2025-04-29INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411534275.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-04-29
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

In the server, when the same type of PCIE device is used in different application scenarios, a device is disabled to reduce power consumption or interference, but it cannot be identified and reported on the BMC's asset information management webpage, resulting in difficulty in determining the device status.

Method used

The status of the target device is determined by comparing the in-bit hardware signal with the device information obtained by the BIOS. The specific method includes: determining the first device information set based on the in-place hardware signals and slot identifications of multiple target devices on the server and the correspondence between the preset hardware signals and preset hardware signals; receiving the second device information set obtained by the BIOS on the host side; comparing the two to determine the status of the target device.

Benefits of technology

It realizes accurate identification of the status of the target device on the server, improves the accuracy and efficiency of device status monitoring, and enhances the manageability, reliability and performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046107B_ABST
    Figure CN119046107B_ABST
Patent Text Reader

Abstract

The present application provides a device status determination method, device, medium and product, which relate to the field of computer technology and are applied to a baseboard management controller. The method comprises: for multiple target devices on a server, according to the correspondence between multiple in-place hardware signals of the multiple target devices on the server and slot identifiers of multiple slots on the server and multiple preset hardware signals, determining a first device information set of the multiple target devices; receiving a second device information set of the multiple target devices obtained by a basic input and output system of a host; determining the status of the multiple target devices according to the first device information set and the second device information set, thereby improving the accuracy and efficiency of monitoring the status of the target devices, facilitating the subsequent management of each target device of the server, improving the manageability, reliability and performance of the system, and making the device management more refined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, medium and product for determining a device status. Background Art

[0002] BIOS (Basic Input Output System) is the most basic and direct hardware setting and control manager of the server motherboard, which can provide more simple and easy-to-use functions for the server. BIOS is a set of programs fixed on a Flash ROM chip on the motherboard. It stores the most important basic input and output programs of the computer, system setting information, self-test programs after power-on, and system self-starting programs. Its main function is to provide the most basic and direct hardware setting and control for the computer.

[0003] BMC (Board management controller) is a controller that provides out-of-band management interfaces and services to manage the entire server. During the boot process, the host records various device information and reports this information to the BMC. This information is called asset information. BMC displays the host's asset information on its management webpage, including CPU information, memory information, PCIE device information, etc.

[0004] In actual use, there will be two or more PCIE devices with the same functions on the same server, which are used in different application scenarios. When one of the devices is in use, other devices of the same type need to be disabled in order to reduce power consumption or interference. If the PCIE root port of a device is closed and disabled, then even if the device is plugged into the machine, it will not be recognized and the device information will not be reported to the BMC. In this way, the device is connected to the machine, but there is no such device on the BMC asset information management webpage. In addition, in the scenario where the device is abnormal, although the device is connected to the host, due to the device abnormality, the host does not recognize the device when it is turned on, and the asset information of the device here will not be reported to the BMC. Summary of the invention

[0005] In view of this, embodiments of the present application provide a method, device, medium, and product for determining a device status, so as to overcome the above-mentioned problems or at least partially solve the above-mentioned problems.

[0006] A first aspect of an embodiment of the present application provides a method for determining a device status, which is applied to a baseboard management controller. The method includes:

[0007] For multiple target devices on the server, determining a first device information set of the multiple target devices according to a correspondence between a plurality of in-place hardware signals of the multiple target devices on the server and slot identifiers of a plurality of slots on the server and a plurality of preset hardware signals;

[0008] Receiving a second device information set of the plurality of target devices acquired by a basic input / output system of the host side;

[0009] The states of the plurality of target devices are determined according to the first device information set and the second device information set.

[0010] Optionally, the first device information set includes a plurality of first device information corresponding to the plurality of target devices, and the first device information includes at least a first slot identifier; the second device information set includes a plurality of second device information corresponding to the plurality of target devices, and the second device information includes at least a second slot identifier and a disabled identifier; and determining the status of the plurality of target devices according to the first device information set and the second device information set includes:

[0011] Comparing the plurality of first device information with the plurality of second device information to determine a status of each target device in the plurality of target devices;

[0012] The first slot identifier is a slot identifier of a slot where a target device on the server is located, and the second slot identifier is a slot identifier of the target device on the server acquired by the basic input and output system.

[0013] Optionally, comparing the plurality of first device information with the plurality of second device information to determine the state of each target device in the plurality of target devices includes:

[0014] Compare the first slot identifier of each first device information in the plurality of first device information with the plurality of second slot identifiers of the plurality of second device information respectively, and determine whether there is a matching second slot identifier for the first slot identifier in the first device information;

[0015] When a second slot identifier matching the first slot identifier in the first device information exists, the state of the target device is determined based on whether a corresponding disabling identifier exists for the second slot identifier matching the first slot identifier.

[0016] Optionally, determining the state of the target device based on whether a corresponding disabling identifier exists for a second slot identifier that matches the first slot identifier includes:

[0017] When the second slot identifier that matches the first slot identifier does not have a corresponding disabling identifier, determining that the state of the target device in the slot corresponding to the first slot identifier is a normal state;

[0018] When the second slot identifier that matches the first slot identifier has a corresponding disable identifier, it is determined that the state of the target device in the slot corresponding to the first slot identifier is a disable state.

[0019] Optionally, comparing the plurality of first device information with the plurality of second device information to determine the state of each target device in the plurality of target devices includes:

[0020] Compare the first slot identifier of each first device information in the plurality of first device information with the plurality of second slot identifiers of the plurality of second device information respectively, and determine whether there is a matching second slot identifier for the first slot identifier in the first device information;

[0021] When the first slot identifier in the first device information does not have a matching second slot identifier, it is determined that the state of the target device in the slot corresponding to the first slot identifier is an abnormal state.

[0022] Optionally, before determining the state of each target device among the multiple target devices, the method further includes:

[0023] According to the first device information set and the second device information set, integrating the device information of each target device in the plurality of target devices on the webpage of the baseboard management controller to obtain a device information list of the plurality of target devices;

[0024] After determining the status of each target device in the plurality of target devices, the method further includes:

[0025] According to the status of each target device in the plurality of target devices, the status of the device information of each target device in the device information list is marked in the webpage.

[0026] Optionally, before determining the state of each target device among the multiple target devices, the method further includes:

[0027] According to the first device information set and the second device information set, integrating the device information of each target device in the plurality of target devices on the webpage of the baseboard management controller to obtain a device information list of the plurality of target devices;

[0028] The determining the state of each target device among the plurality of target devices comprises:

[0029] When there is device information of the target device in the device information list without matching first device information or matching second device information, it is determined that the state of the target device corresponding to the device information without matching first device information and matching second device information in the device information list is unplugged.

[0030] Optionally, the method further comprises:

[0031] According to the first device information and the second device information, modifying the device information of the target device in the device information list whose device information has changed on the webpage of the baseboard management controller;

[0032] According to the first device information and the second device information, adding the device information of the newly added target device in the first device information set to the device information list;

[0033] When the device information included in the device information list does not have matching first device information and matching second device information, the device information in the device information list that does not have matching first device information and matching second device information is deleted.

[0034] Optionally, the method further comprises:

[0035] When a target device is disabled, obtaining a re-acquired second device information set reported by the host end;

[0036] The reacquired second device information set is a second device information set acquired by the host after the target device is disabled.

[0037] A second aspect of an embodiment of the present application provides a method for determining a device state, which is applied to a host side, and the method includes:

[0038] Acquire, through a basic input and output system, a second device information set, wherein the second device information set includes a plurality of second device information of a plurality of target devices;

[0039] storing the second device information set in a cache on the host side;

[0040] Reporting the second device information set stored in the host end to the baseboard management controller, so that the baseboard management controller determines the status of the plurality of target devices according to the first device information set and the second device information set;

[0041] The first device information set is determined by the baseboard management controller according to a correspondence between a plurality of in-place hardware signals of the plurality of target devices on the server and slot identifiers of a plurality of slots on the server and a plurality of preset hardware signals.

[0042] Optionally, the method further comprises:

[0043] When it is detected that the target device needs to be disabled, the root port of the target device that needs to be disabled is closed through a control instruction;

[0044] A disabling flag is set for the disabled target device, and the disabling flag is added to the second device information of the disabled target device.

[0045] Optionally, the plurality of second device information included in the second device information set in the cache further includes a silk-screen string and a second slot identifier of the target device; and setting a disable identifier for the disabled target device and adding the disable identifier to the second device information of the disabled target device includes:

[0046] Recording the second slot identifier of the disabled target device;

[0047] Determining from the cache a silkscreen character string corresponding to a second slot identifier of the disabled target device;

[0048] After disabling the target device, reacquiring the second device information set through the basic input and output system, and replacing the second device information set already stored in the cache of the host side according to the reacquired second device information set;

[0049] Adding the second slot identifier, the disable identifier and the silk-screen character string of the target device to be disabled to the second device information set stored in the host end;

[0050] The reacquired second device information set is used to be sent to the baseboard management controller, so that the baseboard management controller determines the status of the multiple target devices based on the reacquired second device information set.

[0051] In a third aspect of an embodiment of the present application, a device for determining a device status is provided, which is applied to a baseboard management controller, and the device includes:

[0052] A first device information set determination module is used to determine, for multiple target devices on the server, a first device information set of the multiple target devices according to a correspondence between a plurality of in-place hardware signals of the multiple target devices on the server and slot identifiers of a plurality of slots on the server and a plurality of preset hardware signals;

[0053] A second device information set receiving module, configured to receive a second device information set of the plurality of target devices acquired by a basic input and output system of the host end;

[0054] The target device status determination module is used to determine the status of the multiple target devices according to the first device information set and the second device information set.

[0055] In a fourth aspect of the embodiments of the present application, a device for determining a device status is provided, which is applied to a host side, and the device includes:

[0056] A second device information set acquisition module, used to acquire a second device information set through a basic input and output system, wherein the second device information set includes a plurality of second device information of a plurality of target devices;

[0057] A saving module, used for saving the second device information set in a cache of the host side;

[0058] A reporting module, used for reporting the second device information set stored in the host end to the baseboard management controller, so that the baseboard management controller determines the status of the plurality of target devices according to the first device information set and the second device information set;

[0059] The first device information set is determined by the baseboard management controller according to a correspondence between a plurality of in-place hardware signals of the plurality of target devices on the server and slot identifiers of a plurality of slots on the server and a plurality of preset hardware signals.

[0060] According to a fifth aspect of the embodiments of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method described in the first aspect or the second aspect.

[0061] In a sixth aspect of the embodiments of the present application, a computer program product is provided, including a computer program, which, when executed by a processor, implements the method described in the first aspect or the second aspect.

[0062] In a seventh aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, the method described in the first aspect or the second aspect is implemented.

[0063] Beneficial effects of this application:

[0064] An embodiment of the present application provides a method, an electronic device, a computer-readable storage medium and a product, which are applied to a baseboard management controller. The method includes: for multiple target devices on a server, according to the correspondence between multiple in-place hardware signals of the multiple target devices on the server and slot identifiers of multiple slots on the server and multiple preset hardware signals, determining a first device information set of the multiple target devices; receiving a second device information set of the multiple target devices obtained by a basic input and output system of a host; and determining the status of the multiple target devices according to the first device information set and the second device information set.

[0065] Through the technical solution of the present application, the device information set of the software layer and the device information set of the hardware layer of multiple target devices on the server are obtained through the basic input and output system and the baseboard management controller respectively, and by comparing the first device information set of the hardware layer and the second device information set of the software layer, the baseboard management controller can accurately determine the accurate status of each target device on the server. This double verification mechanism improves the accuracy of target device status identification. By integrating the second device information set of multiple target devices obtained from the in-place hardware signal and the basic input and output system enumeration, the deviation that may be caused by a single source of device information is eliminated, the accuracy and efficiency of target device status monitoring are improved, and the subsequent management of each target device of the server is facilitated, the manageability, reliability and performance of the system are improved, and the device management is more refined. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application.

[0067] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0068] Figure 1 It is a flow chart of a method for determining a device status applied to a baseboard management controller provided by an embodiment of the present application;

[0069] Figure 2 It is a schematic diagram of a framework of a server provided in an embodiment of the present application;

[0070] Figure 3 It is a flowchart of a method for determining a device status applied to a host end provided by an embodiment of the present application;

[0071] Figure 4 is a flow chart of another device status determination method provided by an embodiment of the present application;

[0072] Figure 5 It is a schematic diagram of a framework of a device state determination apparatus applied to a baseboard management controller provided by an embodiment of the present application;

[0073] Figure 6 It is a schematic diagram of a framework of a device state determination apparatus applied to a host end provided by an embodiment of the present application;

[0074] Figure 7 It is a schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0075] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application may be combined with each other.

[0076] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0077] In order to solve the problems in the related art, the present application proposes a method for comparing an in-place hardware signal with device information reported by a host BIOS to determine the normal, disabled or out-of-place status of a device.

[0078] Figure 1 is a flow chart of a method for determining a device status applied to a baseboard management controller provided by an embodiment of the present application. Figure 2 It is a schematic diagram of a server framework provided in an embodiment of the present application.

[0079] like Figure 1 As shown, a first aspect of an embodiment of the present application provides a method for determining a device status, which is applied to a baseboard management controller, and the method includes:

[0080] Step S101, for multiple target devices on a server, determining a first device information set of the multiple target devices according to a correspondence between a plurality of in-place hardware signals of the multiple target devices on the server and slot identifiers of a plurality of slots on the server and a plurality of preset hardware signals;

[0081] Step S102, receiving a second device information set of the plurality of target devices acquired by a basic input / output system of the host side;

[0082] Step S103: determining the states of the plurality of target devices according to the first device information set and the second device information set.

[0083] First, if Figure 2 As shown, the server includes a host side and a baseboard management controller side. The host side is configured with a basic input and output system. The host side and the baseboard management controller are connected through a bus, such as a DMI bus or an ESPI bus. The host side is connected to a slot (PCIe slot) on the server through a PCIe bus. The baseboard management controller and the slot are connected through a physical line to obtain a hardware signal in place on the slot.

[0084] Specifically, in step S101, the target device is a PCIe device connected to the server. When the process of determining the status of each target device on the server begins, the baseboard management controller will first determine the type and quantity of the target device. Usually, multiple target devices may include multiple plug-in cards, storage devices, network adapters, etc. Different target devices occupy different slots on the server, that is, the physical position of the target device in the server.

[0085] The slot where the target device on the server is located is connected to the GPIO (general input and output) of the baseboard management controller on the server motherboard through a physical line. In this way, when the server is turned on, the baseboard management controller can poll the hardware signals of all target devices in the server. The baseboard management controller obtains multiple hardware signals corresponding to multiple target devices on the server, and matches the corresponding relationship between the multiple hardware signals obtained and the slot identifiers of multiple slots on the server and multiple preset hardware signals, wherein the corresponding relationship between the slot identifiers of multiple slots and the multiple preset hardware signals is pre-set according to the model of the server to which they belong. The preset hardware signal library of a slot contains multiple hardware signals in different forms, and different preset hardware signals are used to indicate whether there is a target device on the slot, such as a hardware signal in place and a hardware signal not in place. When the hardware signal on a slot is detected as a hardware signal in place, it indicates that there is a target device on the slot. On the contrary, when the hardware signal on a slot is detected as a hardware signal not in place, it indicates that there is no target device on the slot.

[0086] After matching, the first device information set can be obtained, which can be used to determine the target device connected to the server. The first device information set can include device information corresponding to multiple target devices, such as slot identification, silk screen string, bus number, bus speed and other asset information.

[0087] Further, in step S102, the baseboard management controller needs to cooperate with the basic input and output system (BIOS) of the server host. BIOS is an important component for self-test and device initialization when the server starts. In this process, the BMC will receive the second device information set of multiple target devices obtained by BIOS. The second device information set is the device information set of multiple target devices that can be detected on the server obtained by BIOS by executing BIOS code.

[0088] Finally, in step S103, through the above steps S101 and S102, the first device information set at the hardware level and the second information set at the software level are obtained respectively, and then the first device information set is compared with the second device information set, and the baseboard management controller can comprehensively determine the status of each target device. The comparison process will analyze the status differences presented by the target device in the first device information set and the second device information set, and effectively identify which target devices are in what state, such as normal, disabled or abnormal, so as to form a comprehensive device status view.

[0089] Through the above embodiments, the device information set of the software layer and the device information set of the hardware layer of multiple target devices on the server are obtained through the basic input and output system and the baseboard management controller respectively, and by comparing the first device information set of the hardware layer and the second device information set of the software layer, the baseboard management controller can accurately determine the accurate status of each target device on the server. This double verification mechanism improves the accuracy of target device status identification. By integrating the second device information set of multiple target devices obtained from the in-place hardware signal and the basic input and output system enumeration, the deviation that may be caused by a single source of device information is eliminated, the accuracy and efficiency of target device status monitoring are improved, and the subsequent management of each target device of the server is facilitated, the manageability, reliability and performance of the system are improved, and the device management is more refined.

[0090] Optionally, the first device information set includes a plurality of first device information corresponding to the plurality of target devices, and the first device information includes at least a first slot identifier; the second device information set includes a plurality of second device information corresponding to the plurality of target devices, and the second device information includes at least a second slot identifier and a disabled identifier; and determining the status of the plurality of target devices according to the first device information set and the second device information set includes:

[0091] Comparing the plurality of first device information with the plurality of second device information to determine a status of each target device in the plurality of target devices;

[0092] The first slot identifier is a slot identifier of a slot where a target device on the server is located, and the second slot identifier is a slot identifier of the target device on the server acquired by the basic input and output system.

[0093] Specifically, in one embodiment, the composition of the first device information set and the second device information set, the device information comparison process and the final state judgment are further described. The implementation details of the device state determination method are refined, and the specific process is as follows.

[0094] First, the first device information set includes multiple first device information corresponding to multiple target devices, that is, each target device has a first device information, and each first device information contains at least the first slot identifier of the slot where the target device is located. The first slot identifier refers to the slot identifier of the slot (physical placement position) of the target device in the server determined by the baseboard management controller through the in-place hardware signal and the above-mentioned correspondence, that is, the slot ID of the slot where the target device is located. Since the first slot identifier is determined based on the in-place hardware signal of the target device on the server and the correspondence between the slot identifiers of multiple slots on the server and the preset hardware signal, the first slot identifier can indicate that the target device exists in the corresponding slot, but it cannot directly determine the specific status of the target device (normal or disabled or abnormal, etc.), and it needs to be determined in combination with the second device information.

[0095] The composition of the second device information set is similar to that of the first device information set. The second device information set also includes multiple second device information corresponding to multiple target devices. However, one second device information in this set includes at least a second slot identifier and a disable identifier. The second device information comes from the basic input and output system (BIOS) on the host side. The second slot identifier indicates the slot identifier of the slot where the target device is located detected by the BIOS at the software level, and the disable identifier is used to indicate whether the target device is in a disabled state. This information can help the monitoring system determine whether a device is affected by a fault or other reasons, thereby suspending service. When a disable identifier exists in the second device information of a target device, it means that the target device is disabled. Anyway, when a disable identifier does not exist in the second device information of a target device, it means that the target device is normal.

[0096] After obtaining two sets of information, the next key step is to compare the device information. The baseboard management controller needs to compare the multiple first device information in the first device information set with the multiple second device information in the second device information set one by one. In this way, not only can the slot of each target device be identified, but also the status of the target device can be checked. This comparison helps to accurately determine the status of the target device. Based on the information obtained during the comparison process, the baseboard management controller will comprehensively determine the real-time status of each target device.

[0097] Through the above embodiment, the comparison of the first device information set and the second device information set can effectively reduce the misjudgment caused by the inconsistency of device information acquisition, improve the accuracy of the system in determining the status of each target device, and adopt this method to improve the efficiency of determining the status of the target device. At the same time, adding the comparison of the slot identification and the disabled identification can further improve the accuracy of judging the slot and the status of the target device, and ensure the efficient management and stable operation of each target device on the subsequent server.

[0098] Optionally, comparing the plurality of first device information with the plurality of second device information to determine the state of each target device in the plurality of target devices includes:

[0099] Compare the first slot identifier of each first device information in the plurality of first device information with the plurality of second slot identifiers of the plurality of second device information respectively, and determine whether there is a matching second slot identifier for the first slot identifier in the first device information;

[0100] When a second slot identifier matching the first slot identifier in the first device information exists, the state of the target device is determined based on whether a corresponding disabling identifier exists for the second slot identifier matching the first slot identifier.

[0101] Specifically, in one embodiment, the comparison between the first device information and the second device information and the process of determining the specific status of each target device will be described in detail.

[0102] First, a first device information set of a plurality of target devices is obtained from a baseboard management controller, wherein a plurality of first slot identifiers can indicate a physical location of each target device in the server.

[0103] Furthermore, the baseboard management controller will compare each first slot identifier with multiple second slot identifiers in the second device information set one by one. The core purpose of this comparison is to determine whether the slot of each target device is consistent in the two device information sets. When a first slot identifier finds a matching second slot identifier among multiple second slot identifiers, it means that the target device can be identified at both the hardware level and the software level, therefore, it means that the target device itself is normal.

[0104] The matching of the first slot identifier and the second slot identifier means that the first slot identifier and the second slot identifier are the same.

[0105] Finally, after determining the status of the target device itself, it is not possible to directly determine whether the target device is in normal status or disabled status. Therefore, it is necessary to determine the specific status of the target device based on whether a disabled identifier corresponding to the second slot identifier exists in the second device information of the target device.

[0106] Through the above embodiments, enumerating and comparing the slot identifications of each device determined by different methods, and determining the status of the target device in combination with the disabled identification, the accuracy of the determination of the target device status can be guaranteed, especially when the device configuration is complex or there are multiple devices that are interdependent. This accurate comparison is particularly important. The entire process can be automatically managed by the baseboard management controller to reduce manual intervention, thereby improving management efficiency and reducing the possibility of manual errors. Since multiple identifications are involved in the comparison process, the device status can be judged based on evidence, reducing the risk of misjudgment caused by a single signal error.

[0107] Optionally, determining the state of the target device based on whether a corresponding disabling identifier exists for a second slot identifier that matches the first slot identifier includes:

[0108] When the second slot identifier that matches the first slot identifier does not have a corresponding disabling identifier, determining that the state of the target device in the slot corresponding to the first slot identifier is a normal state;

[0109] When the second slot identifier that matches the first slot identifier has a corresponding disable identifier, it is determined that the state of the target device in the slot corresponding to the first slot identifier is a disable state.

[0110] Specifically, in one embodiment, after determining the matching relationship between the first slot identifier and the second slot identifier of a target device, it can be determined that the target device itself is normal, and whether the target device is disabled or enabled needs to be further determined based on whether there is a disable identifier in the second slot identifier of the target device to determine the status of the target device.

[0111] It should be noted that, in the full text, the first slot identifier is determined based on the in-place hardware signal of whether the target device is connected to the slot. The in-place hardware signal is an attribute of the server slot. Therefore, regardless of whether the target device is normal or not, as long as the target device is connected to the slot, the in-place hardware signal can be used to determine whether the target device exists.

[0112] Therefore, when the second slot identifier that matches the first slot identifier in the second device information of the target device does not have a corresponding disable identifier, the state of the target device is determined to be a normal state, and the normal state means that the target device is normal and enabled, so it can be used normally. Conversely, when the second slot identifier that matches the first slot identifier in the second device information of the target device has a corresponding disable identifier, the state of the target device is determined to be a disabled state, and the disabled state means that the target device is normal but is set to a disabled state by the administrator, resulting in it being unusable, wherein the disable identifier is added to the second device information of the device after the target device is set to disabled.

[0113] Through the above embodiment, based on the status judgment of the disable flag, the baseboard management controller can distinguish whether its normal target device on the server is in a disabled state or a normal state, thereby improving the accuracy and efficiency of determining the state of the target device, thereby facilitating subsequent management of the target device.

[0114] Optionally, comparing the plurality of first device information with the plurality of second device information to determine the state of each target device in the plurality of target devices includes:

[0115] Compare the first slot identifier of each first device information in the plurality of first device information with the plurality of second slot identifiers of the plurality of second device information respectively, and determine whether there is a matching second slot identifier for the first slot identifier in the first device information;

[0116] When the first slot identifier in the first device information does not have a matching second slot identifier, it is determined that the state of the target device in the slot corresponding to the first slot identifier is an abnormal state.

[0117] Specifically, in one embodiment, it is also possible to determine whether the target state is an abnormal state. In the process of comparing the first slot identifier of each first device information in multiple first device information with the multiple second slot identifiers of multiple second device information one by one, it is necessary to determine whether there is a matching second slot identifier for the first slot identifier in the first device information.

[0118] When the first device information of a target device does not match the second slot identifier among multiple second slot identifiers during the matching process, it means that the target device is only physically connected to the server but cannot be identified. Therefore, the target device itself is in an abnormal state and cannot be used normally. For example, the target device is lost.

[0119] Through the above embodiment, when the first slot identifier of the target device does not have a matching second slot identifier, it can be directly determined that the target device is abnormal, thereby improving the efficiency and accuracy of the system in determining the status of the abnormal target device.

[0120] Optionally, before determining the state of each target device among the multiple target devices, the method further includes:

[0121] According to the first device information set and the second device information set, integrating the device information of each target device in the plurality of target devices on the webpage of the baseboard management controller to obtain a device information list of the plurality of target devices;

[0122] After determining the status of each target device in the plurality of target devices, the method further includes:

[0123] According to the status of each target device in the plurality of target devices, the status of the device information of each target device in the device information list is marked in the webpage.

[0124] Specifically, in one embodiment, before determining the status of each target device among multiple target devices, the baseboard control manager needs to integrate the acquired first device information set and the second device information set to obtain a device information list of the multiple target devices. The device information list is stored on the web page of the baseboard management controller. The device information list includes the device information of each target device obtained by integrating the first device information and the second device information of each target device. For example, when the same information exists in the first device information and the second device information, it is only recorded once in the device information list. When different information exists in the first device information and the second device information, both are recorded in the device information list.

[0125] Further, after determining the status of each target device among the multiple target devices, the status of the device information of each target device is marked in the device information list according to the determined status of each target device among the multiple target devices. In addition, the information of each target device in the device information list can be changed, and needs to be updated according to the first device information and the second device information periodically obtained by the BMC and the BIOS to ensure that the status of each target device in the device information list is real-time and accurate.

[0126] Through the above embodiment, the device information of each target device on the server is integrated and the status of the corresponding target device is recorded through the device information list, which facilitates the subsequent efficient management of each target device. The administrator or user can directly obtain the asset information of each target device through the visual device information list, and the device information list can be updated in real time, so it can be guaranteed that the device information of each target device obtained is real-time and accurate.

[0127] Optionally, before determining the state of each target device among the multiple target devices, the method further includes:

[0128] According to the first device information set and the second device information set, integrating the device information of each target device in the plurality of target devices on the webpage of the baseboard management controller to obtain a device information list of the plurality of target devices;

[0129] The determining the state of each target device among the plurality of target devices comprises:

[0130] When there is device information of the target device in the device information list without matching first device information or matching second device information, it is determined that the state of the target device corresponding to the device information without matching first device information and matching second device information in the device information list is unplugged.

[0131] Specifically, in one embodiment, before determining the status of each target device among multiple target devices, the baseboard control manager needs to integrate the acquired first device information set and the second device information set to obtain a device information list of the multiple target devices. The device information list is stored on the web page of the baseboard management controller. The device information list includes the device information of each target device obtained by integrating the first device information and the second device information of each target device. For example, when the same information exists in the first device information and the second device information, it is only recorded once in the device information list. When different information exists in the first device information and the second device information, both are recorded in the device information list.

[0132] Furthermore, in the process of determining the status of each target device among multiple target devices, the obtained first device information and second device information need to be compared with the device information of the target device in the device information list to determine whether the device information in the device information list appears, but the device information does not match any of the first device information or any of the second device information acquired by the baseboard management controller. If this happens, it means that the target device corresponding to the device information in the device information list has been unplugged, so that the target device cannot be detected at both the hardware level and the software level. Therefore, the status of the target device is determined to be unplugged.

[0133] It should be noted that, since the device information list can be updated, when determining whether the target device is unplugged, the device information list obtained last time is compared.

[0134] Through the above embodiment, the recorded device information list is used to judge the status of the target device that was detected historically but not currently detected, and then determine that the target device is unplugged, thereby improving the accuracy and efficiency of determining the target device status and facilitating the management of each target device.

[0135] Optionally, the method further comprises:

[0136] According to the first device information and the second device information, modifying the device information of the target device in the device information list whose device information has changed on the webpage of the baseboard management controller;

[0137] According to the first device information and the second device information, adding the device information of the newly added target device in the first device information set to the device information list;

[0138] When the device information included in the device information list does not have matching first device information and matching second device information, the device information in the device information list that does not have matching first device information and matching second device information is deleted.

[0139] Specifically, in one embodiment, when the device information list is updated, it specifically includes the modification, addition and deletion of the device information of the target device.

[0140] For any target device, when it is found that the device information for the target device in the device information list on the web page of the baseboard management controller is different from the first device information or the second device information of the target device, for example, the slot ID is changed, a disable mark is added, etc., then the device information for the target device in the device information list is changed according to the first device information or the second device information of the target device.

[0141] For any target device, when it is found that the device information of the target device does not exist in the device information list on the web page of the baseboard management controller, for example, a new target device is added, the device information and status of the target device are recorded in the device information list based on the first device information and the second device information of the target device.

[0142] For any target device, when it is found that the device information of the target device in the device information list on the web page of the baseboard management controller has not obtained the corresponding first device information and second device information, it means that the target device is no longer on the server and may be removed. Therefore, it is necessary to delete the device information of the target device in the device information list to avoid increasing the management burden of the device information of the target device.

[0143] Through the above embodiment, by updating the device information in the device information list, it is possible to facilitate real-time recording and updating of the device information of each target device on the server, so that the device information presented to the user or administrator in the device information list is the latest and accurate, which facilitates efficient management of the target devices.

[0144] Optionally, the method further comprises:

[0145] When a target device is disabled, obtaining a re-acquired second device information set reported by the host end;

[0146] The reacquired second device information set is a second device information set acquired by the host after the target device is disabled.

[0147] Specifically, in one embodiment, the baseboard management controller can receive the second device information set obtained by the host side at different times. For example, during the server startup phase, the baseboard management controller will receive the second device information set of multiple target devices identified by the BIOS reported by the host side. When the host side disables a certain target device, it will also add disabling-related information, such as a disabling flag, to the second device information of the target device for the target device, and then re-acquire the second device information set for reporting. In this way, the baseboard management controller can determine the current status of multiple target devices based on the latest reported second device information set and the acquired first device information set. For example, when the host side disables a certain target device, it re-acquires the second device information of each target device to obtain the second device information set, and reports the latest second device information set to the baseboard management controller. In this way, the baseboard management controller can determine which target device is disabled based on the disabling-related information therein.

[0148] Through the above embodiment, the baseboard management controller can receive the second device information set re-reported by the host end after a target device is disabled, determine the latest status of each target device, and improve the accuracy and real-time performance of determining the target device status.

[0149] An embodiment of the present application provides a method for determining a device status, which is applied to a host side. Figure 3 FIG. 1 is a flow chart of a method for determining a device status applied to a host side provided by an embodiment of the present application. Figure 3 As shown, the method includes:

[0150] Step S201, obtaining a second device information set through a basic input and output system, wherein the second device information set includes a plurality of second device information of a plurality of target devices;

[0151] Step S202, storing the second device information set in a cache of the host side;

[0152] Step S203, reporting the second device information set stored in the host end to the baseboard management controller, so that the baseboard management controller determines the status of the plurality of target devices according to the first device information set and the second device information set;

[0153] The first device information set is determined by the baseboard management controller according to a correspondence between a plurality of in-place hardware signals of the plurality of target devices on the server and slot identifiers of a plurality of slots on the server and a plurality of preset hardware signals.

[0154] For the host side, the main execution is the process of periodically acquiring and reporting the second device information set, and the specific process is shown in steps S201 to S203.

[0155] First, in step S201, the host side obtains second device information of multiple device information detectable on the server through the basic input and output system (BIOS), and integrates the second device information to obtain a second device information set.

[0156] Further, in step S202, the acquired second device information set is saved in the cache of the host side for subsequent use. Through the cache, the host side can improve the access speed and avoid frequently reading information from the BIOS, thereby improving the overall performance.

[0157] Finally, in step S203, the second device information set saved on the host side is reported to the baseboard management controller, so that the baseboard management controller determines the status of multiple target devices according to the first device information set and the received second device information set in accordance with the various embodiments in the foregoing text. The first device information set is determined by the baseboard management controller based on the correspondence between multiple in-place hardware signals of the multiple target devices on the server and the slot identifiers of the multiple slots on the server and multiple preset hardware signals. After analysis and comparison, the baseboard management controller can determine the final status of each target device, such as normal status, abnormal status, disabled status, etc.

[0158] Through the above embodiment, the host side obtains the second device information set corresponding to multiple devices on the server through BIOS, and saves and reports it to the baseboard management controller, so that the baseboard management controller can determine the status of multiple target devices on the server based on the received second device information set and the first device information set obtained by itself, thereby improving the accuracy of determining the target device status.

[0159] Optionally, the method further comprises:

[0160] When it is detected that the target device needs to be disabled, the root port of the target device that needs to be disabled is closed through a control instruction;

[0161] A disabling flag is set for the disabled target device, and the disabling flag is added to the second device information of the disabled target device.

[0162] Specifically, in one embodiment, the host side can periodically detect whether a disabling notification for the target device is received. When a disabling notification is received, the root port (Root port) of the target device to be disabled is closed through the control instruction corresponding to the BIOS option, and the server is restarted, and a disabling flag is set for the disabled target device, and the disabling flag is added to the second device information of the disabled target device.

[0163] Through the above embodiment, the disabling notification is periodically detected and the target device that needs to be disabled is disabled. At the same time, a disabling flag is set for the disabled target device, and the disabling flag is used as a part of the second device information. In this way, a series of operations for disabling the target device can be automatically executed, which makes it easier for the baseboard management controller to determine which target devices are disabled through the disabling flag, thereby improving the accuracy of determining the target device status.

[0164] Optionally, the plurality of second device information included in the second device information set in the cache further includes a silk-screen string and a second slot identifier of the target device; and setting a disable identifier for the disabled target device and adding the disable identifier to the second device information of the disabled target device includes:

[0165] Recording the second slot identifier of the disabled target device;

[0166] Determining from the cache a silkscreen character string corresponding to a second slot identifier of the disabled target device;

[0167] After disabling the target device, reacquiring the second device information set through the basic input and output system, and replacing the second device information set already stored in the cache of the host side according to the reacquired second device information set;

[0168] Adding the second slot identifier, the disable identifier and the silk-screen character string of the target device to be disabled to the second device information set stored in the host end;

[0169] The reacquired second device information set is used to be sent to the baseboard management controller, so that the baseboard management controller determines the status of the multiple target devices based on the reacquired second device information set.

[0170] Specifically, in one embodiment, the plurality of second device information included in the second device information set in the cache of the host side also includes a silk-screen string and a second slot identifier of the target device, and setting a disable identifier for the disabled target device and adding the disable identifier to the second device information of the disabled target device specifically includes the following steps:

[0171] First, the second slot identifier of the disabled target device is recorded. The second slot identifier of this step can be obtained from the disable notification.

[0172] Further, a silk-screen character string corresponding to the second slot identifier of the disabled target device is read from the second device information in the cache according to the second slot identifier of the disabled target device.

[0173] Furthermore, after disabling the target device that needs to be disabled, the multiple target devices that can be detected on the server are re-identified through the basic input and output system, and multiple second device information are obtained to generate a second device information set. In this process, the second device information of the disabled target device cannot be detected. Therefore, it is necessary to replace the second device information set already saved in the cache of the host side according to the re-acquired second device information set, so that the second device information in the replaced second device information set is the latest information.

[0174] Finally, after the replacement, the second slot identifier, disable identifier and silk-screen string of the disabled target device are added to the second device information set saved by the host side, so that the updated second device information set includes the second device information of the disabled target device. In this way, the host side sends the re-acquired second device information set to the baseboard management controller, so that the baseboard management controller determines the status of multiple target devices, including the status of the disabled target device, based on the re-acquired second device information set.

[0175] Through the above embodiments, this process can dynamically update the second device information set after a target device is disabled, so that the content of the received second device information set reported to the baseboard management controller is accurate, ensuring that the baseboard management controller can accurately and timely determine the status of the disabled target device after a target device is disabled, making it convenient for administrators or users to accurately obtain the status of each target device.

[0176] The following describes the interaction process between the baseboard management controller and the basic input and output system of the host through an embodiment. Figure 4 is a flow chart of another device status determination method provided by an embodiment of the present application. Figure 4 shown.

[0177] First, during the server startup phase, the basic input / output system on the host side will enumerate the second device information corresponding to each target device, obtain the second device information set, and determine whether there is a target device that needs to be disabled. If there is no target device that needs to be disabled, the second device information set will be reported to the baseboard management controller through the shared memory channel. If there is a target device that needs to be disabled, the target device will be disabled, and the second device information of the disabled target device will be obtained and added to the second device information set obtained by re-enumeration. The re-acquired second device information set will be reported to the baseboard management controller through the shared memory channel. At the same time, the second device information set is saved in the cache on the host side or in a USB flash drive file.

[0178] The second device information of the disabled target device includes a disable flag.

[0179] At the same time, during the startup phase of the server, the baseboard management controller will also obtain the in-place hardware signals of multiple target devices connected to the slots of the server through physical lines, and determine the first device information set of the multiple target devices connected to the server based on the correspondence between the slot identifiers of the multiple slots on the server and the multiple preset hardware signals.

[0180] Finally, the baseboard management controller matches each first device information in the obtained first device information set with multiple second device information in the second device information set respectively, and determines that the first device information that successfully matches the second device information and the target device with a disable mark in the second device information is in a normal state, determines that the first device information that successfully matches the second device information and the target device with a disable mark in the second device information is in a disabled state, and determines that the target device corresponding to the first device information that does not match the second device information is in an abnormal state.

[0181] Optionally, the technical concepts of the device status determination methods in the above-mentioned embodiments can also be applied to application scenarios of CPU and memory.

[0182] The technical solution mentioned in the document is mainly aimed at the status monitoring and management of PCIe devices. This solution accurately displays the asset information of PCIe devices on the server, including whether the device is disabled, running normally or abnormal, through the collaboration of BMC (baseboard management controller) and BIOS (basic input and output system). This solution can be applied not only to PCIe devices, but also to asset information management of CPU and memory.

[0183] Specifically, the following steps can be applied to CPU and memory:

[0184] Similar to PCIe devices, the CPU and memory on the server also send out hardware presence signals to indicate whether they are correctly installed on the server. The BMC can monitor these presence signals by connecting to the GPIO (general purpose input and output) ports of the CPU and memory modules. In this way, the BMC can know whether the CPU and memory modules have been installed on the server and obtain their physical locations.

[0185] During the server startup process, the BIOS will execute a self-test program to detect and collect detailed information about the CPU and memory, such as model, speed, capacity, etc. This information can be reported to the BMC by the BIOS as part of the asset information.

[0186] The BMC compares the CPU and memory asset information received from the BIOS with the presence information sensed by the hardware signal. If a discrepancy is found, such as the BIOS not detecting a certain memory module, but the hardware signal shows that the module should be in place, the BMC can determine that there may be a problem with the memory module.

[0187] When the CPU or memory is abnormal, the BMC can help locate the abnormal device by analyzing the asset information and hardware signals received from the BIOS. For example, if the performance indicators of a CPU are abnormal, the BMC can record this information and provide it to the system administrator for fault diagnosis when necessary.

[0188] BMC can display the asset information of CPU and memory on its management interface, including their operating status, configuration parameters and any abnormal conditions. This helps system administrators monitor the hardware status of the server in real time and perform maintenance or replacement in a timely manner.

[0189] In this way, not only the accuracy and efficiency of the server's management of various types of hardware are improved, but it also helps to promptly discover and solve hardware problems, thereby improving the stability and reliability of the entire server system.

[0190] Based on the same inventive concept, another embodiment of the present application further provides a device for determining a device state. Figure 5 is a schematic diagram of a framework of a device state determination apparatus applied to a baseboard management controller provided by an embodiment of the present application, such as Figure 5 As shown, the device is applied to a baseboard management controller, and includes:

[0191] A first device information set determination module 11 is used to determine, for multiple target devices on a server, a first device information set of the multiple target devices according to a correspondence between a plurality of in-place hardware signals of the multiple target devices on the server and slot identifiers of a plurality of slots on the server and a plurality of preset hardware signals;

[0192] A second device information set receiving module 12, configured to receive a second device information set of the plurality of target devices acquired by a basic input / output system of a host;

[0193] The target device status determination module 13 is used to determine the status of the multiple target devices according to the first device information set and the second device information set.

[0194] Optionally, the first device information set includes a plurality of first device information corresponding to the plurality of target devices, and the first device information includes at least a first slot identifier; the second device information set includes a plurality of second device information corresponding to the plurality of target devices, and the second device information includes at least a second slot identifier and a disabled identifier; the target device state determination module 13 includes:

[0195] a target device state determination unit, configured to compare the plurality of first device information with the plurality of second device information to determine a state of each target device in the plurality of target devices;

[0196] The first slot identifier is a slot identifier of a slot where a target device on the server is located, and the second slot identifier is a slot identifier of the target device on the server acquired by the basic input and output system.

[0197] Optionally, the target device state determination unit includes:

[0198] A first judging unit, configured to compare the first slot identifier of each first device information in the plurality of first device information with the plurality of second slot identifiers of the plurality of second device information, respectively, to judge whether there is a matching second slot identifier for the first slot identifier in the first device information;

[0199] The first determining unit is configured to determine the state of the target device based on whether there is a corresponding disabling identifier for the second slot identifier that matches the first slot identifier when there is a matching second slot identifier in the first device information.

[0200] Optionally, the first determining unit includes:

[0201] A first determining subunit is configured to determine that the state of the target device in the slot corresponding to the first slot identifier is a normal state when the second slot identifier matching the first slot identifier does not have a corresponding disabling identifier;

[0202] The first determining second subunit is configured to determine that the state of the target device in the slot corresponding to the first slot identifier is a disabled state when the second slot identifier matching the first slot identifier has a corresponding disabled identifier.

[0203] Optionally, the target device state determination unit includes:

[0204] A second judgment unit is used to compare the first slot identifier of each first device information in the plurality of first device information with the plurality of second slot identifiers of the plurality of second device information, and judge whether there is a matching second slot identifier for the first slot identifier in the first device information;

[0205] The second determining unit is configured to determine that the state of the target device in the slot corresponding to the first slot identifier is an abnormal state when there is no matching second slot identifier in the first device information.

[0206] Optionally, the device further comprises:

[0207] a device information list acquisition module, configured to integrate device information of each target device among the multiple target devices on a webpage of the baseboard management controller according to the first device information set and the second device information set before determining the status of each target device among the multiple target devices, so as to obtain a device information list of the multiple target devices;

[0208] The status marking module is used to mark the status of the device information of each target device in the device information list in the webpage according to the status of each target device in the multiple target devices after determining the status of each target device in the multiple target devices.

[0209] Optionally, the device further comprises:

[0210] a device information list acquisition module, configured to integrate device information of each target device among the multiple target devices on a webpage of the baseboard management controller according to the first device information set and the second device information set before determining the status of each target device among the multiple target devices, so as to obtain a device information list of the multiple target devices;

[0211] The target device state determination unit includes:

[0212] The second determination unit is used to determine that the state of the target device corresponding to the device information that does not have the matching first device information and the matching second device information in the device information list is an unplugged state when the device information of the target device in the device information list does not have the matching first device information or the matching second device information.

[0213] Optionally, the device further comprises:

[0214] a modification module, configured to modify, on the webpage of the baseboard management controller, device information of a target device in the device information list whose device information has been changed, according to the first device information and the second device information;

[0215] a new adding module, configured to add device information of a target device newly added to the first device information set to the device information list according to the first device information and the second device information;

[0216] The deleting module is used to delete the device information in the device information list that does not have the matching first device information and the matching second device information when the device information included in the device information list does not have the matching first device information and the matching second device information.

[0217] Optionally, the device further comprises:

[0218] A re-acquisition module, configured to acquire the re-acquired second device information set reported by the host end when a target device is disabled;

[0219] The reacquired second device information set is a second device information set acquired by the host after the target device is disabled.

[0220] Based on the same inventive concept, another embodiment of the present application further provides a device for determining a device state. Figure 6 is a schematic diagram of a framework of a device state determination apparatus applied to a host side provided by an embodiment of the present application, such as Figure 6 As shown, the device is applied to a host side, and the device comprises:

[0221] A second device information set acquisition module 21, configured to acquire a second device information set through a basic input and output system, wherein the second device information set includes a plurality of second device information of a plurality of target devices;

[0222] A saving module 22, configured to save the second device information set in a cache of the host side;

[0223] A reporting module 23, configured to report the second device information set stored in the host end to the baseboard management controller, so that the baseboard management controller determines the status of the plurality of target devices according to the first device information set and the second device information set;

[0224] The first device information set is determined by the baseboard management controller according to a correspondence between a plurality of in-place hardware signals of the plurality of target devices on the server and slot identifiers of a plurality of slots on the server and a plurality of preset hardware signals.

[0225] Optionally, the device further comprises:

[0226] A disabling module, used for shutting down the root port of the target device to be disabled through a control instruction when it is detected that the target device needs to be disabled;

[0227] The disabling identification module is used to set a disabling identification for a disabled target device, and add the disabling identification to the second device information of the disabled target device.

[0228] Optionally, the plurality of second device information included in the second device information set in the cache further includes a silk-screen string and a second slot identifier of the target device; and the disabling identification module includes:

[0229] A disabling recording module, used for recording the second slot identifier of the disabled target device;

[0230] a silk-screen character string determination module, configured to determine, from the cache, a silk-screen character string corresponding to the second slot identifier of the disabled target device;

[0231] a replacement module, configured to reacquire the second device information set through the basic input and output system after disabling the target device, and replace the second device information set already stored in the cache of the host side according to the reacquired second device information set;

[0232] An adding module, used for adding the second slot identifier, the disabling identifier and the silk-screen character string of the target device to be disabled to the second device information set stored in the host end;

[0233] The reacquired second device information set is used to be sent to the baseboard management controller, so that the baseboard management controller determines the status of the multiple target devices based on the reacquired second device information set.

[0234] Based on the same inventive concept, another embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the device status determination method as described in any of the above embodiments.

[0235] Among them, electronic equipment refers to Figure 7 , Figure 7 is a schematic diagram of an electronic device provided by an embodiment of the present application. Figure 7 As shown, the electronic device 700 includes: a memory 710 and a processor 720. The memory 710 and the processor 720 are connected via a bus communication. A computer program is stored in the memory 710. The computer program can be run on the processor 720 to implement the steps in the device status determination method disclosed in the above embodiment of the present application.

[0236] Based on the same inventive concept, another embodiment of the present application further provides a computer program product, including a computer program, which is executed by a processor to perform the device status determination method described in any of the above embodiments.

[0237] Based on the same inventive concept, another embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, wherein when the program is executed by a processor, the device status determination method as described in any of the above embodiments is implemented.

[0238] As for the device, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0239] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0240] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0241] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0242] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0243] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0244] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0245] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0246] The above is a detailed introduction to a device status determination method, device, medium and product provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for determining a device state, characterized in that: Applied to a baseboard management controller, the method includes: For multiple target devices on a server, a first device information set of the multiple target devices is determined according to a correspondence between multiple in-place hardware signals of the multiple target devices on the server and slot identifiers of multiple slots on the server and multiple preset hardware signals; the first device information set includes multiple first device information corresponding to the multiple target devices, and the first device information at least includes a first slot identifier; Receiving a second device information set of the plurality of target devices acquired by a basic input / output system of the host end; the second device information set includes a plurality of second device information corresponding to the plurality of target devices, and the second device information at least includes a second slot identifier and a disable identifier; Determining the states of the plurality of target devices according to the first device information set and the second device information set comprises at least the following steps: Compare the first slot identifier of each first device information in the plurality of first device information with the plurality of second slot identifiers of the plurality of second device information respectively, and determine whether there is a matching second slot identifier for the first slot identifier in the first device information; When a matching second slot identifier exists for the first slot identifier in the first device information, determining whether the status of the multiple target devices is a disabled status based on whether a corresponding disabled identifier exists for the second slot identifier matching the first slot identifier; The second device information set where the second device information of the disabled target device is located is determined by the host side executing the following steps: Determine in the cache a silk-screen string corresponding to the second slot identifier of the disabled target device; after disabling the target device, reacquire the second device information set through the basic input and output system, and replace the second device information set already saved in the cache of the host side according to the reacquired second device information set; add the second slot identifier, the disable identifier and the silk-screen string of the disabled target device to the second device information set saved on the host side.

2. The device status determination method according to claim 1, characterized in that: The determining the states of the plurality of target devices according to the first device information set and the second device information set includes: Comparing the plurality of first device information with the plurality of second device information to determine a status of each target device in the plurality of target devices; The first slot identifier is a slot identifier of a slot where a target device on the server is located, and the second slot identifier is a slot identifier of the target device on the server acquired by the basic input and output system.

3. The device status determination method according to claim 1, characterized in that: The method of determining whether the states of the plurality of target devices are disabled states based on whether the second slot identifier matching the first slot identifier exists when the first slot identifier in the first device information matches the second slot identifier exists a corresponding disabled identifier includes: When the second slot identifier that matches the first slot identifier does not have a corresponding disabling identifier, determining that the state of the target device in the slot corresponding to the first slot identifier is a normal state; When the second slot identifier that matches the first slot identifier has a corresponding disable identifier, it is determined that the state of the target device in the slot corresponding to the first slot identifier is a disable state.

4. The device status determination method according to claim 2, characterized in that: The comparing the plurality of first device information with the plurality of second device information to determine the state of each target device in the plurality of target devices includes: Compare the first slot identifier of each first device information in the plurality of first device information with the plurality of second slot identifiers of the plurality of second device information respectively, and determine whether there is a matching second slot identifier for the first slot identifier in the first device information; When the first slot identifier in the first device information does not have a matching second slot identifier, it is determined that the state of the target device in the slot corresponding to the first slot identifier is an abnormal state.

5. The device status determination method according to claim 2, characterized in that: Before determining the status of each target device in the plurality of target devices, the method further includes: According to the first device information set and the second device information set, integrating the device information of each target device in the plurality of target devices on the webpage of the baseboard management controller to obtain a device information list of the plurality of target devices; After determining the status of each target device in the plurality of target devices, the method further includes: According to the status of each target device in the plurality of target devices, the status of the device information of each target device in the device information list is marked in the webpage.

6. The device status determination method according to claim 2, characterized in that: Before determining the status of each target device in the plurality of target devices, the method further includes: According to the first device information set and the second device information set, integrating the device information of each target device in the plurality of target devices on the webpage of the baseboard management controller to obtain a device information list of the plurality of target devices; The determining the state of each target device among the plurality of target devices comprises: When there is device information of the target device in the device information list without matching first device information or matching second device information, it is determined that the state of the target device corresponding to the device information without matching first device information and matching second device information in the device information list is unplugged.

7. The device status determination method according to claim 5 or 6, characterized in that: The method further comprises: According to the first device information and the second device information, modifying the device information of the target device in the device information list whose device information has changed on the webpage of the baseboard management controller; According to the first device information and the second device information, adding the device information of the newly added target device in the first device information set to the device information list; When the device information included in the device information list does not have matching first device information and matching second device information, the device information in the device information list that does not have matching first device information and matching second device information is deleted.

8. The method according to claim 1, characterized in that The method further comprises: When a target device is disabled, obtaining a re-acquired second device information set reported by the host end; The reacquired second device information set is a second device information set acquired by the host after the target device is disabled.

9. A method for determining a device state, characterized in that: Applied to the host side, the method includes: Acquire, through a basic input and output system, a second device information set, wherein the second device information set includes a plurality of second device information of a plurality of target devices; storing the second device information set in a cache on the host side; Reporting the second device information set stored in the host end to the baseboard management controller, so that the baseboard management controller determines the status of the plurality of target devices according to the first device information set and the second device information set; The first device information set is determined by the baseboard management controller according to the correspondence between the multiple in-place hardware signals of the multiple target devices on the server and the slot identifiers of the multiple slots on the server and the multiple preset hardware signals; the first device information set includes multiple first device information corresponding to the multiple target devices, and the first device information at least includes the first slot identifier; the second device information set includes multiple second device information corresponding to the multiple target devices, and the second device information at least includes the second slot identifier and the disable identifier; Determining the states of the plurality of target devices according to the first device information set and the second device information set comprises at least the following steps: Compare the first slot identifier of each first device information in the plurality of first device information with the plurality of second slot identifiers of the plurality of second device information respectively, and determine whether there is a matching second slot identifier for the first slot identifier in the first device information; When a matching second slot identifier exists for the first slot identifier in the first device information, determining whether the status of the multiple target devices is a disabled status based on whether a corresponding disabled identifier exists for the second slot identifier matching the first slot identifier; The plurality of second device information included in the second device information set in the cache also includes a silk-screen string and a second slot identifier of the target device; the method further includes: When it is detected that the target device needs to be disabled, the root port of the target device that needs to be disabled is closed through a control instruction; Recording the second slot identifier of the disabled target device; Determining from the cache a silkscreen character string corresponding to a second slot identifier of the disabled target device; After disabling the target device, reacquiring the second device information set through the basic input and output system, and replacing the second device information set already stored in the cache of the host side according to the reacquired second device information set; Adding the second slot identifier, the disable identifier and the silk-screen character string of the target device to be disabled to the second device information set stored in the host end; The reacquired second device information set is used to be sent to the baseboard management controller, so that the baseboard management controller determines the status of the multiple target devices based on the reacquired second device information set.

10. An electronic device, characterized in that: The device comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the device state determination method according to any one of claims 1 to 8 or 9.

11. A computer-readable storage medium, characterized in that: A computer program is stored thereon, wherein when the computer program is executed by a processor, the device status determination method as described in any one of claims 1-8 or 9 is implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the device status determination method as described in any one of claims 1 to 8 or 9 is implemented.

Citation Information

Patent Citations

  • PCIE equipment detection method and device, BIOS and storage medium

    CN117234783A