Interruption time acquisition method, device, system, communication equipment and storage medium

By using the timing module and IPMI to obtain the total time of SMI in the operating system, the problem of low efficiency in obtaining SMI in the prior art is solved, and simple and efficient SMI time acquisition and data interaction are achieved, thereby reducing server costs.

CN116185799BActive Publication Date: 2025-08-29INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310139180.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-20
Publication Date
2025-08-29
Estimated Expiration
2043-02-20

AI Technical Summary

Technical Problem

In the prior art, the time it takes to obtain errors to trigger system management interruption SMI to end SMI is less efficient, and additional OS login permission is required, resulting in complex process.

Method used

When an operating system error is detected through the timing module, it uses the timing register to obtain the total time of SMI and store it in shared memory. It combines the time of sending information with IPMI and obtains it out of band through the BMC time analysis module to avoid additional OS permissions.

Benefits of technology

It improves the acquisition efficiency of total SMI usage time, simplifies the process, and realizes data interaction between BMC and BIOS through IPMI, reducing server system costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116185799B_ABST
    Figure CN116185799B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a method, apparatus, communication device, and storage medium for obtaining interrupt time, including: when an error is detected during OS runtime, triggering an SMI, a timing module obtains the total SMI time and the IPMI information sending time through a timing register, wherein the IPMI information sending time is the time it takes for the timing module to obtain an error record from a register storing error records and send the error record to the BMC through IPMI; a BMC time analysis module obtains the IPMI information sending time and the total SMI time from shared memory by cyclically reading and updating a flag bit. Obtaining the interrupt time through the BMC time analysis module, i.e., obtaining the total SMI time out-of-band, does not require additional OS login permissions, and the process of obtaining the total SMI time is relatively simple, solving the problem of low efficiency in obtaining the time spent from error-triggered SMI to SMI termination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer application technology, and in particular to an interruption time acquisition method, device, system, communication equipment and storage medium. Background Art

[0002] Today's computers typically run 24 / 7. It's normal for operating systems (OSs) to experience some errors. However, if CE errors or non-fatal errors occur too frequently, and the time it takes from the error triggering a System Management Interrupt (SMI) to its termination is excessive, it can easily disrupt normal business operations. Therefore, it's crucial to determine the time it takes from the error triggering an SMI to its termination.

[0003] In the existing technology, the time spent in-band from error-triggered SMI to SMI end is generally obtained by obtaining OS login permissions. However, this existing method not only requires additional OS login permissions, but also the time spent in-band from error-triggered SMI to SMI end is relatively complicated. Therefore, this method will lead to the problem of low efficiency in the time spent in obtaining error-triggered SMI to SMI end. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide a method, apparatus, system, communication device, and storage medium for obtaining interrupt time, which solves the problem of low efficiency of the time spent from the error triggering SMI to the end of SMI due to the need to obtain additional OS login permissions and the complexity of the time spent in-band obtaining the time spent from the error triggering SMI to the end of SMI. The specific technical solution is as follows:

[0005] In a first aspect of the present invention, a method for obtaining an interruption time is provided, the method comprising:

[0006] When an error is detected during the operation of the operating system OS and a system management interrupt SMI is triggered, the timing module obtains the total SMI time through the timing register and stores the total SMI time in the shared memory;

[0007] The timing module obtains the time taken by the intelligent platform management interface IPMI to send information through the timing register, stores the time taken by the IPMI to send information in the shared memory, and sets the update flag bit of the shared memory to 1, wherein the time taken by the IPMI to send information is the time taken by the timing module to obtain the error record from the register storing the error record and send the error record to the baseboard management controller BMC through the IPMI;

[0008] The BMC time analysis module obtains the IPMI information sending time and the SMI total time from the shared memory by cyclically reading and updating the flag bit.

[0009] Optionally, before the step of detecting that an error occurs during the operation of the operating system OS and triggering a system management interrupt SMI, the method further includes:

[0010] When a power-on instruction is received, the service initialization module initializes the BIOS runtime service memory and the BIOS runtime service.

[0011] Optionally, before the step of the timing module acquiring the time taken by the intelligent platform management interface IPMI to send information through the timing register, the method further includes:

[0012] The BMC initialization module pre-allocates a shared memory and maps the shared memory to the BIOS memory, so that the BIOS and the BMC can read and write to the shared memory.

[0013] Optionally, the method further includes:

[0014] The BMC time analysis module accesses the shared memory and reads the update flag of the shared memory;

[0015] Determine whether the update flag of the shared memory is 1;

[0016] If it is 1, a log is generated based on the acquired IPMI information sending time, the SMI total time, the number of SMI triggers and the error type, and the log is stored in the BMC memory according to the preset data storage format, and the update flag of the shared memory is set to 0.

[0017] Optionally, the method further includes:

[0018] The BMC time analysis module determines, based on the logs stored in the memory of the BMC, whether the number of the logs is greater than a preset first threshold;

[0019] If it is greater, a drawing tool is called to perform data analysis on the log and visualize the log.

[0020] Optionally, the method further includes:

[0021] The BMC time analysis module determines, based on the logs stored in the memory of the BMC, whether the number of the logs is greater than a preset second threshold;

[0022] If it is greater than, performing data analysis on the log by calling a drawing tool to generate visual data, and sending the visual data to the user, wherein the visual data may include the maximum value of the total SMI time, and determining whether the maximum value of the total SMI time is greater than a preset third threshold based on the visual data;

[0023] If it is greater, an alarm message is generated and sent to the user.

[0024] In a second aspect of the present invention, there is also provided an interruption time acquisition device, comprising:

[0025] An SMI total time acquisition module is configured to, when an error is detected during the operation of the operating system OS and a system management interrupt SMI is triggered, obtain the SMI total time through the timing register by the timing module and store the SMI total time in the shared memory;

[0026] An IPMI information sending time acquisition module, configured for the timing module to obtain the time taken by the intelligent platform management interface IPMI to send information through the timing register, store the IPMI information sending time in the shared memory, and set the update flag of the shared memory to 1, wherein the IPMI information sending time is the time taken by the timing module to obtain the error record from the register storing the error record and send the error record to the baseboard management controller BMC through the IPMI;

[0027] The interruption time acquisition module is used for the BMC time analysis module to obtain the IPMI information sending time and the SMI total time from the shared memory by cyclically reading and updating the flag bit.

[0028] Optionally, the device further comprises:

[0029] The initialization module is used to initialize the BIOS runtime service memory and the BIOS runtime service when a power-on instruction is received.

[0030] Optionally, the device further comprises:

[0031] The memory allocation module is used for the BMC initialization module to pre-allocate a shared memory and map the shared memory to the BIOS memory so that the BIOS and BMC can read and write to the shared memory.

[0032] Optionally, the device further comprises:

[0033] A module for reading an update flag is used for the BMC time analysis module to access the shared memory and read the update flag of the shared memory;

[0034] A first data judgment module is used to judge whether the update flag of the shared memory is 1;

[0035] A log generation module is used to generate a log based on the acquired IPMI information sending time, the SMI total time, the number of SMI triggers and the error type, if it is 1, and store the log in the BMC memory according to a preset data storage format, and set the update flag of the shared memory to 0.

[0036] Optionally, the device further comprises:

[0037] a second data judgment module, configured for the BMC time analysis module to judge whether the number of the logs is greater than a preset first threshold based on the logs stored in the memory of the BMC;

[0038] The data visualization display module is used to perform data analysis on the log by calling a drawing tool if it is greater than, and to visualize the log.

[0039] Optionally, the device further comprises:

[0040] a third data judgment module, configured for the BMC time analysis module to judge whether the number of the logs is greater than a preset second threshold based on the logs stored in the memory of the BMC;

[0041] a fourth data judgment module, configured to, if greater than, perform data analysis on the log by invoking a drawing tool to generate visual data, and send the visual data to a user, wherein the visual data may include the maximum value of the total SMI time, and to judge, based on the visual data, whether the maximum value of the total SMI time is greater than a preset third threshold;

[0042] The alarm module is used to generate an alarm message if it is greater than , and send the alarm message to the user.

[0043] In a third aspect of the present invention, a system for obtaining an interruption time is provided, comprising:

[0044] Service initialization module, used to initialize BIOS runtime service memory and BIOS runtime service;

[0045] a timing module, configured to obtain a total SMI time through a timing register, store the total SMI time in a shared memory, obtain a time taken by an intelligent platform management interface (IPMI) to send information through the timing register, store the time taken by the IPMI to send information in the shared memory, and set an update flag of the shared memory to 1, wherein the time taken by the IPMI to send information is the time taken by the timing module to obtain an error record from a register storing error records and send the error record to a baseboard management controller (BMC) through the IPMI;

[0046] The BMC time analysis module is used to obtain the IPMI information sending time and the SMI total time from the shared memory by cyclically reading and updating the flag bit.

[0047] In a fourth aspect of the present invention, there is further provided a communication device comprising: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor;

[0048] The processor is used to read the program in the memory to implement the interruption time acquisition method as described in any one of the first aspects.

[0049] In a fifth aspect of the present invention, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium. When the computer-readable storage medium is executed on a computer, the computer implements the interruption time acquisition method as described in any one of the first aspects.

[0050] The interruption time acquisition method provided by the embodiment of the present invention is as follows: when an error is detected during the operation of an operating system (OS) and a system management interrupt (SMI) is triggered, a timing module obtains the total SMI time through a timing register and stores the total SMI time in a shared memory; the timing module obtains the information sending time of an intelligent platform management interface (IPMI) through a timing register, stores the IPMI information sending time in a shared memory, and sets an update flag of the shared memory to 1, wherein the IPMI information sending time is the time taken by the timing module to obtain an error record from a register storing error records and send the error record to a baseboard management controller (BMC) through the IPMI; and the BMC time analysis module obtains the IPMI information sending time and the total SMI time from the shared memory by cyclically reading the update flag. The present invention obtains interrupt time through the BMC time analysis module included in the BMC, that is, obtains the total SMI time in an out-of-band manner, without the need to obtain additional OS login permissions to obtain the total SMI time in-band. This method of obtaining the total SMI time is simpler, thereby solving the technical problem of low efficiency in obtaining the total SMI time, and further achieving the technical effect of improving the efficiency of obtaining the total SMI time. In addition, the present invention realizes data interaction between the BMC and the BIOS through the IPMI. Since the IPMI can span different operating systems, firmware and hardware platforms, it can intelligently monitor, control and automatically report the operating conditions of a large number of servers, thereby achieving the technical effect of reducing the cost of the server system. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for describing the embodiments or the prior art.

[0052] Figure 1 The steps of the interruption time acquisition method provided by the embodiment of the present invention are as follows: Figure 1 ;

[0053] Figure 2 This is the step flow of the interruption time acquisition method provided by the embodiment of the present invention Figure 2 ;

[0054] Figure 3 This is the step flow of the interruption time acquisition method provided by the embodiment of the present invention Figure 3 ;

[0055] Figure 4 This is the step flow of the interruption time acquisition method provided by the embodiment of the present invention Figure 4 ;

[0056] Figure 5 This is a structural diagram of an interruption time acquisition device provided by an embodiment of the present invention;

[0057] Figure 6 This is a structural diagram of an interruption time acquisition system provided by an embodiment of the present invention;

[0058] Figure 7 This is a schematic diagram of a communication device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, each embodiment of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be understood by those skilled in the art that in each embodiment of the present invention, many technical details are provided to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in this application can be implemented. The division of the following embodiments is for convenience of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined with each other and referenced to each other under the premise that there is no contradiction.

[0060] Reference Figure 1 , showing the steps of the interruption time acquisition method provided by the embodiment of the present invention Figure 1 , the method may include:

[0061] Step 101: When an error is detected during the operation of the operating system (OS) and a system management interrupt (SMI) is triggered, the timing module obtains the total SMI time through the timing register and stores the total SMI time in the shared memory.

[0062] It should be noted that in an embodiment of the present invention, when a computer is started and an operating system (OS) generates an error during operation, and the error triggers a system management interrupt (SMI), the timing module contained in the basic input and output system (BIOS) can obtain the time taken by the error from triggering the system management interrupt to the end of the system management interrupt from the timing register integrated in the central processing unit (CPU), that is, the total SMI time. Specifically, the timing register can record time. When the error triggers the SMI, the timing module can directly obtain a time data recorded in the timing register when the error triggers the SMI from the timing register; when the SMI ends, the timing module can directly obtain a time data recorded in the timing register when the SMI ends from the timing register; the timing module can obtain a time data recorded in the timing register when the SMI is triggered based on the time data recorded in the timing register when the SMI is triggered and the time data recorded in the timing register when the SMI ends, and the total SMI time can be obtained by subtracting the two time data. After obtaining the total SMI time, the timing module included in the BIOS can temporarily store the total SMI time in the BIOS runtime service, and further send the total SMI time to the shared memory for storage, so that the BMC time analysis module can obtain the total SMI time from the shared memory.

[0063] Furthermore, in an embodiment of the present invention, before detecting that an error occurs during the operation of the operating system OS and triggering the system management interrupt SMI, the method also includes: when a power-on instruction is received, the service initialization module initializes the BIOS runtime service memory and BIOS runtime service.

[0064] It should be noted that, in the embodiment of the present invention, when the computer receives a power-on instruction, it starts the power-on process. During the power-on process, the service initialization module included in the BIOS executes the initialization of the BIOS runtime service memory and the BIOS runtime service.

[0065] The present invention initializes the BIOS runtime service memory and the BIOS runtime service through a service initialization module, thereby providing an operating space for the BIOS runtime service, namely, the BIOS runtime service memory, so that the BIOS runtime service can operate normally. Furthermore, the technical purpose of temporarily storing the total SMI time can be achieved through the BIOS runtime service.

[0066] Step 102: The timing module obtains the time taken by the intelligent platform management interface IPMI to send information through the timing register, stores the time taken by the IPMI to send information in the shared memory, and sets the update flag of the shared memory to 1, wherein the time taken by the IPMI to send information is the time taken by the timing module to obtain the error record from the register storing the error record and send the error record to the baseboard management controller BMC through the IPMI.

[0067] It should be noted that, in an embodiment of the present invention, the timing module included in the BIOS can also obtain the time taken by the Intelligent Platform Management Interface (IPMI) to send information through a timing register. The IPMI information sending time is the time taken by the timing module to obtain the error record from the register storing the error record and send the error record to the Baseboard Management Controller (BMC) through IPMI. Specifically, when obtaining the error record from the register storing the error record, the timing module can directly obtain, from the timing register, a time data recorded in the timing register when the error record was obtained from the register storing the error record; when sending the error record to the BMC through IPMI, the timing module can directly obtain, from the timing register, a time data recorded in the timing register when the error record was sent to the BMC; the timing module can obtain, based on the time data recorded in the timing register when the error record was obtained from the register storing the error record and the time data recorded in the timing register when the error record was sent to the BMC through IPMI, by subtracting the two time data to obtain the IPMI information sending time. After the timing module obtains the IPMI information sending time, it sends the IPMI information sending time to the shared memory allocated by the BMC for storage, and sets the update flag bit of the shared memory to 1.

[0068] Furthermore, in an embodiment of the present invention, before the step of the timing module obtaining the time taken by the intelligent platform management interface IPMI to send information through the timing register, the method also includes: the BMC initialization module pre-allocates a shared memory and maps the shared memory to the BIOS memory so that the BIOS and BMC can read and write access to the shared memory.

[0069] It should be noted that, in the embodiment of the present invention, the BMC initialization module included in the BMC can pre-allocate a shared memory and map the shared memory to the BIOS memory, so that the BIOS and the BMC can access the shared memory, read data, and write data.

[0070] The present invention maps a pre-set shared memory to the BIOS memory in the BIOS through a BMC initialization module included in the BMC, so that both the BIOS and the BMC can access the shared memory, read data, and write data. Furthermore, the technical purpose of storing the time used by IPMI to send information can be achieved through the shared memory.

[0071] Step 103: The BMC time analysis module obtains the IPMI information sending time and the SMI total time from the shared memory by cyclically reading and updating the flag bit.

[0072] It should be noted that, in the embodiment of the present invention, the BMC time analysis module included in the BMC can obtain the IPMI information sending time and the total SMI time from the shared memory by cyclically reading the update flag in the shared memory.

[0073] The interruption time acquisition method provided by the embodiment of the present invention is as follows: when an error is detected during the operation of an operating system (OS) and a system management interrupt (SMI) is triggered, a timing module obtains the total SMI time through a timing register and stores the total SMI time in a shared memory; the timing module obtains the information sending time of an intelligent platform management interface (IPMI) through a timing register, stores the IPMI information sending time in a shared memory, and sets an update flag of the shared memory to 1, wherein the IPMI information sending time is the time taken by the timing module to obtain an error record from a register storing error records and send the error record to a baseboard management controller (BMC) through the IPMI; and the BMC time analysis module obtains the IPMI information sending time and the total SMI time from the shared memory by cyclically reading the update flag. The present invention obtains interrupt time through the BMC time analysis module included in the BMC, that is, obtains the total SMI time in an out-of-band manner, without the need to obtain additional OS login permissions to obtain the total SMI time in-band. This method of obtaining the total SMI time is simpler, thereby solving the technical problem of low efficiency in obtaining the total SMI time, and further achieving the technical effect of improving the efficiency of obtaining the total SMI time. In addition, the present invention realizes data interaction between the BMC and the BIOS through the IPMI. Since the IPMI can span different operating systems, firmware and hardware platforms, it can intelligently monitor, control and automatically report the operating conditions of a large number of servers, thereby achieving the technical effect of reducing the cost of the server system.

[0074] Further, if Figure 2 As shown, in this embodiment of the present invention, the method may further include the following steps:

[0075] Step 201: The BMC time analysis module accesses the shared memory and reads the update flag of the shared memory.

[0076] Step 202: Determine whether the update flag of the shared memory is 1.

[0077] It should be noted that in the embodiment of the present invention, the BMC time analysis module included in the BMC can read the update flag of the shared memory by accessing the shared memory, wherein the update flag of the shared memory can be 1 or 0. When the BMC time analysis module reads the update flag of the shared memory, it determines whether the update flag of the shared memory is 1.

[0078] Step 203, if it is 1, then based on the acquired IPMI information sending time, SMI total time, SMI trigger times and error type, a log is generated, and the log is stored in the BMC memory according to the preset data storage format, and the update flag of the shared memory is set to 0.

[0079] It should be noted that in an embodiment of the present invention, when the BMC time analysis module determines that the shared memory update flag is 1, a log is generated based on the acquired IPMI information sending time, total SMI time, number of SMI triggers, and error type. The SMI trigger number and error type are specifically acquired by the BIOS sending the SMI trigger number and error type to the BMC via IPMI. The SMI trigger number refers to the number of times the current SMI has been triggered, and the error type may include, but is not limited to, memory ce, memory uce, CPU ce, IERR, PCIE CE, and PCIE UCE. After the BMC time analysis module generates the log, it may store the log in the BMC memory according to a pre-set data storage format, and set the shared memory update flag to 0. The pre-set data storage format may include the total SMI time, number of SMI triggers, error type, and IPMI information sending time.

[0080] The present invention generates a log using the BMC time analysis module included in the BMC to obtain the IPMI information sending time, SMI total time, SMI trigger times and error types, and stores the log in the BMC memory according to a preset data storage format, so that users can directly obtain detailed data generated from the error triggering the system management interrupt to the end of the system management interrupt through the BMC, thereby making it more convenient for developers, testers and customers to monitor the total SMI time. Furthermore, while improving the efficiency of obtaining the total SMI time, it also achieves the technical effect of improving user experience.

[0081] Further, if Figure 3 As shown, in this embodiment of the present invention, the method may further include the following steps:

[0082] Step 301 : The BMC time analysis module determines whether the number of logs is greater than a preset first threshold based on the logs stored in the memory of the BMC.

[0083] It should be noted that in this embodiment of the present invention, each time an SMI is erroneously triggered, the BMC time analysis module generates a log, resulting in multiple logs being stored in the BMC memory. Based on the number of logs stored in the BMC memory, the BMC time analysis module determines whether the number of logs exceeds a pre-set first threshold. The pre-set first threshold may be 10, and the present invention does not impose a specific limit on the value of the first threshold.

[0084] Step 302: If it is greater than, then a drawing tool is called to perform data analysis on the log and the log is visualized.

[0085] It should be noted that in this embodiment of the present invention, if the BMC time analysis module determines that the number of logs exceeds a preset first threshold, the BMC time analysis module will invoke a graphing tool to analyze all logs stored in the BMC's memory and visualize the logs. For example, the BMC time analysis module may invoke the Python graphing library Matplotlib to analyze all logs stored in the BMC's memory and generate a line graph that displays the average, maximum, and minimum total times taken to trigger n SMI interrupts.

[0086] The present invention uses the BMC time analysis module included in the BMC to visualize the log, allowing developers, testers, and customers to more intuitively monitor the total SMI time, thereby improving the user experience. In addition, the present invention automatically analyzes the log data by calling a drawing tool, avoiding the errors caused by manual log analysis, while also saving manpower time, providing great convenience for R&D testing, and having a very significant effect on the application scenario of fault diagnosis testing.

[0087] Furthermore, if Figure 4 As shown, in this embodiment of the present invention, the method may further include the following steps:

[0088] Step 401 : The BMC time analysis module determines whether the number of logs is greater than a preset second threshold based on the logs stored in the memory of the BMC.

[0089] It should be noted that, in an embodiment of the present invention, the BMC time analysis module determines whether the number of logs is greater than a preset second threshold based on the number of logs stored in the BMC memory; wherein the preset second threshold may be 1000, and the present invention does not specifically limit the value of the second threshold.

[0090] Step 402: If it is greater, perform data analysis on the log by calling a drawing tool, generate visualization data, and send the visualization data to the user, wherein the visualization data may include the maximum value of the total SMI time, and determine whether the maximum value of the total SMI time is greater than a pre-set third threshold based on the visualization data.

[0091] It should be noted that, in an embodiment of the present invention, if the BMC time analysis module determines that the number of logs is greater than a pre-set second threshold, the BMC time analysis module will call a drawing tool to perform data analysis on all logs stored in the BMC's memory to generate visual data. For example, the visual data can be a line chart generated based on all logs stored in the BMC's memory. After obtaining the visual data, the visual data can be directly emailed to a user, who can be an operations and maintenance personnel. Alternatively, before sending the visual data to the user, the visual data can be compressed to generate a compressed archive file, which is then sent to the user.

[0092] Furthermore, since the visualization data includes the maximum value of the total SMI time, the BMC time analysis module needs to determine whether the maximum value of the total SMI time is greater than a preset third threshold based on the visualization data; wherein, the preset third threshold can be 300ms, and the present invention does not specifically limit the value of the preset third threshold.

[0093] Step 403: If it is greater than, generate an alarm message and send the alarm message to the user.

[0094] It should be noted that, in an embodiment of the present invention, if the BMC time analysis module determines that the maximum value of the total SMI time is greater than a preset third threshold, the BMC time analysis module will generate an alarm message and send the alarm message to the user so that the user can promptly inform the relevant personnel to check the reason why the total SMI interruption time is too long as soon as possible.

[0095] When there are too many logs, the present invention generates visual data by performing data analysis on the logs, thereby realizing the integration of the logs, so that developers, testers and customers can remotely monitor the total SMI time at any time, thereby meeting users' more diverse usage needs; in addition, when the maximum value of the total SMI time is too large, the present invention generates an alarm message through the BMC time analysis module and issues an alarm, and at the same time sends the alarm message to the user, so that the user can promptly learn that the maximum value of the total SMI time is too large, and perform maintenance for this situation, thereby achieving the technical effect of avoiding affecting the normal operation of the business.

[0096] Reference Figure 5, shows a schematic structural diagram of an interruption time acquisition device provided by an embodiment of the present invention, the device may include:

[0097] The SMI total time acquisition module 501 is configured to, when an error is detected during the operation of the operating system OS and a system management interrupt SMI is triggered, obtain the total SMI time through the timing register by the timing module and store the total SMI time in the shared memory;

[0098] The IPMI information sending time acquisition module 502 is used for the timing module to obtain the intelligent platform management interface IPMI information sending time through the timing register, store the IPMI information sending time in the shared memory, and set the update flag of the shared memory to 1, wherein the IPMI information sending time is the time for the timing module to obtain the error record from the register storing the error record and send the error record to the baseboard management controller BMC through IPMI.

[0099] The interruption time acquisition module 503 is used for the BMC time analysis module to obtain the IPMI information sending time and the SMI total time from the shared memory by cyclically reading and updating the flag bit.

[0100] Furthermore, the device also includes:

[0101] The initialization module is used to initialize the BIOS runtime service memory and the BIOS runtime service when a power-on instruction is received.

[0102] Furthermore, the device also includes:

[0103] The memory allocation module is used by the BMC initialization module to pre-allocate a shared memory and map the shared memory to the BIOS memory so that the BIOS and BMC can read and write to the shared memory.

[0104] Furthermore, the device also includes:

[0105] The update flag reading module is used by the BMC time analysis module to access the shared memory and read the update flag of the shared memory;

[0106] A first data judgment module is used to judge whether the update flag of the shared memory is 1;

[0107] The log generation module is used to generate a log based on the acquired IPMI information sending time, SMI total time, SMI trigger count and error type if it is 1, and store the log in the BMC memory according to the preset data storage format and set the shared memory update flag to 0.

[0108] Furthermore, the device also includes:

[0109] A second data judgment module is used for the BMC time analysis module to judge whether the number of logs is greater than a preset first threshold based on the logs stored in the memory of the BMC;

[0110] The data visualization display module is used to perform data analysis on the log by calling a drawing tool and visualize the log if it is greater than.

[0111] Furthermore, the device also includes:

[0112] a third data judgment module, configured for the BMC time analysis module to judge whether the number of logs is greater than a preset second threshold based on the logs stored in the memory of the BMC;

[0113] a fourth data determination module, configured to, if greater than, perform data analysis on the log by invoking a drawing tool to generate visual data, and send the visual data to a user, wherein the visual data may include a maximum value of the total SMI time, and determine, based on the visual data, whether the maximum value of the total SMI time is greater than a preset third threshold;

[0114] The alarm module is used to generate an alarm message if it is greater than and send the alarm message to the user.

[0115] The interruption time acquisition device provided by an embodiment of the present invention detects an error during the operation of an operating system (OS) and triggers a system management interrupt (SMI). The timing module obtains the total SMI time through a timing register and stores the total SMI time in a shared memory. The timing module obtains the information sending time of an intelligent platform management interface (IPMI) through a timing register, stores the IPMI information sending time in a shared memory, and sets the update flag of the shared memory to 1, wherein the IPMI information sending time is the time taken by the timing module to obtain an error record from a register storing error records and send the error record to a baseboard management controller (BMC) through the IPMI. The BMC time analysis module obtains the IPMI information sending time and the total SMI time from the shared memory by cyclically reading the update flag. The present invention obtains the interrupt time through the BMC time analysis module included in the BMC, that is, obtains the total SMI time in an out-of-band manner, and does not need to obtain the OS login permission to obtain the total SMI time in the band. The method of obtaining the total SMI time is simpler, thereby solving the technical problem of low efficiency in obtaining the total SMI time, and further achieving the technical effect of improving the efficiency of obtaining the total SMI time; the present invention realizes data interaction between BMC and BIOS through IPMI. Since IPMI can span different operating systems, firmware and hardware platforms, it can intelligently monitor, control and automatically report the operating conditions of a large number of servers, thereby achieving the technical effect of reducing the cost of the server system; the present invention initializes the BIOS runtime service memory and the BIOS runtime service through the service initialization module, thereby providing an operating space for the BIOS runtime service, that is, the BIOS runtime service memory, so that the BIOS runtime service can work normally, and further, it can be used through the BIOS The runtime service achieves the technical purpose of temporarily storing the total SMI time. The present invention uses the BMC initialization module included in the BMC to map the pre-set shared memory to the BIOS memory in the BIOS, so that both the BIOS and the BMC can access the shared memory, read data, and write data. Furthermore, the technical purpose of storing the IPMI information sending time can be achieved through the shared memory. The present invention uses the BMC time analysis module included in the BMC to generate a log of the acquired IPMI information sending time, SMI total time, SMI trigger times, and error types, and stores the log in the BMC memory according to a pre-set data storage format, so that users can directly obtain the detailed data generated from the error triggering the system management interrupt to the end of the system management interrupt through the BMC, thereby making it more convenient for developers, testers, and customers to monitor the total SMI time. Furthermore, while improving the efficiency of obtaining the total SMI time, it also achieves the technical effect of improving user experience.The present invention uses the BMC time analysis module included in the BMC to visualize logs, allowing developers, testers, and customers to more intuitively monitor the total SMI duration, thereby improving the user experience. The present invention automatically analyzes log data by calling a drawing tool, avoiding errors caused by manual log analysis while also saving manpower and time, greatly facilitating R&D and testing, and significantly improving fault diagnosis and testing scenarios. When there are too many logs, the present invention generates visualized data by analyzing the logs, integrating the logs and enabling developers, testers, and customers to remotely monitor the total SMI duration at any time, thereby meeting more diverse user needs. When the maximum value of the total SMI duration is excessive, the present invention generates an alarm message through the BMC time analysis module and issues an alarm. Simultaneously, the alarm message is sent to the user, allowing the user to promptly be informed of the excessive maximum value of the total SMI duration and perform maintenance accordingly, thereby achieving the technical effect of avoiding disruptions to normal business operations.

[0116] Reference Figure 6 , shows a system for obtaining interruption time provided by an embodiment of the present invention, including:

[0117] A service initialization module 601 is used to initialize the BIOS runtime service memory and the BIOS runtime service;

[0118] A timing module 602 is configured to obtain the total SMI time through a timing register and store the total SMI time in a shared memory, obtain the time taken by the intelligent platform management interface (IPMI) to send information through a timing register, store the time taken by the IPMI to send information in a shared memory, and set an update flag of the shared memory to 1. The IPMI information sending time is the time taken by the timing module to obtain an error record from a register storing error records and send the error record to the baseboard management controller (BMC) through the IPMI.

[0119] The BMC time analysis module 603 is used to obtain the IPMI information sending time and the SMI total time from the shared memory by cyclically reading and updating the flag bit.

[0120] An interrupt time acquisition system provided by an embodiment of the present invention detects an error during the operation of an operating system (OS) and triggers a system management interrupt (SMI). A timing module obtains the total SMI time through a timing register and stores the total SMI time in a shared memory. The timing module obtains the information sending time of an intelligent platform management interface (IPMI) through a timing register, stores the IPMI information sending time in a shared memory, and sets an update flag of the shared memory to 1, wherein the IPMI information sending time is the time taken by the timing module to obtain an error record from a register storing error records and send the error record to a baseboard management controller (BMC) through the IPMI. A BMC time analysis module obtains the IPMI information sending time and the total SMI time from the shared memory by cyclically reading the update flag. The present invention obtains interrupt time through the BMC time analysis module included in the BMC, that is, obtains the total SMI time in an out-of-band manner, and does not require additional OS login permissions to obtain the total SMI time in-band. This method of obtaining the total SMI time is simpler, thereby solving the technical problem of low efficiency in obtaining the total SMI time, and further achieving the technical effect of improving the efficiency of obtaining the total SMI time; the present invention realizes data interaction between the BMC and the BIOS through the IPMI. Since the IPMI can span different operating systems, firmware and hardware platforms, it can intelligently monitor, control and automatically report the operating conditions of a large number of servers, thereby achieving the technical effect of reducing the cost of the server system; the present invention initializes the BIOS runtime service memory and the BIOS runtime service through the service initialization module, thereby providing an operating space for the BIOS runtime service, that is, the BIOS runtime service memory, so that the BIOS runtime service can work normally, and further, the technical purpose of temporarily storing the total SMI time can be achieved through the BIOS runtime service.

[0121] The embodiment of the present invention also provides a communication device, such as Figure 7 As shown, it includes a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.

[0122] Memory 703, for storing computer programs;

[0123] When the processor 701 is used to execute the program stored in the memory 703, it can implement the following steps:

[0124] When an error is detected during the operation of the operating system OS and a system management interrupt SMI is triggered, the timing module obtains the total SMI time through the timing register and stores the total SMI time in the shared memory;

[0125] The timing module obtains the time taken by the intelligent platform management interface IPMI to send information through the timing register, stores the IPMI information sending time in the shared memory, and sets the update flag bit of the shared memory to 1, wherein the IPMI information sending time is the time taken by the timing module to obtain the error record from the register storing the error record and send the error record to the baseboard management controller BMC through IPMI;

[0126] The BMC time analysis module obtains the IPMI information sending time and the total SMI time from the shared memory by cyclically reading and updating the flag bit.

[0127] The communication bus mentioned in the terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.

[0128] The communication interface is used for communication between the above terminal and other devices.

[0129] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.

[0130] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0131] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions that, when executed on a computer, enable the computer to execute any of the interruption time acquisition methods described in the above embodiments.

[0132] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the interruption time acquisition method described in any one of the above embodiments.

[0133] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0134] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0135] Each embodiment in this specification is described in a related manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For related parts, refer to the description of the method embodiment.

[0136] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.

Claims

1. A method for obtaining interruption time, characterized in that: The method comprises: When an error is detected during the operation of the operating system OS and a system management interrupt SMI is triggered, the timing module obtains the total SMI time through the timing register and stores the total SMI time in the shared memory; The timing module obtains the total SMI time through the timing register, including: the timing module obtains a time data recorded in the timing register when the SMI is triggered and a time data recorded in the timing register when the SMI ends, and obtains the total SMI time by subtracting the two time data; The timing module obtains the time taken by the intelligent platform management interface IPMI to send information through the timing register, stores the time taken by the IPMI to send information in the shared memory, and sets the update flag bit of the shared memory to 1, wherein the time taken by the IPMI to send information is the time taken by the timing module to obtain the error record from the register storing the error record and send the error record to the baseboard management controller BMC through the IPMI; The BMC time analysis module obtains the IPMI information sending time and the SMI total time from the shared memory by cyclically reading and updating the flag bit.

2. The method according to claim 1, characterized in that Before the step of detecting that an error occurs during the operation of the operating system OS and triggering a system management interrupt SMI, the method further includes: When a power-on instruction is received, the service initialization module initializes the BIOS runtime service memory and the BIOS runtime service.

3. The method according to claim 1, characterized in that Before the step of the timing module acquiring the time taken by the intelligent platform management interface IPMI to send information through the timing register, the method further includes: The BMC initialization module pre-allocates a shared memory and maps the shared memory to the BIOS memory, so that the BIOS and the BMC can read and write to the shared memory.

4. The method according to claim 1, wherein The method further comprises: The BMC time analysis module accesses the shared memory and reads the update flag of the shared memory; Determine whether the update flag of the shared memory is 1; If it is 1, a log is generated based on the acquired IPMI information sending time, the SMI total time, the number of SMI triggers and the error type, and the log is stored in the BMC memory according to the preset data storage format, and the update flag of the shared memory is set to 0.

5. The method according to claim 4, characterized in that The method further comprises: The BMC time analysis module determines, based on the logs stored in the memory of the BMC, whether the number of the logs is greater than a preset first threshold; If it is greater, a drawing tool is called to perform data analysis on the log and visualize the log.

6. The method according to claim 4, characterized in that The method further comprises: The BMC time analysis module determines, based on the logs stored in the memory of the BMC, whether the number of the logs is greater than a preset second threshold; If it is greater than, performing data analysis on the log by calling a drawing tool to generate visual data, and sending the visual data to the user, wherein the visual data includes the maximum value of the total SMI time, and determining whether the maximum value of the total SMI time is greater than a preset third threshold based on the visual data; If it is greater, an alarm message is generated and sent to the user.

7. An interruption time acquisition device, characterized in that: The device comprises: An SMI total time acquisition module is configured to, when an error is detected during the operation of the operating system OS and a system management interrupt SMI is triggered, obtain the SMI total time through the timing register by the timing module and store the SMI total time in the shared memory; The timing module obtains the total SMI time through the timing register, including: the timing module obtains a time data recorded in the timing register when the SMI is triggered and a time data recorded in the timing register when the SMI ends, and obtains the total SMI time by subtracting the two time data; An IPMI information sending time acquisition module, configured for the timing module to obtain the time taken by the intelligent platform management interface IPMI to send information through the timing register, store the IPMI information sending time in the shared memory, and set the update flag of the shared memory to 1, wherein the IPMI information sending time is the time taken by the timing module to obtain the error record from the register storing the error record and send the error record to the baseboard management controller BMC through the IPMI; The interruption time acquisition module is used for the BMC time analysis module to obtain the IPMI information sending time and the SMI total time from the shared memory by cyclically reading and updating the flag bit.

8. An interruption time acquisition system, characterized in that: The system comprises: Service initialization module, used to initialize BIOS runtime service memory and BIOS runtime service; A timing module is configured to obtain a total SMI time through a timing register and store the total SMI time in a shared memory, wherein the timing module obtains the total SMI time through the timing register, including: the timing module obtains a time data recorded in the timing register when the SMI is triggered and a time data recorded in the timing register when the SMI ends, and obtains the total SMI time by subtracting the two time data; obtains a time taken by the intelligent platform management interface IPMI to send information through the timing register, stores the time taken by the IPMI to send information in the shared memory, and sets an update flag bit of the shared memory to 1, wherein the time taken by the IPMI to send information is the time taken by the timing module to obtain an error record from a register storing error records and send the error record to a baseboard management controller BMC through the IPMI; The BMC time analysis module is used to obtain the IPMI information sending time and the SMI total time from the shared memory by cyclically reading and updating the flag bit.

9. A communication device, characterized in that: include: A transceiver, a memory, a processor, and a program stored on the memory and executable on the processor; The processor is configured to read a program in a memory to implement the interruption time acquisition method according to any one of claims 1 to 6.

10. A readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the interruption time acquisition method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method and device for measuring system manager interrupt time

    CN107423206A

  • Method and system for optimizing system management interrupt processing hardware error time

    CN113076213A