Abnormal positioning method and device, electronic equipment and storage medium
By storing the information of the FRU into shared memory and the second non-volatile memory, the problem of BMC being difficult to accurately locate FRU abnormalities is solved, and fault location efficiency and equipment availability are improved.
Patent Information
- Application Number
- CN202411040158.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-12-27
AI Technical Summary
In the prior art, it is difficult for the substrate management controller (BMC) to accurately locate the abnormal location and reason for the occurrence of field replaceable element (FRU) information information obtained from non-volatile memory.
By storing the information of the FRU into shared memory and the second non-volatile memory, comparing the consistency of information in different storage locations, and judging the abnormal positioning results, including thread modification and hardware communication link abnormalities.
It realizes that when abnormal FRU information is obtained from non-volatile memory, the location and cause of the abnormality is accurately positioned, which improves the efficiency of fault location and hardware maintenance, and improves the availability of electronic devices.
Smart Images

Figure CN119201514A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic digital data processing, and in particular to an abnormality locating method, device, electronic equipment and storage medium. Background Art
[0002] A Field Replace Unit (FRU) is a replaceable component used in large devices such as servers, including but not limited to motherboards, power supplies, and fans. FRU can improve the maintainability and reliability of the above large devices.
[0003] FRU information usually includes the FRU's vital product data (VPD). FRU information is important for hardware identification and maintenance, as well as fault diagnosis and repair of the above-mentioned large equipment. Usually, FRU information is burned into non-volatile memory, such as Electrically Erasable Programmable Read-Only Memory (EEPROM).
[0004] However, in the related art, when the baseboard management controller (BMC) obtains information about an abnormal FRU from a non-volatile memory, it is difficult to accurately locate the location and cause of the abnormality in the FRU information. Therefore, how to accurately locate the location and cause of the abnormality in the FRU information when obtaining information about an abnormal FRU from a non-volatile memory is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0005] The present invention provides an abnormality locating method, device, electronic device and storage medium, which are used to solve the defect in the prior art that it is difficult to accurately locate the position and cause of the abnormality of the information information of the FRU when the information information of the FRU with an abnormality is obtained from a non-volatile memory, and realize accurate locating of the position and cause of the abnormality of the information information of the FRU when the information information of the FRU with an abnormality is obtained from the non-volatile memory.
[0006] The present invention provides an abnormality positioning method, comprising the following steps.
[0007] When information of a target field replaceable unit (FRU) in a target electronic device is obtained from a first non-volatile memory in the target electronic device, the information of the target FRU is stored in a shared memory of the target electronic device and a second non-volatile memory in the target electronic device respectively; it is determined whether there is an abnormality in the information of the target FRU, and when it is determined that there is an abnormality in the information of the target FRU, the information of the target FRU is compared with the information of the target FRU stored in the shared memory; when it is determined that the information of the target FRU is the same as the information of the target FRU stored in the shared memory, the information of the target FRU stored in the shared memory is compared with the information of the target FRU stored in the second non-volatile memory; based on whether the information of the target FRU stored in the shared memory is consistent with the information of the target FRU stored in the second non-volatile memory, an abnormality locating result of the information of the target FRU is obtained.
[0008] According to an abnormality locating method provided by the present invention, the abnormality locating result of the information information of the target FRU is obtained based on whether the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory, including: when it is determined that the information information of the target FRU stored in the shared memory is inconsistent with the information information of the target FRU stored in the second non-volatile memory, determining that the abnormality locating result includes that the thread running by the target electronic device causes the information information of the target FRU and the information information of the target FRU stored in the shared memory to be modified.
[0009] According to an abnormality locating method provided by the present invention, the abnormality locating result of the information information of the target FRU is obtained based on whether the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory, including: when it is determined that the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory, determining that the abnormality locating result includes that the information information of the target FRU in the first non-volatile memory has an abnormality.
[0010] According to an abnormality locating method provided by the present invention, when the information information of the target field replaceable unit FRU in the target electronic device is obtained from the first non-volatile memory in the target electronic device, before the information information of the target FRU is stored in the shared memory of the target electronic device and the second non-volatile memory in the target electronic device respectively, the method also includes: executing a thread for obtaining the information information of the target FRU from the first non-volatile memory, and obtaining the information information of the target FRU from the first non-volatile memory; when the information information of the FRU is not obtained from the first non-volatile memory, creating a new error file in the shared memory, and continuing to execute the thread for obtaining the information information of the target FRU from the first non-volatile memory until the information information of the FRU is obtained from the first non-volatile memory, and when the information information of the FRU is obtained from the first non-volatile memory, deleting the error file from the shared memory.
[0011] According to an abnormality locating method provided by the present invention, after determining that the abnormality locating result includes that the information information of the target FRU in the first non-volatile memory has an abnormality, the method further includes: obtaining the information information of the target FRU from the first non-volatile memory through a data bus, the data bus including an IIC bus; comparing the information information of the target FRU obtained through the data bus with the information information of the target FRU; and verifying that the abnormality locating result is true when the information information of the target FRU obtained through the data bus is the same as the information information of the target FRU.
[0012] According to an abnormality locating method provided by the present invention, when the information information of the target FRU obtained through the data bus is the same as the information information of the target FRU, after verifying that the abnormality locating result is true, the method also includes: updating the information information of the target FRU in the first non-volatile memory; executing the thread, obtaining the updated information information of the target FRU from the first non-volatile memory, and obtaining the updated information information of the target FRU from the first non-volatile memory through the data bus; comparing the updated information information of the target FRU obtained through the data bus with the updated information information of the target FRU obtained by executing the thread; when the updated information information of the target FRU obtained through the data bus and the updated information information of the target FRU obtained by executing the thread are different, determining that the abnormality locating result also includes that there is an abnormality in the data bus.
[0013] According to an abnormality locating method provided by the present invention, when an expander chip is configured in the target electronic device and the first non-volatile memory is a downstream device of the expander chip, the abnormality locating result of the information information of the target FRU is obtained based on whether the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory, including: when it is determined that the information information of the target FRU stored in the shared memory is inconsistent with the information information of the target FRU stored in the second non-volatile memory, determining that the abnormality locating result includes that the thread running by the target electronic device causes the information information of the target FRU and the information information of the target FRU stored in the shared memory to be modified; when it is determined that the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory, determining that the abnormality locating result includes that the expander chip causes the information information of the target FRU to be abnormal.
[0014] According to an abnormality locating method provided by the present invention, the determining whether there is an abnormality in the information of the target FRU includes: checking whether the information of the target FRU includes garbled information; if it is determined that the information of the target FRU includes garbled information, determining that there is an abnormality in the information of the target FRU.
[0015] The present invention also provides an abnormality locating device, comprising the following modules: The information acquisition module is used to store the information of the target field replaceable unit FRU in the target electronic device in the shared memory of the target electronic device and in the second non-volatile memory of the target electronic device respectively after acquiring the information of the target FRU in the first non-volatile memory of the target electronic device.
[0016] The abnormality judgment module is used to judge whether the information of the target FRU is abnormal. When it is determined that the information of the target FRU is abnormal, the information of the target FRU is compared with the information of the target FRU stored in the shared memory.
[0017] The information comparison module is used to compare the information of the target FRU stored in the shared memory with the information of the target FRU stored in the second non-volatile memory when determining that the information of the target FRU is the same as the information of the target FRU stored in the shared memory.
[0018] The result output module is used to obtain the abnormal location result of the information information of the target FRU based on whether the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory.
[0019] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned abnormality locating methods is implemented.
[0020] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the abnormality locating method described in any one of the above is implemented.
[0021] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned abnormality locating methods.
[0022] The abnormality locating method, device, electronic device and storage medium provided by the present invention acquire information information of a target FRU in a target electronic device from a first non-volatile memory in the target electronic device, store the information information of the target FRU in a shared memory of the target electronic device and in a second non-volatile memory in the target electronic device respectively, and compare the information information of the target FRU with the information information of the target FRU stored in the shared memory when it is determined that the information information of the target FRU is abnormal, and compare the information information of the target FRU with the information information of the target FRU stored in the shared memory when it is determined that the information information of the target FRU is the same as the information information of the target FRU stored in the shared memory. The target FRU information in the shared memory and the target FRU information stored in the second non-volatile memory are then compared, and based on whether the target FRU information stored in the shared memory and the target FRU information stored in the second non-volatile memory are consistent, the abnormality positioning result of the target FRU information is obtained. When the information information of the abnormal FRU is obtained from the non-volatile memory, the position and cause of the abnormality in the FRU information can be accurately located, which helps development and maintenance personnel to perform fault positioning and hardware maintenance in a timely manner according to the abnormality positioning result, and can improve the availability of electronic equipment and user perception. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 This is one of the flow charts of the abnormality locating method provided by the present invention.
[0025] Figure 2 This is the second flow chart of the abnormality locating method provided by the present invention.
[0026] Figure 3 It is a structural schematic diagram of the abnormality locating device provided by the present invention.
[0027] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] In the description of the invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0030] In the description of the present application, the terms "first", "second", etc. are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are usually a class, and the number of objects is not limited. For example, the first object can be one or more. In addition, in the description of the present application, "and / or" represents at least one of the connected objects, and the character " / " generally represents that the front and back associated objects are in an "or" relationship.
[0031] It should be noted that EEPROM, the full name of which is Electrically Erasable Programmable Read-Only Memory, is a storage chip in which data is not lost after power failure. It is also a special non-volatile memory that can be erased and programmed multiple times by electronic devices without removing or replacing the chip.
[0032] The server's motherboard is usually equipped with an EEPROM to store the FRU information on the motherboard. The FRU information stored in the EEPROM can be read by the Baseboard Management Controller (BMC), which helps development and maintenance personnel to locate faults and perform hardware maintenance based on the FRU information.
[0033] In the related art, when the BMC obtains FRU information from the EEPROM, it can only determine whether the FRU information is read from the EEPROM normally, but cannot determine whether there is any abnormality in the read FRU information. It is necessary for a technician to determine whether there is any abnormality in the FRU information read by the BMC.
[0034] Furthermore, even if the technician determines that the FRU information read from the EEPROM is abnormal based on the FRU information displayed by the BMC, it is impossible to accurately locate the position and cause of the abnormality in the FRU information.
[0035] For example, in the actual operation process, the technician determines that the FRU information read from the EEPROM is abnormal based on the FRU information displayed by the BMC, and the FRU information directly obtained from the EEPROM through the IIC bus is also abnormal. It can be determined that the FRU information in the EEPROM itself is abnormal, and the abnormal problem of the FRU information in the EEPROM can be directly solved. However, when the technician determines that the FRU information read from the EEPROM is abnormal based on the FRU information displayed by the BMC, and the FRU information directly obtained from the EEPROM through the IIC bus is normal, it is difficult to accurately determine the location and cause of the abnormality of the FRU information.
[0036] In this regard, the present invention provides an abnormality locating method. The abnormality locating method provided by the present invention can accurately determine whether there is an abnormality in the FRU information information obtained from the non-volatile memory when the BMC obtains the FRU information information from the non-volatile memory, and when it is determined that the obtained FRU information information is abnormal, accurately locate the location and cause of the abnormality of the FRU information, which helps development and maintenance personnel to timely perform fault location and hardware maintenance according to the abnormality locating results.
[0037] Combine the following Figure 1-Figure 2 The anomaly locating method of the present invention is described.
[0038] Figure 1 It is one of the flow charts of the abnormality positioning method provided by the present invention, such as Figure 1 As shown, the method includes the following: Step 101, when information of a target field replaceable unit FRU in a target electronic device is obtained from a first non-volatile memory in the target electronic device, the information of the target FRU is stored in a shared memory of the target electronic device and in a second non-volatile memory in the target electronic device respectively.
[0039] It should be noted that the execution subject of the embodiment of the present invention is an abnormality locating device.
[0040] Specifically, the target electronic device in the embodiment of the present invention may be a large electronic device such as a server, etc. The target electronic device may be determined according to actual needs, and the target electronic device is not specifically limited in the embodiment of the present invention.
[0041] It should be noted that the abnormality locating device in the embodiment of the present invention may be a BMC in the target electronic device.
[0042] The target electronic device is provided with a plurality of non-volatile memories and a plurality of FRUs. In the embodiment of the present invention, one or more FRUs in the target electronic device can be determined as the target FRU according to actual needs.
[0043] In the embodiment of the present invention, the non-volatile memory in the target electronic device storing the information of the target FRU may be determined as the first non-volatile memory in the target electronic device.
[0044] It should be noted that, in the embodiment of the present invention, the information of the target FRU may include vital product data (VPD) of the target FRU.
[0045] Optionally, the first non-volatile memory may be an EEPROM.
[0046] It is understandable that the number of the first non-volatile memory may be one or more.
[0047] If the BMC in the target electronic device obtains the information of the target FRU in the target electronic device from the first non-volatile memory in the target electronic device, the BMC can determine that the information of the target FRU is read successfully, and the BMC can store the information of the target FRU in the shared memory of the target electronic device and the second non-volatile memory in the target electronic device respectively.
[0048] Optionally, the second non-volatile memory may be an EEPROM.
[0049] It should be noted that, in the embodiment of the present invention, the first non-volatile memory and the second non-volatile memory in the target electronic device may be the same or different.
[0050] Figure 2 FIG. 2 is a flow chart of the abnormality location method provided by the present invention. Figure 2 As shown, as an optional embodiment, when obtaining information of a target field replaceable unit FRU in a target electronic device from a first non-volatile memory in a target electronic device, before storing the information of the target FRU in a shared memory of the target electronic device and in a second non-volatile memory in the target electronic device respectively, the method further includes: executing a thread for obtaining information of the target FRU from the first non-volatile memory, and obtaining information of the target FRU from the first non-volatile memory.
[0051] Specifically, when the BMC in the target electronic device receives a trigger instruction for instructing to obtain information information of the target FRU in the target electronic device, it can initiate a thread for obtaining information information of the target FRU in the target electronic device from the first non-volatile memory, and set a flag indicating that the information information of the target FRU has been read successfully.
[0052] It should be noted that the trigger instruction may be generated based on a user input and sent to the BMC, or the trigger instruction may be automatically generated and sent to the BMC when a preset trigger condition is met.
[0053] The BMC in the target electronic device can obtain the information of the target FRU in the target electronic device from the first non-volatile memory by executing the thread for obtaining the information of the target FRU in the target electronic device from the first non-volatile memory.
[0054] If the information of the FRU is not obtained from the first non-volatile memory, a new error file is created in the shared memory, and the thread for obtaining the information of the target FRU from the first non-volatile memory is continued to be executed until the information of the FRU is obtained from the first non-volatile memory, and if the information of the FRU is obtained from the first non-volatile memory, the error file is deleted from the shared memory.
[0055] Specifically, if the BMC in the target electronic device fails to obtain the information of the target FRU in the target electronic device from the first non-volatile memory in the target electronic device, the BMC may determine that reading the information of the target FRU has failed, and the BMC may create a new error file in the shared memory of the target electronic device, and continue to execute the thread for obtaining the information of the target FRU in the target electronic device from the first non-volatile memory, repeatedly obtaining the information of the target FRU in the target electronic device from the first non-volatile memory, until the BMC obtains the information of the target FRU from the first non-volatile memory.
[0056] It should be noted that if the BMC in the target electronic device has not obtained the information of the target FRU in the target electronic device from the first non-volatile memory in the target electronic device within the preset time, it can be determined that the abnormal positioning result of the information of the target FRU includes an abnormality in the hardware communication link between the BMC in the target electronic device and the first non-volatile memory, so that the technician can repair the hardware communication link between the BMC in the target electronic device and the first non-volatile memory.
[0057] In the embodiment of the present invention, the IIC bus can be used to construct a hardware communication link between the BMC in the target electronic device and the first non-volatile memory.
[0058] It should be noted that the preset duration in the embodiment of the present invention may be predefined based on prior knowledge and / or actual conditions. The specific value of the preset duration is not limited in the embodiment of the present invention.
[0059] Optionally, the preset time length may range from 5 minutes to 10 minutes. For example, the preset time length may range from 5 minutes, 8 minutes or 10 minutes.
[0060] In the case where the BMC obtains the information of the target FRU from the first non-volatile memory, the BMC may terminate the thread for obtaining the information of the target FRU in the target electronic device from the first non-volatile memory based on the flag indicating successful reading of the information of the target FRU, delete the error file from the shared memory of the target electronic device, and store the obtained information of the target FRU in the shared memory of the target electronic device and the second non-volatile memory in the target electronic device respectively.
[0061] It can be understood that the error file in the shared memory of the target electronic device can be used to indicate whether the BMC in the target electronic device successfully obtains the information of the target FRU in the target electronic device from the first non-volatile memory in the target electronic device. If the above error file exists in the shared memory of the target electronic device, it can be explained that the BMC in the target electronic device has not obtained the information of the target FRU in the target electronic device from the first non-volatile memory in the target electronic device; if the above error file does not exist in the shared memory of the target electronic device, it can be explained that the BMC in the target electronic device has obtained the information of the target FRU in the target electronic device from the first non-volatile memory in the target electronic device.
[0062] The embodiment of the present invention executes a thread for obtaining information information of the target FRU from the first non-volatile memory, obtains information information of the target FRU from the first non-volatile memory, and indicates whether the BMC in the target electronic device has obtained information information of the target FRU in the target electronic device from the first non-volatile memory in the target electronic device through an error file in the shared memory of the target electronic device. This can more intuitively reflect whether an abnormality occurs in the operation of obtaining information information of the target FRU, which helps technicians to perform fault troubleshooting more efficiently and conveniently. In the case where the information information of the target FRU is still not obtained within a preset time, it is determined that an abnormality occurs in the hardware communication link with the first non-volatile memory, so that the technicians can repair the hardware communication link with the first non-volatile memory.
[0063] Step 102: Determine whether the information of the target FRU is abnormal. If it is determined that the information of the target FRU is abnormal, compare the information of the target FRU with the information of the target FRU stored in the shared memory.
[0064] Specifically, when the BMC in the target electronic device obtains the information of the target FRU from the first non-volatile memory in the target electronic device, it can determine whether there is any abnormality in the information of the target FRU obtained by the BMC in the target electronic device through semantic recognition, deep learning technology and conditional judgment.
[0065] As an optional embodiment, determining whether the information of the target FRU is abnormal includes: checking whether the information of the target FRU includes garbled information.
[0066] Specifically, when the BMC in the target electronic device obtains the information of the target FRU from the first non-volatile memory in the target electronic device, it can check whether the information of the target FRU includes garbled information through semantic recognition.
[0067] It should be noted that the garbled information in the embodiment of the present invention refers to information in which characters are displayed or processed in an erroneous form, resulting in that the text content cannot be correctly recognized or displayed.
[0068] When the information of the target FRU includes garbled information, it is determined that the information of the target FRU is abnormal.
[0069] Specifically, by semantic recognition, when it is determined that the information of the target FRU does not include garbled information, it can be determined that there is no abnormality in the information of the target FRU; by semantic recognition, when it is determined that the information of the target FRU includes garbled information, it can be determined that there is an abnormality in the information of the target FRU.
[0070] When it is determined that the target FRU information obtained by the BMC in the target electronic device is abnormal, the target FRU information obtained by the BMC in the target electronic device can be compared with the target FRU information stored in the shared memory of the target electronic device.
[0071] Step 103: When it is determined that the information of the target FRU is the same as the information of the target FRU stored in the shared memory, compare the information of the target FRU stored in the shared memory with the information of the target FRU stored in the second non-volatile memory.
[0072] Specifically, by comparing the information of the target FRU obtained by the BMC in the target electronic device with the information of the target FRU in the shared memory of the target electronic device, when it is determined that the information of the target FRU obtained by the BMC in the target electronic device is the same as the information of the target FRU in the shared memory of the target electronic device, the information of the target FRU stored in the shared memory of the target electronic device can be further compared with the information of the target FRU stored in the second non-volatile memory in the target electronic device.
[0073] It should be noted that, through the analysis of the process of obtaining the information of the FRU, it is possible that the information of the FRU in the EEPROM is not abnormal, but in the subsequent data processing process, the information of the FRU obtained by the BMC is abnormally modified. Although the probability of this situation is low, it cannot be completely ruled out. At this time, the information of the target FRU obtained by the BMC in the target electronic device will be different from the information of the target FRU in the shared memory of the target electronic device. Externally, it is manifested that the information of the target FRU obtained by the BMC in the target electronic device is abnormal, but the information of the target FRU obtained by the BMC in the target electronic device is normal, and the information of the target FRU read directly from the first non-volatile memory through the IIC bus is also normal.
[0074] Therefore, by comparing the information information of the target FRU obtained by the BMC in the target electronic device with the information information of the target FRU in the shared memory of the target electronic device, when it is determined that the information information of the target FRU obtained by the BMC in the target electronic device is different from the information information of the target FRU in the shared memory of the target electronic device, the abnormal location result of the information information of the target FRU can be determined, including: after the information information of the target FRU is stored in the shared memory of the target electronic device, the thread running in the target electronic device causes the information information of the target FRU stored in the shared memory of the target electronic device to be abnormal.
[0075] Step 104 : Based on whether the information of the target FRU stored in the shared memory is consistent with the information of the target FRU stored in the second non-volatile memory, an abnormality locating result of the information of the target FRU is obtained.
[0076] Specifically, by comparing the information of the target FRU stored in the shared memory of the target electronic device with the information of the target FRU stored in the second non-volatile memory of the target electronic device, it can be determined whether the information of the target FRU stored in the shared memory of the target electronic device is consistent with the information of the target FRU stored in the second non-volatile memory of the target electronic device, and then based on whether the information of the target FRU stored in the shared memory of the target electronic device is consistent with the information of the target FRU stored in the second non-volatile memory of the target electronic device, the abnormal positioning result of the information of the target FRU obtained by the BMC in the target electronic device can be determined.
[0077] As an optional embodiment, based on whether the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory, an abnormality location result of the information information of the target FRU is obtained, including: when it is determined that the information information of the target FRU stored in the shared memory is inconsistent with the information information of the target FRU stored in the second non-volatile memory, determining that the abnormality location result includes that the thread running by the target electronic device causes the information information of the target FRU and the information information of the target FRU stored in the shared memory to be modified.
[0078] Specifically, by comparing the information of the target FRU stored in the shared memory of the target electronic device with the information of the target FRU stored in the second non-volatile memory of the target electronic device, when it is determined that the information of the target FRU stored in the shared memory of the target electronic device is inconsistent with the information of the target FRU stored in the second non-volatile memory of the target electronic device, it can be explained that after the BMC in the target electronic device stores the information of the target FRU in the shared memory of the target electronic device and the second non-volatile memory of the target electronic device respectively, the thread running in the target electronic device causes the information of the target FRU acquired by the BMC in the target electronic device and the information of the target FRU stored in the shared memory of the target electronic device to be modified, and then it can be determined that the abnormal positioning result of the information of the target FRU includes: the thread running in the target electronic device causes the information of the target FRU and the information of the target FRU stored in the shared memory to be modified.
[0079] As an optional embodiment, based on whether the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory, the abnormality location result of the information information of the target FRU is obtained, including: when it is determined that the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory, determining that the abnormality location result includes that the information information of the target FRU in the first non-volatile memory has an abnormality.
[0080] Specifically, by comparing the information of the target FRU stored in the shared memory of the target electronic device with the information of the target FRU stored in the second non-volatile memory of the target electronic device, when it is determined that the information of the target FRU stored in the shared memory of the target electronic device is consistent with the information of the target FRU stored in the second non-volatile memory of the target electronic device, it can be explained that the information information of the target FRU burned in the first non-volatile memory itself is abnormal, and further, it can be determined that the abnormal locating result of the information information of the target FRU includes: the information information of the target FRU in the first non-volatile memory is abnormal.
[0081] As an optional embodiment, after determining that the abnormal location result includes that the information of the target FRU in the first non-volatile memory is abnormal, the method further includes: obtaining the information of the target FRU from the first non-volatile memory via a data bus, and the data bus includes an IIC bus.
[0082] The information of the target FRU obtained through the data bus is compared with the information of the target FRU.
[0083] In the case where the information of the target FRU obtained through the data bus is the same as the information of the target FRU, the abnormality locating result is verified to be true.
[0084] It should be noted that, through analyzing the process of obtaining the information of the FRU, it can be known that if it is determined that the information of the target FRU obtained by the BMC in the target electronic device is abnormal, while the information of the target FRU obtained directly from the first non-volatile memory through the IIC bus is not abnormal, on the one hand, it may be that the information of the target FRU in the first non-volatile memory is abnormal, but the BMC in the target electronic device can normally read the information of the target FRU in the first non-volatile memory. After the BMC in the target electronic device reads the information of the target FRU in the first non-volatile memory, the information of the target FRU in the first non-volatile memory returns to normal. In this way, the information of the target FRU obtained by the BMC in the target electronic device is abnormal, while the information of the target FRU obtained directly from the first non-volatile memory through the IIC bus is not abnormal.
[0085] It should be noted that, through analyzing the process of obtaining the information of the FRU, it can be known that there is also a relatively special situation, that is, the information of the target FRU obtained by the BMC in the target electronic device does not have any abnormality, but the information of the target FRU obtained directly from the first non-volatile memory through the IIC bus has an abnormality. In this case, it usually has no impact on the outside, because in the example of the present invention, after the BMC in the target electronic device obtains the information of the target FRU, it stores the information of the target FRU in the shared memory of the target device. If the information of the target FRU obtained by the BMC in the target electronic device does not have any abnormality, the BMC in the target electronic device will no longer obtain the information of the target FRU from the first non-volatile memory.
[0086] As an optional embodiment, when an expander chip is configured in the target electronic device and the first non-volatile memory is a downstream device of the expander chip, based on whether the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory, the abnormal location result of the information information of the target FRU is obtained, including: when it is determined that the information information of the target FRU stored in the shared memory is inconsistent with the information information of the target FRU stored in the second non-volatile memory, determining that the abnormal location result includes that the thread running by the target electronic device causes the information information of the target FRU and the information information of the target FRU stored in the shared memory to be modified; when it is determined that the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory, determining that the abnormal location result includes that the expander chip causes the information information of the target FRU to be abnormal.
[0087] It should be noted that expander chips are electronic components that can expand the number of input / output (I / O) ports on a circuit board. Expander chips are usually used to connect multiple devices or sensors so that they can communicate with the main controller. Expander chips can communicate with the main controller through a serial bus (such as I2C, SPI) or a parallel bus, and can support multiple communication protocols.
[0088] It is a common design to configure an expander chip in an electronic device. When an expander chip is provided in the target electronic device, and the first non-volatile memory in the target electronic device is hung under the expander chip, the BMC in the target electronic device needs to obtain the information of the target FRU in the first non-volatile memory through the expander chip, and the BMC in the target electronic device cannot directly obtain the information of the target FRU from the first non-volatile memory.
[0089] Furthermore, in the case where the first non-volatile memory in the target electronic device is mounted under the expander chip, the information of the target FRU obtained by the BMC in the target electronic device through the expander chip has been processed by the expander chip.
[0090] Therefore, when an expander chip is configured in the target electronic device and the first non-volatile memory is a downstream device of the expander chip, if it is determined that the information of the target FRU stored in the shared memory of the target electronic device is consistent with the information of the target FRU stored in the second non-volatile memory in the target electronic device, it can be explained that in the process of the BMC in the target electronic device obtaining the information of the target FRU through the expander chip, an abnormality occurred in the expander chip when synchronizing the information of the target FRU, which in turn caused the information of the target FRU obtained by the BMC in the target electronic device to be abnormal. It can be determined that the abnormal location result of the information of the target FRU includes: the expander chip causes the information of the target FRU to be abnormal.
[0091] It should be noted that, when an expander chip is configured in the target electronic device and the first non-volatile memory is a downstream device of the expander chip, if it is determined that the information of the target FRU stored in the shared memory of the target electronic device is inconsistent with the information of the target FRU stored in the second non-volatile memory of the target electronic device, it can be determined that the abnormal location result of the information information of the target FRU includes: the thread running by the target electronic device causes the information information of the target FRU and the information information of the target FRU stored in the shared memory to be modified.
[0092] In the embodiment of the present invention, after acquiring information information of a target FRU in a target electronic device from a first non-volatile memory in a target electronic device, the information information of the target FRU is stored in a shared memory of the target electronic device and in a second non-volatile memory in the target electronic device respectively. When it is determined that the information information of the target FRU is abnormal, the information information of the target FRU is compared with the information information of the target FRU stored in the shared memory. When it is determined that the information information of the target FRU is the same as the information information of the target FRU stored in the shared memory, the information information of the target FRU is compared with the information information of the target FRU stored in the shared memory. The target FRU's information is obtained by comparing the information information of the target FRU stored in the shared memory with the information information of the target FRU stored in the second non-volatile memory, and then obtaining the abnormal location result of the information information of the target FRU based on whether the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory. When the information information of the abnormal FRU is obtained from the non-volatile memory, the position and cause of the abnormality in the information information of the FRU can be accurately located, which helps development and maintenance personnel to perform fault location and hardware maintenance in a timely manner according to the abnormal location result, thereby improving the availability of electronic equipment and improving user perception.
[0093] As an optional embodiment, when the information of the target FRU obtained through the data bus is the same as the information of the target FRU, after verifying that the abnormality locating result is true, the method further includes: updating the information of the target FRU in the first non-volatile memory.
[0094] The thread is executed to obtain updated information of the target FRU from the first non-volatile memory, and the updated information of the target FRU is obtained from the first non-volatile memory through the data bus.
[0095] The updated target FRU information obtained through the data bus is compared with the updated target FRU information obtained through the execution thread.
[0096] In the case where the updated target FRU information obtained through the data bus is different from the updated target FRU information obtained through the execution thread, determining the abnormality locating result also includes that an abnormality exists in the data bus.
[0097] In the embodiment of the present invention, after determining that the abnormal location result includes that the information information of the target FRU in the first non-volatile memory has an abnormality, the information information of the target FRU is obtained from the first non-volatile memory through the data bus, and by comparing the information information of the target FRU obtained through the data bus with the information information of the target FRU obtained by the BMC in the target electronic device, it is verified whether the above-mentioned abnormal location result is true, and when the above-mentioned abnormal location result is verified to be true, the information information of the target FRU in the first non-volatile memory is updated, the BMC in the target electronic device obtains the updated information information of the target FRU, and the updated information information of the target FRU is obtained through the data bus. By comparing the updated information information of the target FRU obtained by the BMC in the target electronic device with the updated information information of the target FRU obtained through the data bus, it is determined whether the above-mentioned data bus has an abnormality, which can further improve the accuracy of abnormal location of the information information of the target FRU.
[0098] In the abnormality locating method provided by the present invention, the BMC in the target electronic device stores the target FRU information in the shared memory of the target electronic device and the second non-volatile memory of the target electronic device respectively after obtaining the target FRU information from the first non-volatile memory in the target electronic device. Because problems occur during the subsequent operation, it is impossible to confirm whether the data is abnormal at the beginning or tampered with by the program at a certain stage, resulting in data changes in the shared memory. Then making a backup of the target FRU information will help the analysis when problems occur.
[0099] The abnormality locating method provided by the present invention is summarized, based on whether there is an error file in the shared memory of the target electronic device, indicating whether the BMC in the target electronic device has successfully obtained the information of the target FRU in the target electronic device from the first non-volatile memory in the target electronic device. If the information of the target FRU in the target electronic device is not obtained from the first non-volatile memory in the target electronic device due to a link problem, then data will be continuously read from the first non-volatile memory. At this time, the information information of the target FRU is not updated to the shared memory, but the BMC in the target electronic device can also obtain the information information of the target FRU with an abnormality, but this reading failure is not perceived by the outside. In this state, by querying whether the error file exists, it is determined whether the information information of the target FRU cannot be obtained due to a link abnormality.
[0100] Figure 3 This is a schematic diagram of the structure of the abnormality locating device provided by the present invention. Figure 3The abnormality locating device provided by the present invention is described, and the abnormality locating device described below and the abnormality locating device described above can be referred to each other. Figure 3 As shown, the device includes: an information acquisition module 301, an abnormality judgment module 302, an information comparison module 303 and a result output module 304.
[0101] The information acquisition module 301 is used to store the information of the target field replaceable unit FRU in the target electronic device in the shared memory of the target electronic device and in the second non-volatile memory of the target electronic device respectively after acquiring the information of the target FRU in the first non-volatile memory of the target electronic device.
[0102] The abnormality determination module 302 is used to determine whether the information of the target FRU is abnormal. If it is determined that the information of the target FRU is abnormal, the information of the target FRU is compared with the information of the target FRU stored in the shared memory.
[0103] The information comparison module 303 is used to compare the information of the target FRU stored in the shared memory with the information of the target FRU stored in the second non-volatile memory when determining that the information of the target FRU is the same as the information of the target FRU stored in the shared memory.
[0104] The result output module 304 is used to obtain the abnormality locating result of the target FRU information based on whether the target FRU information stored in the shared memory is consistent with the target FRU information stored in the second non-volatile memory.
[0105] Specifically, the information acquisition module 301, the abnormality determination module 302, the information comparison module 303 and the result output module 304 are electrically connected.
[0106] The abnormality locating device in the embodiment of the present invention acquires the information of the target FRU in the target electronic device from the first non-volatile memory in the target electronic device, stores the information of the target FRU in the shared memory of the target electronic device and in the second non-volatile memory in the target electronic device respectively, and compares the information of the target FRU with the information of the target FRU stored in the shared memory when it is determined that the information of the target FRU is abnormal, and compares the information of the target FRU with the information of the target FRU stored in the shared memory when it is determined that the information of the target FRU is the same as the information of the target FRU stored in the shared memory. The target FRU's information and the target FRU's information stored in the second non-volatile memory are combined, and then based on whether the target FRU's information stored in the shared memory and the target FRU's information stored in the second non-volatile memory are consistent, the abnormality positioning result of the target FRU's information is obtained. When the information of the abnormal FRU is obtained from the non-volatile memory, the position and cause of the abnormality in the FRU's information can be accurately located, which helps development and maintenance personnel to perform fault positioning and hardware maintenance in a timely manner according to the abnormality positioning result, and can improve the availability of electronic equipment and improve user perception.
[0107] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor (processor) 410 , a communication interface (Communications Interface) 420 , a memory (memory) 430 and a communication bus 440 , wherein the processor 410 , the communication interface 420 , and the memory 430 communicate with each other through the communication bus 440 . The processor 410 can call the logic instructions in the memory 430 to execute the abnormality locating method, which includes: when obtaining the information information of the target field replaceable unit FRU in the target electronic device from the first non-volatile memory in the target electronic device, storing the information information of the target FRU in the shared memory of the target electronic device and the second non-volatile memory in the target electronic device respectively; judging whether there is an abnormality in the information information of the target FRU, and when it is determined that there is an abnormality in the information information of the target FRU, comparing the information information of the target FRU with the information information of the target FRU stored in the shared memory; when it is determined that the information information of the target FRU is the same as the information information of the target FRU stored in the shared memory, comparing the information information of the target FRU stored in the shared memory with the information information of the target FRU stored in the second non-volatile memory; based on whether the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory, obtaining the abnormality locating result of the information information of the target FRU.
[0108] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0109] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the abnormality locating method provided by the above-mentioned methods, which includes: when obtaining information information of a target field replaceable unit FRU in a target electronic device from a first non-volatile memory in a target electronic device, storing the information information of the target FRU in a shared memory of the target electronic device and in a second non-volatile memory in the target electronic device respectively; judging whether there is an abnormality in the information information of the target FRU, and when it is determined that there is an abnormality in the information information of the target FRU, comparing the information information of the target FRU with the information information of the target FRU stored in the shared memory; when it is determined that the information information of the target FRU is the same as the information information of the target FRU stored in the shared memory, comparing the information information of the target FRU stored in the shared memory with the information information of the target FRU stored in the second non-volatile memory; based on whether the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory, obtaining the abnormality locating result of the information information of the target FRU.
[0110] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented by a processor to execute the abnormality locating method provided by the above-mentioned methods when the computer program is executed, the method comprising: when obtaining information information of a target field replaceable unit FRU in a target electronic device from a first non-volatile memory in a target electronic device, storing the information information of the target FRU in a shared memory of the target electronic device and in a second non-volatile memory in the target electronic device respectively; determining whether there is an abnormality in the information information of the target FRU, and when it is determined that there is an abnormality in the information information of the target FRU, comparing the information information of the target FRU with the information information of the target FRU stored in the shared memory; when it is determined that the information information of the target FRU is the same as the information information of the target FRU stored in the shared memory, comparing the information information of the target FRU stored in the shared memory with the information information of the target FRU stored in the second non-volatile memory; based on whether the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory, obtaining the abnormality locating result of the information information of the target FRU.
[0111] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0112] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for locating an abnormality, characterized in that: include: When information about a target field replaceable unit (FRU) in the target electronic device is obtained from a first non-volatile memory in the target electronic device, the information about the target FRU is stored in a shared memory of the target electronic device and in a second non-volatile memory in the target electronic device respectively; Determine whether the information of the target FRU is abnormal, and if it is determined that the information of the target FRU is abnormal, compare the information of the target FRU with the information of the target FRU stored in the shared memory; When it is determined that the information of the target FRU is the same as the information of the target FRU stored in the shared memory, comparing the information of the target FRU stored in the shared memory with the information of the target FRU stored in the second non-volatile memory; Based on whether the information of the target FRU stored in the shared memory is consistent with the information of the target FRU stored in the second non-volatile memory, an abnormality locating result of the information of the target FRU is obtained.
2. The abnormality locating method according to claim 1, characterized in that: The obtaining of the abnormality locating result of the information information of the target FRU based on whether the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory includes: When it is determined that the information of the target FRU stored in the shared memory is inconsistent with the information of the target FRU stored in the second non-volatile memory, it is determined that the abnormal location result includes that the thread running by the target electronic device causes the information of the target FRU and the information of the target FRU stored in the shared memory to be modified.
3. The abnormality locating method according to claim 1, characterized in that: The obtaining of the abnormality locating result of the information information of the target FRU based on whether the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory includes: When it is determined that the information of the target FRU stored in the shared memory is consistent with the information of the target FRU stored in the second non-volatile memory, it is determined that the abnormality locating result includes that the information of the target FRU in the first non-volatile memory is abnormal.
4. The abnormality locating method according to claim 3, characterized in that: In the case where the information of the target field replaceable unit FRU in the target electronic device is acquired from the first non-volatile memory in the target electronic device, before storing the information of the target FRU in the shared memory of the target electronic device and in the second non-volatile memory in the target electronic device respectively, the method further includes: Executing a thread for acquiring information about the target FRU from the first non-volatile memory, acquiring information about the target FRU from the first non-volatile memory; If the information of the FRU is not obtained from the first non-volatile memory, a new error file is created in the shared memory, and the thread for obtaining the information of the target FRU from the first non-volatile memory is continued to be executed until the information of the FRU is obtained from the first non-volatile memory, and if the information of the FRU is obtained from the first non-volatile memory, the error file is deleted from the shared memory.
5. The abnormality locating method according to claim 4, characterized in that: After determining that the abnormality location result includes that the information of the target FRU in the first non-volatile memory is abnormal, the method further includes: Acquire information of the target FRU from the first non-volatile memory via a data bus, wherein the data bus includes an IIC bus; comparing the information of the target FRU acquired through the data bus with the information of the target FRU; In a case where the information of the target FRU acquired through the data bus is the same as the information of the target FRU, the abnormality locating result is verified to be true.
6. The abnormality locating method according to claim 5, characterized in that: In the case where the information information of the target FRU obtained through the data bus is the same as the information information of the target FRU, after verifying that the abnormality locating result is true, the method further includes: Updating the information of the target FRU in the first non-volatile memory; Executing the thread, obtaining updated information of the target FRU from the first non-volatile memory, and obtaining updated information of the target FRU from the first non-volatile memory through the data bus; Comparing the updated information of the target FRU obtained through the data bus with the updated information of the target FRU obtained by executing the thread; In a case where the updated information of the target FRU obtained through the data bus is different from the updated information of the target FRU obtained by executing the thread, determining that the abnormality locating result also includes that an abnormality exists in the data bus.
7. The abnormality locating method according to claim 1, characterized in that: In the case where an expander chip is configured in the target electronic device and the first non-volatile memory is a device hanging down from the expander chip, the abnormality locating result of the information information of the target FRU is obtained based on whether the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory, including: When it is determined that the information of the target FRU stored in the shared memory is inconsistent with the information of the target FRU stored in the second non-volatile memory, it is determined that the abnormal location result includes that the thread running by the target electronic device causes the information of the target FRU and the information of the target FRU stored in the shared memory to be modified; when it is determined that the information of the target FRU stored in the shared memory is consistent with the information of the target FRU stored in the second non-volatile memory, it is determined that the abnormal location result includes that the expander chip causes the information information of the target FRU to be abnormal.
8. The abnormality locating method according to any one of claims 1 to 7, characterized in that: The determining whether the information of the target FRU is abnormal includes: Check whether the information of the target FRU includes garbled information; When it is determined that the information of the target FRU includes garbled information, it is determined that the information of the target FRU is abnormal.
9. An abnormality locating device, characterized in that: include: an information acquisition module, configured to, when acquiring information of a target field replaceable unit FRU in the target electronic device from a first non-volatile memory in the target electronic device, store the information of the target FRU in a shared memory of the target electronic device and in a second non-volatile memory in the target electronic device respectively; an abnormality judgment module, used for judging whether the information of the target FRU is abnormal, and when it is determined that the information of the target FRU is abnormal, comparing the information of the target FRU with the information of the target FRU stored in the shared memory; an information comparison module, for comparing the information of the target FRU stored in the shared memory with the information of the target FRU stored in the second non-volatile memory when determining that the information of the target FRU is the same as the information of the target FRU stored in the shared memory; The result output module is used to obtain the abnormal location result of the information information of the target FRU based on whether the information information of the target FRU stored in the shared memory is consistent with the information information of the target FRU stored in the second non-volatile memory.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the abnormality locating method according to any one of claims 1 to 8 is implemented.
11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the abnormality locating method according to any one of claims 1 to 8 is implemented.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the abnormality locating method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
BMC FRU fault recovery method and system
CN122195731A