Method, device and equipment for detecting memory power consumption reading abnormity and medium
By sending memory power consumption read requests to the management engine in the management controller of the target device and comparing the two acquired data, the problem of BMC obtaining memory power consumption abnormality detection through ME is solved, and the accuracy of automated detection and fault diagnosis is improved.
Patent Information
- Application Number
- CN202412000399.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art cannot automatically detect abnormal memory power consumption of BMCs through ME, resulting in inaccurate fault diagnosis and low debug efficiency.
By sending a memory power consumption read request to the management engine of the target device, the first memory power consumption data is obtained, and a preset target operation is performed to trigger a preset register reading, the second memory power consumption data is generated. Then, by comparing the two, determine whether there is an exception.
It realizes automated detection without manual intervention, improves the accuracy of power consumption-based fault diagnosis and Debug efficiency, and avoids adverse effects caused by BMC failed reading power consumption.
Smart Images

Figure CN119718898A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for detecting abnormal reading of memory power consumption. Background Art
[0002] At present, when the BMC (Baseboard Management Controller) obtains memory power consumption through the ME (Management Engine), if the communication between the BMC and the ME is abnormal, the memory power consumption cannot be obtained; or, if the ME is abnormal, the BMC will obtain incorrect memory power consumption data from the ME. If the BMC uses these incorrect data later, it will cause BMC abnormal alarms or cause the information displayed by the BMC to be incorrect, which will greatly affect the fault diagnosis based on power consumption. However, the current detection mostly relies on manual re-inspection, which cannot be discovered and handled in time.
[0003] It can be seen that how to automatically detect the abnormal memory power consumption obtained by the BMC through the ME and avoid the adverse effects caused by the failure of the BMC to obtain the memory power consumption is a problem that needs to be solved by those skilled in the art. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a method, device, equipment and medium for detecting abnormal reading of memory power consumption, which can solve the problem of how to automatically detect abnormal memory power consumption obtained by BMC through ME and avoid the adverse effects caused by BMC failure to obtain.
[0005] In order to solve the above technical problems, an embodiment of the present invention provides a method for detecting abnormal reading of memory power consumption, which is applied to a management controller in a target device, comprising:
[0006] Sending a memory power consumption read request to a management engine of a processor platform in a target device to obtain first memory power consumption data returned by the management engine;
[0007] After acquiring the first memory power consumption data, executing a preset target operation to trigger a preset register reading component to read data from a preset register of a target device, and generating corresponding second memory power consumption data based on the data reading result; wherein the preset register is used to store the memory energy consumption data of the target device;
[0008] By comparing the first memory power consumption data and the second memory power consumption data, it is determined whether the first memory power consumption data read from the management engine is abnormal.
[0009] Optionally, sending a memory power consumption read request to a management engine of a processor platform in a target device to obtain first memory power consumption data returned by the management engine includes:
[0010] Generate a corresponding memory power consumption read request based on a preset information index;
[0011] Sending a memory power consumption read request to a management engine of a processor platform in a target device through a first intelligent platform management interface, so that the management engine uses a preset information index in the memory power consumption read request to read data from a preset register of the target device, and uses the read register value to determine corresponding response information;
[0012] Response information sent by the management engine is obtained, and first memory power consumption data is determined based on a current value in the response information.
[0013] Optionally, after acquiring the first memory power consumption data, executing a preset target operation to trigger a preset register reading component to read data from a preset register of a target device includes:
[0014] After acquiring the first memory power consumption data, a preset flag is set so that the basic input / output system of the target device performs a flag detection operation during the startup phase to detect whether the management controller has set the preset flag, and determines whether to read data from the preset register of the target device based on the flag detection result.
[0015] Optionally, determining whether to read data from a preset register of a target device based on a flag bit detection result includes:
[0016] If the basic input and output system detects that the management controller has set the preset flag bit, then data is read from the preset register of the target device to obtain a corresponding first data reading result;
[0017] Correspondingly, generating corresponding second memory power consumption data based on the data reading result includes:
[0018] Acquire a first register value corresponding to a first moment and a second register value corresponding to a second moment from the first data reading result;
[0019] Determine a first total energy consumption corresponding to a first moment to a second moment based on a difference between a first register value and a second register value and a unit energy consumption corresponding to a predetermined unit register value;
[0020] Based on the time interval between the first moment and the second moment and the first total consumed energy, corresponding second memory power consumption data is generated.
[0021] Optionally, after acquiring the first memory power consumption data, executing a preset target operation to trigger a preset register reading component to read data from a preset register of a target device includes:
[0022] After obtaining the first memory power consumption data, if the startup end flag of the basic input / output system of the target device is obtained, the system control interrupt is triggered by lowering the level of the general input / output interface, so that after the system control interrupt is detected, the data of the preset register of the target device is read through the target code based on the advanced configuration and power management interface source language.
[0023] Optionally, after detecting a system control interrupt, data reading of a preset register of a target device is completed through a target code based on an advanced configuration and power management interface source language, including:
[0024] After the system control interrupt is detected, data is read from a preset register of the target device through a target code based on the source language of the advanced configuration and power management interface to obtain a corresponding second data reading result;
[0025] Correspondingly, generating corresponding second memory power consumption data based on the data reading result includes:
[0026] Obtaining a third register value corresponding to a third moment and a fourth register value corresponding to a fourth moment from the second data reading result;
[0027] Determine a second total energy consumption corresponding to the third moment to the fourth moment based on a difference between the third register value and the fourth register value and a unit energy consumption corresponding to a predetermined unit register value;
[0028] Based on the time interval between the third moment and the fourth moment and the second total consumed energy, corresponding second memory power consumption data is generated.
[0029] Optionally, comparing the first memory power consumption data with the second memory power consumption data to determine whether the first memory power consumption data read from the management engine is abnormal includes:
[0030] Acquire the second memory power consumption data returned by the preset register reading component through the second intelligent platform management interface;
[0031] By comparing the first memory power consumption data and the second memory power consumption data to see whether they are consistent in size, a corresponding data comparison result is determined;
[0032] If the data comparison result shows inconsistency, it is determined that the first memory power consumption data read from the management engine is abnormal, a corresponding alarm operation is triggered, and the first memory power consumption data and the second memory power consumption data are stored in the maintenance log;
[0033] If the data comparison result shows consistency, it is determined that there is no abnormality in the first memory power consumption data read from the management engine.
[0034] In a second aspect, the present invention discloses a device for detecting abnormal reading of memory power consumption, which is applied to a management controller in a target device, comprising:
[0035] A first data acquisition module, used to send a memory power consumption reading request to a management engine of a processor platform in a target device to obtain first memory power consumption data returned by the management engine;
[0036] A second data acquisition module is used to execute a preset target operation after acquiring the first memory power consumption data, so as to trigger the preset register reading component to read data from the preset register of the target device, and generate corresponding second memory power consumption data based on the data reading result; wherein the preset register is used to store the memory energy consumption data of the target device;
[0037] The data comparison module is used to determine whether the first memory power consumption data read from the management engine is abnormal by comparing the first memory power consumption data with the second memory power consumption data.
[0038] In a third aspect, the present invention discloses an electronic device, comprising:
[0039] Memory, used to store computer programs;
[0040] The processor is used to execute a computer program to implement the steps of the aforementioned method for detecting abnormal reading of memory power consumption.
[0041] In a fourth aspect, the present invention discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned method for detecting abnormal memory power consumption reading are implemented.
[0042] It can be seen that the present invention, through the management controller applied in the target device, includes: sending a memory power consumption reading request to the management engine of the processor platform in the target device to obtain the first memory power consumption data returned by the management engine; after obtaining the first memory power consumption data, executing a preset target operation to trigger the preset register reading component to read data from the preset register of the target device, and generating corresponding second memory power consumption data based on the data reading result; wherein the preset register is used to store the memory energy consumption data of the target device; by comparing the first memory power consumption data with the second memory power consumption data, it is determined whether the first memory power consumption data read from the management engine is abnormal. That is, the present invention provides a method for detecting abnormal memory power consumption reading based on the processor platform, firstly, the management controller in the target device obtains the first memory power consumption data by sending a memory power consumption reading request to the management engine of the processor platform in the target device, and after obtaining the first memory power consumption data, executing a preset target operation to trigger the preset register reading component to read data from the preset register of the target device, and generating second memory power consumption data based on the data reading result, and then, the management controller compares the first memory power consumption data with the second memory power consumption data to determine whether the first memory power consumption data read from the management engine is abnormal. The beneficial effects of the present invention are that, on the one hand, it can timely and reliably automatically detect whether the memory power consumption data read by the management engine is accurate without human intervention, thereby improving the accuracy of power consumption-based fault diagnosis and improving Debug efficiency; on the other hand, it can prevent the adverse effects caused by the failure of BMC to read power consumption and report it by the local basic input and output system or the local operating system. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only 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.
[0044] Figure 1 A flow chart of a method for detecting abnormal reading of memory power consumption provided by an embodiment of the present invention;
[0045] Figure 2 A hardware framework diagram provided for an embodiment of the present invention;
[0046] Figure 3 A specific second memory power consumption data acquisition flow chart provided by an embodiment of the present invention;
[0047] Figure 4A schematic diagram of a power consumption anomaly detection process under a basic input and output system provided by an embodiment of the present invention;
[0048] Figure 5 A specific second memory power consumption data acquisition flow chart provided by an embodiment of the present invention;
[0049] Figure 6 A schematic diagram of a power consumption anomaly detection process under an operating system provided by an embodiment of the present invention;
[0050] Figure 7 A schematic diagram of the structure of a device for detecting abnormal reading of memory power consumption provided by an embodiment of the present invention;
[0051] Figure 8 A structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0053] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0054] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0055] See also Figure 1 As shown, an embodiment of the present invention discloses a method for detecting abnormal reading of memory power consumption, which is applied to a management controller in a target device. The method includes:
[0056] Step S11: sending a memory power consumption reading request to a management engine of a processor platform in a target device to obtain first memory power consumption data returned by the management engine.
[0057] In this embodiment, it should be pointed out that in order to monitor the memory power consumption obtained by the management controller, a mechanism is established in the CPU (Central Processing Unit) and the management controller in the target device to monitor the memory power consumption. The monitoring programs at both locations will automatically detect whether the management controller successfully obtains the memory power consumption data, and whether the obtained memory power consumption data is abnormal. The management controller can be a BMC, and the corresponding hardware block diagram can be specifically as follows: Figure 1 shown. Figure 1 In hardware, the management controller and CPU are connected through the GPIO (General Purpose Input / Output) interface, and the GPIO is configured as SCI (System Control Interrupt). In this way, the management controller can pull down the level of the general purpose input / output interface to create an interrupt.
[0058] Specifically, regarding the specific process of obtaining memory power consumption data through the management engine of the processor platform, in this embodiment, the management controller generates a corresponding memory power consumption read request based on the preset information index, and then sends the memory power consumption read request to the management engine of the processor platform in the target device through the first intelligent platform management interface, so that the management engine uses the preset information index in the memory power consumption read request to read the preset register of the target device, and uses the read register value to determine the corresponding response information, and then obtains the response information sent by the management engine, and determines the first memory power consumption data based on the current value in the response information. In other words, the corresponding raw data can be obtained by sending a memory power consumption read request, and then the raw data in the response information is parsed to convert it into memory power consumption data, so as to obtain the first memory power consumption data. It should be pointed out that in this embodiment, the management engine specifically calculates the first memory power consumption data by accessing and reading the preset register of the target device based on the sampling interval.
[0059] Step S12: After obtaining the first memory power consumption data, execute a preset target operation to trigger a preset register reading component to read data from a preset register of the target device, and generate corresponding second memory power consumption data based on the data reading result; wherein the preset register is used to save the memory energy consumption data of the target device.
[0060] In this embodiment, after obtaining the first memory power consumption data, the corresponding preset target operation will be executed, including the setting of the flag bit and the triggering of the system control interrupt, so as to trigger the detection of the memory power consumption status in both BIOS (Basic Input Output System) and OS (Operating System).
[0061] Specifically, during the BIOS startup process, specifically the BIOS POST process, after obtaining the first memory power consumption data, a preset flag is set so that the basic input and output system of the target device performs a flag detection operation during the startup phase to detect whether the management controller has set the preset flag, and determines whether to read data from the preset register of the target device based on the flag detection result. It should be pointed out that the preset flag is a flag predefined by the management controller and the basic input and output system before the detection begins, and the preset register can be an MSR register (Model Specific Register). By setting the preset flag after reading the first memory power consumption data, positioning is performed when the preset flag is detected to have been set, and triggering the corresponding preset register data reading operation, so as to determine the second memory power consumption data by calculation based on the data reading result.
[0062] Further, regarding the detection process when the host (i.e., CPU) is in the OS state, it is different from BIOS POST and requires the trigger condition of system control interrupt. Specifically, in this embodiment, after obtaining the first memory power consumption data, if the startup end mark of the basic input and output system of the target device is obtained, the system control interrupt is triggered by lowering the level of the general input and output interface, so that after monitoring the system control interrupt, the data of the preset register of the target device is read through the target code based on the source language of the advanced configuration and power management interface. Among them, the source language of the advanced configuration and power management interface is the ACPI (Advanced Configuration and Power Interface) source language. That is to say, after completing the startup of the basic input and output system, the management controller can trigger the system control interrupt and inform the operating system by lowering the level of the general input and output interface when it is necessary to detect the memory power consumption data. The operating system enters the interrupt after receiving the corresponding interrupt signal, and reads the data of the preset register of the target device by running the target code based on the source language of the advanced configuration and power management interface to calculate the corresponding second memory power consumption data.
[0063] In addition, since the host is in OS state, some tools such as PTAT (Passive Transfer Activation Time) can be used to directly obtain the memory power consumption and then send it to the management controller.
[0064] Step S13: Determine whether the first memory power consumption data read from the management engine is abnormal by comparing the first memory power consumption data with the second memory power consumption data.
[0065] In this embodiment, after the first memory power consumption data and the second memory power consumption data are obtained, the corresponding data pair can be triggered to determine whether the first memory power consumption data is abnormal. Specifically, since both the basic input and output system and the operating system can return the generated second memory power consumption data to the management controller through the IPMI (Intelligent Platform Management Interface) instruction, it is first necessary to obtain the second memory power consumption data returned by the preset register reading component through the second intelligent platform management interface, and then compare the first memory power consumption data and the second memory power consumption data to determine the corresponding data comparison result. If the data comparison result shows that the sizes of the above two memory power consumption data are inconsistent, it is determined that the first memory power consumption data read from the management engine is abnormal, triggering the corresponding alarm operation, and storing the first memory power consumption data and the second memory power consumption data in the maintenance log. If the data comparison result shows that the sizes of the above two memory power consumption data are consistent, it is determined that the first memory power consumption data read from the management engine is not abnormal. That is to say, this embodiment realizes abnormality detection by comparing the sizes of the two memory power consumption data. If the sizes are inconsistent, that is, after the first memory power consumption data is found to be wrong, an alarm can be automatically issued and the first memory power consumption data read from the management engine and the second memory power consumption data generated based on the preset register reading component can be recorded and written into the maintenance log.
[0066] In this way, the abnormality of memory power consumption obtained by the management controller through the management engine can be automatically detected. The detection process covers the BIOS POST process and the OS, and can ensure that the memory power consumption read by the management controller is correct. The management controller and the management engine communicate through IPMI commands, and there is a probability of communication abnormality. At the same time, due to the excessive load of the management controller itself, it may not be able to respond to the IPMI command in time, resulting in data delay and timeout alarm. In addition, the management engine also has abnormal conditions. At this time, the management controller will not be able to obtain the memory power consumption. Based on the above situations, the present invention provides an enhanced solution that can detect whether the management controller has correctly obtained the memory power consumption information. This process does not require human intervention. After the error is found, an alarm is automatically issued and the original data is recorded, which is particularly helpful for the accuracy of fault diagnosis and greatly improves the Debug efficiency.
[0067] Further, such as Figure 3 As shown, the basic input and output system detects the preset flag bit that has been set by the management controller, reads the preset register and generates corresponding second memory power consumption data, including the following steps:
[0068] Step S21: If the basic input and output system detects that the management controller has set the preset flag, data is read from the preset register of the target device to obtain a corresponding first data reading result.
[0069] Combination Figure 4 As shown, in this embodiment, the basic input and output system needs to perform some system initialization during the startup process, and after the initialization is completed, it detects whether the management controller has set the preset flag. If the flag detection result obtained indicates that the preset flag set by the management controller has been detected, the preset register is read based on the preset flag.
[0070] Regarding the specific preset register reading, in a specific embodiment, taking the Hewitt Lake SOC (Systemon Chip) as an example, the SOC has a corresponding hardware circuit inside to monitor the power consumption of the memory, and also provides an interface to query the register value. The specific query location, that is, the preset register can be the MSR 0x619 register, which is the DDR (Double Data Rate Synchronous Dynamic Random Access Memory) energy status register, which will reflect the monitored memory energy loss within a certain period of time. Combined with the above register description, this is an energy counter, which represents the energy value consumed by the memory. This embodiment can use this counter to calculate the power, that is, the memory power consumption data. The algorithm description formula can be:
[0071] ;
[0072] In the formula, Power represents power, Value represents energy value, t represents time interval, and t+x and x represent two values read from the preset register. This formula is the energy consumed in a unit time interval, that is, the consumed electrical energy. This formula is a measure of energy conversion, which represents the change of energy in a certain period of time. Examples of algorithm application are as follows:
[0073] The value of the MSR 0x619 register is read with a timer at intervals of about 1 second. The first data read result may have two values, for example, the two values may be 0x25621919 and 0x25619ca7.
[0074] Furthermore, in the specific implementation process, different register value query interfaces can be pre-configured for different registers or time intervals t, so that when the preset register or time interval t needs to be replaced, the corresponding interface can be directly called from the pre-configured register value query interface to continue memory power consumption reading anomaly detection. If a new register or time interval is replaced, the configuration can be performed with reference to the interface pre-configured for other registers or time intervals.
[0075] Step S22: acquiring a first register value corresponding to the first moment and a second register value corresponding to the second moment from the first data reading result.
[0076] In this embodiment, after obtaining the first data reading result, the first register value corresponding to the first moment is obtained, that is, x in the above formula, which can be specifically 0x25619ca7. The second register value corresponding to the second moment is obtained, that is, t+x in the above formula, which can be specifically 0x25621919. The difference between the two is the energy consumed in the 1 second time interval.
[0077] Step S23: Determine a first total energy consumption corresponding to the first moment to the second moment based on the difference between the first register value and the second register value and a unit energy consumption corresponding to a predetermined unit register value.
[0078] In this embodiment, after determining the first register value and the second register value, calculation is performed, but attention should be paid to the unit. Taking DRAM domain (Dynamic Random Access Memory domain) as an example, the energy value of its unit, that is, the unit register value is 15.3µJ. In a specific embodiment, substituting into the formula will yield: Value(t+x)–Value(x)=(0x25621919–0x25619ca7)*15.3µJ=487427.4µJ≈0.487J.
[0079] Step S24: Generate corresponding second memory power consumption data based on the time interval between the first moment and the second moment and the first total consumed energy.
[0080] In this embodiment, the time interval between the first moment and the second moment is determined, and then the ratio of the first total energy consumption to the time interval is calculated to generate the corresponding second memory power consumption data. In a specific embodiment, the sampling time is close to 1s, and in order to simplify the calculation, the power value P=0.487W can be obtained. At this point, the power value of the memory is calculated, that is, the second memory power consumption data.
[0081] In addition, since the management engine also calculates the first memory power consumption data by reading data from a preset register of the target device, and the sampling interval of the management engine is also 1s, the management engine can also determine the first memory power consumption data through the above steps.
[0082] Further, such as Figure 5 As shown, after the system control interrupt is detected, the operating system reads the preset register and generates corresponding second memory power consumption data through the target code based on the advanced configuration and power management interface source language, including the following steps:
[0083] Step S31: after detecting a system control interruption, data is read from a preset register of a target device through a target code based on an advanced configuration and power management interface source language to obtain a corresponding second data reading result.
[0084] In this embodiment, after the system control interrupt is detected, the operating system enters the interrupt and runs the target code based on the source language of the advanced configuration and power management interface. Then the target code reads data from the preset register and obtains a second data reading result such as the first data reading result recorded in step S21.
[0085] Step S32: acquiring a third register value corresponding to the third moment and a fourth register value corresponding to the fourth moment from the second data reading result.
[0086] In this embodiment, as shown in step S22, the third register value corresponding to the third moment is obtained from the second data reading result as x in the formula, and the fourth register value corresponding to the fourth moment is obtained as t+x in the formula.
[0087] Step S33: Determine the second total energy consumption corresponding to the third moment to the fourth moment based on the difference between the third register value and the fourth register value and the unit energy consumption corresponding to the predetermined unit register value.
[0088] In this embodiment, in combination with the content described in step S23, the second total energy consumption corresponding to the third moment to the fourth moment is determined using the determined third register value and fourth register value and the corresponding unit register value.
[0089] Step S34: Generate corresponding second memory power consumption data based on the time interval between the third moment and the fourth moment and the second total consumed energy.
[0090] In this embodiment, the time interval between the third moment and the fourth moment is determined, and then the ratio of the second total energy consumption to the time interval is calculated to generate corresponding second memory power consumption data.
[0091] It can be seen that the present invention obtains the first memory power consumption data by sending a memory power consumption reading request to the management engine of the processor platform in the target device through the management controller applied in the target device, and then, the preset flag bit is set or the system control interrupt is triggered correspondingly under the basic input and output system or the operating system, so that the basic input and output system or the operating system reads the data of the preset register of the target device through the preset flag bit or the system control interrupt, and generates the corresponding second memory power consumption data based on the first or second data reading result, and then, the management controller obtains the second memory power consumption data through the second intelligent platform management interface corresponding to the basic input and output system or the operating system, and compares the first memory power consumption data with the second memory power consumption data to determine whether there is an abnormality in the first memory power consumption data read from the management engine, and if there is an abnormality, an alarm is triggered and the first and second memory power consumption data obtained are recorded. The beneficial effect of the present invention is that, on the one hand, it can automatically detect whether the memory power consumption data read by the management engine is accurate in a timely and reliable manner without manual intervention, thereby improving the accuracy of fault diagnosis based on power consumption and improving Debug efficiency; on the other hand, it can prevent the adverse effects caused by the failure of BMC to read power consumption, and report by the local basic input and output system or the local operating system.
[0092] See also Figure 7As shown, an embodiment of the present invention discloses a device for detecting abnormal reading of memory power consumption, which is applied to a management controller in a target device, and the device includes:
[0093] A first data acquisition module 11 is used to send a memory power consumption reading request to a management engine of a processor platform in a target device to obtain first memory power consumption data returned by the management engine;
[0094] The second data acquisition module 12 is used to perform a preset target operation after acquiring the first memory power consumption data, so as to trigger the preset register reading component to read data from the preset register of the target device, and generate corresponding second memory power consumption data based on the data reading result; wherein the preset register is used to store the memory energy consumption data of the target device;
[0095] The data comparison module 13 is used to determine whether the first memory power consumption data read from the management engine is abnormal by comparing the first memory power consumption data with the second memory power consumption data.
[0096] Since the embodiments of the device part correspond to the above embodiments, please refer to the description of the embodiments of the method part for the embodiments of the device part, and will not be repeated here.
[0097] It can be seen that the present invention provides a method for detecting abnormal memory power consumption reading based on a processor platform. First, the management controller in the target device obtains the first memory power consumption data by sending a memory power consumption reading request to the management engine of the processor platform in the target device, and performs a preset target operation after obtaining the first memory power consumption data to trigger the preset register reading component to read the data of the preset register of the target device, and generate the second memory power consumption data based on the data reading result. Then, the management controller compares the first memory power consumption data with the second memory power consumption data to determine whether there is an abnormality in the first memory power consumption data read from the management engine. The beneficial effect of the present invention is that, on the one hand, it can automatically detect whether the memory power consumption data read by the management engine is accurate in a timely and reliable manner without manual intervention, thereby improving the accuracy of fault diagnosis based on power consumption and improving Debug efficiency; on the other hand, it can prevent the adverse effects caused by the failure of BMC to read power consumption, and report by the local basic input and output system or the local operating system.
[0098] Furthermore, an embodiment of the present invention also discloses an electronic device, Figure 8It is a structural diagram of an electronic device according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of the present invention. The electronic device may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input-output interface 25 and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the detection method of abnormal memory power consumption reading disclosed in any of the aforementioned embodiments. In addition, the electronic device in this embodiment may specifically be an electronic computer.
[0099] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present invention, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0100] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0101] The operating system 221 is used to manage and control various hardware devices on the electronic device and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the memory power consumption reading abnormality detection method performed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0102] Furthermore, the present invention also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed method for detecting abnormal reading of memory power consumption is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.
[0103] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0104] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0105] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0106] 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 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 device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0107] The technical solution provided by the present invention is introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for detecting abnormal reading of memory power consumption, characterized in that: The management controller used in the target device includes: Sending a memory power consumption read request to a management engine of a processor platform in the target device to obtain first memory power consumption data returned by the management engine; After acquiring the first memory power consumption data, executing a preset target operation to trigger a preset register reading component to read data from a preset register of the target device, and generating corresponding second memory power consumption data based on the data reading result; wherein the preset register is used to store the memory energy consumption data of the target device; By comparing the first memory power consumption data and the second memory power consumption data, it is determined whether the first memory power consumption data read from the management engine is abnormal.
2. The method for detecting abnormal reading of memory power consumption according to claim 1, characterized in that: The sending a memory power consumption read request to a management engine of a processor platform in the target device to obtain first memory power consumption data returned by the management engine includes: Generate a corresponding memory power consumption read request based on a preset information index; Sending the memory power consumption reading request to the management engine of the processor platform in the target device through the first intelligent platform management interface, so that the management engine uses the preset information index in the memory power consumption reading request to read data from the preset register of the target device, and uses the read register value to determine the corresponding response information; The response information sent by the management engine is obtained, and first memory power consumption data is determined based on a current value in the response information.
3. The method for detecting abnormal reading of memory power consumption according to claim 1, characterized in that: After acquiring the first memory power consumption data, executing a preset target operation to trigger a preset register reading component to read data from a preset register of the target device includes: After acquiring the first memory power consumption data, a preset flag is set so that the basic input / output system of the target device performs a flag detection operation during the startup phase to detect whether the management controller has set the preset flag, and determines whether to read data from the preset register of the target device based on the flag detection result.
4. The method for detecting abnormal reading of memory power consumption according to claim 3, characterized in that: The determining whether to read data from a preset register of the target device based on the flag bit detection result includes: If the basic input and output system detects that the management controller has set the preset flag bit, then reading data from the preset register of the target device to obtain a corresponding first data reading result; Correspondingly, the generating corresponding second memory power consumption data based on the data reading result includes: Acquire a first register value corresponding to a first moment and a second register value corresponding to a second moment from the first data reading result; Determine a first total energy consumption corresponding to the first moment to the second moment based on a difference between the first register value and the second register value and a unit energy consumption corresponding to a predetermined unit register value; Based on the time interval between the first moment and the second moment and the first total consumed energy, corresponding second memory power consumption data is generated.
5. The method for detecting abnormal reading of memory power consumption according to claim 1, characterized in that: After acquiring the first memory power consumption data, executing a preset target operation to trigger a preset register reading component to read data from a preset register of the target device includes: After obtaining the first memory power consumption data, if the startup end flag of the basic input / output system of the target device is obtained, the system control interrupt is triggered by lowering the level of the general input / output interface, so that after the system control interrupt is detected, the data of the preset register of the target device is read through the target code based on the advanced configuration and power management interface source language.
6. The method for detecting abnormal reading of memory power consumption according to claim 5, characterized in that: After the system control interrupt is detected, the data of the preset register of the target device is read through the target code based on the source language of the advanced configuration and power management interface, including: After the system control interrupt is detected, data is read from a preset register of the target device through a target code based on an advanced configuration and power management interface source language to obtain a corresponding second data reading result; Correspondingly, the generating corresponding second memory power consumption data based on the data reading result includes: Acquire a third register value corresponding to a third moment and a fourth register value corresponding to a fourth moment from the second data reading result; Determine a second total energy consumption corresponding to the third moment to the fourth moment based on a difference between the third register value and the fourth register value and a unit energy consumption corresponding to a predetermined unit register value; Based on the time interval between the third moment and the fourth moment and the second total consumed energy, corresponding second memory power consumption data is generated.
7. The method for detecting abnormal reading of memory power consumption according to any one of claims 1 to 6, characterized in that: The comparing the first memory power consumption data and the second memory power consumption data to determine whether the first memory power consumption data read from the management engine is abnormal includes: Acquire the second memory power consumption data returned by the preset register reading component through the second intelligent platform management interface; Determine a corresponding data comparison result by comparing the first memory power consumption data and the second memory power consumption data to see whether they are consistent in size; If the data comparison result shows inconsistency, it is determined that the first memory power consumption data read from the management engine is abnormal, a corresponding alarm operation is triggered, and the first memory power consumption data and the second memory power consumption data are stored in a maintenance log; If the data comparison result shows consistency, it is determined that there is no abnormality in the first memory power consumption data read from the management engine.
8. A device for detecting abnormal reading of memory power consumption, characterized in that: The management controller used in the target device includes: A first data acquisition module, configured to send a memory power consumption reading request to a management engine of a processor platform in the target device to obtain first memory power consumption data returned by the management engine; A second data acquisition module is used to execute a preset target operation after acquiring the first memory power consumption data, so as to trigger a preset register reading component to read data from a preset register of the target device, and generate corresponding second memory power consumption data based on the data reading result; wherein the preset register is used to store the memory energy consumption data of the target device; The data comparison module is used to determine whether the first memory power consumption data read from the management engine is abnormal by comparing the first memory power consumption data with the second memory power consumption data.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the method for detecting abnormal reading of memory power consumption as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for detecting abnormal memory power consumption reading as claimed in any one of claims 1 to 7 are implemented.