A method, device, equipment and medium for determining abnormal information of a switch

By turning on the Debug mode by default when the switch is powered on and synchronously recording detailed boot information, the problem of difficulty in locating BIOS downtime problems and prolonged boot time is solved, achieving efficient and accurate location of switch abnormal information and rapid problem solving.

CN116032735BActive Publication Date: 2024-10-22INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211624955.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-16
Publication Date
2024-10-22
Estimated Expiration
2042-12-16

AI Technical Summary

Technical Problem

During the R&D and testing phase of new switch products, it is difficult to locate after BIOS crashes or stuck startup problems occur. The problem cannot be reproduced after the existing Debug mode is turned on, which affects the efficiency and accuracy of positioning. In addition, the boot time is prolonged after Debug mode is turned on. Affect user experience.

Method used

The switch turns on the Debug mode by default when it is powered on. After the BIOS establishes a communication link with the Baseboard Management Controller (BMC), detailed boot information is recorded synchronously to ensure the normal boot time of the system, and the debug information is saved in the path specified by the BMC. The client can The saved startup debug information is used to determine the error location and complete problem location.

Benefits of technology

When a fatal problem occurs for the first time, the bug environment is retained through code debug information to assist engineers in locating the problem, avoid the difficulty of reproducing probabilistic problems, and improve the accuracy and efficiency of determining switch abnormal information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116032735B_ABST
    Figure CN116032735B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and medium for determining abnormal information of a switch, which relates to the field of computer technology, including: determining whether the computer troubleshooting command in the local preset data packet is started; if the computer troubleshooting command in the local preset data packet is started, then setting its own computer troubleshooting mode to the on state to obtain a detailed log for characterizing the startup of computer troubleshooting; sending and saving the detailed log to the local baseboard management controller, and performing abnormal detection on itself, if an abnormality is detected, sending abnormal prompt information to the client, so that the client can determine the abnormal information of the switch from the detailed log of the baseboard management controller. Through the above technical solution of the present application, the accuracy of determining the abnormal information of the switch can be increased, the efficiency of determining the abnormal information of the switch can be improved, and the situation where the abnormal information of the switch cannot be determined due to a small probability problem can be avoided.
Need to check novelty before this filing date? Find Prior Art

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 determining abnormal information of a switch. Background Art

[0002] BIOS (Basic Input Output System) is a tamper-proof startup program engraved on the motherboard ROM (Read-Only Memory) chip. BIOS is responsible for calculating the system self-test program (POST, Power On Self Test) and the system self-startup program. Due to its tamper-proof nature, the program is stored in the ROM chip and can maintain the original settings after power failure. The main function of BIOS is to control the basic program after the switch or server device is started, including hard disk drive (such as hard disk boot, network boot or USB (Universal Serial Bus) boot disk is preferred during installation), serial port output settings, memory and related devices. As the first program after the switch system is started, once a vulnerability occurs in the BIOS code, it may cause serious consequences such as the entire machine downtime. For R&D and test engineers, the startup downtime problem is a fatal problem and requires the highest priority to concentrate resources for location diagnosis. However, once such a problem occurs, the means left for R&D personnel to locate the problem are extremely limited. During the R&D and testing phase of new switch products, after fatal problems such as startup stuck or downtime occur, the means left for R&D personnel to locate the problem are limited. The traditional method for locating this problem is to restart the switch and turn on the BIOS debug mode (computer troubleshooting mode) to reproduce the problem. After the debug mode is turned on, the BIOS will print the entire set of code execution process information to the serial port during startup. Once the problem is reproduced, the R&D personnel can locate the detailed location of the code being executed when the downtime occurs, and then complete the problem location and perform analysis and repair work. For the existing switch BIOS downtime problem, the commonly used positioning solution is that when the debug mode is manually turned on, the BIOS will print out a detailed startup log through the serial port during the POST (Power On Self Test) stage. Since the debug mode is turned off by default, after a downtime problem occurs, it is necessary to restart the switch to enter the BIOS and turn on the debug mode to reproduce the problem again. However, for a small probability of freezing, it is very likely that the problem cannot be reproduced after debugging is enabled, which increases the difficulty of locating the problem, or even loses the opportunity to locate the problem. In addition, the Debug mode is not enabled by default because a large amount of code information needs to be printed after the Debug mode is enabled, which greatly prolongs the boot time and makes the startup interface cluttered, affecting the user experience.

[0003] As can be seen from the above, how to increase the accuracy of determining the abnormal information of the switch, improve the efficiency of determining the abnormal information of the switch, and avoid the situation where the abnormal information of the switch cannot be determined due to a small probability problem is a problem to be solved in the art. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for determining abnormal information of a switch, which can increase the accuracy of determining abnormal information of the switch, improve the efficiency of determining abnormal information of the switch, and avoid the situation where the abnormal information of the switch cannot be determined due to a small probability problem. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses a method for determining abnormal information of a switch, which is applied to a switch, comprising:

[0006] Determine whether the computer troubleshooting command in the local preset data package is started;

[0007] If the computer troubleshooting command in the local preset data package is to start, the computer troubleshooting mode is set to the on state to obtain a detailed log for characterizing the computer troubleshooting startup;

[0008] The detailed log is sent and saved to the local baseboard management controller, and an abnormality detection is performed on itself. If an abnormality is detected, an abnormal prompt message is sent to the client, so that the client can determine the switch abnormality information from the detailed log of the baseboard management controller.

[0009] Optionally, the determining whether the computer troubleshooting command in the local preset data packet is started includes:

[0010] After detecting that it is powered on, it performs security authentication on itself. If the security authentication passes, it determines whether the computer troubleshooting command in the local preset data packet is started.

[0011] Optionally, after obtaining a detailed log for characterizing computer troubleshooting startup, the method further includes:

[0012] Simplifying the detailed log using a preset log simplification instruction to obtain a simplified log;

[0013] The simplified log is printed and output to the client using a preset serial port.

[0014] Optionally, sending and saving the detailed log to a local baseboard management controller includes:

[0015] Calling the preset data sending function and data receiving function and using the KCS interface under the LPC bus to establish a communication link between the local basic input and output system and the baseboard management controller;

[0016] The detailed log is sent and saved to a local baseboard management controller based on the basic input and output system and using the communication link.

[0017] Optionally, after sending and saving the detailed log to the local baseboard management controller, the method further includes:

[0018] Determining a current system time of the baseboard management controller, and generating a timestamp based on the current system time;

[0019] The timestamp is added to the detailed log.

[0020] Optionally, the sending of abnormal prompt information to the client so that the client can determine the abnormal information of the switch from the detailed log of the baseboard management controller includes:

[0021] Generate and send abnormal prompt information for characterizing abnormality in self-detection to the client, so that the client can determine the target timestamp based on the abnormal prompt information, and determine the switch abnormality information for characterizing abnormality in computer troubleshooting startup from the detailed log according to the target timestamp.

[0022] Optionally, after performing abnormality detection on itself, the method further includes:

[0023] If the detection is normal, obtaining the device startup add-on item, and determining the target operating system from the device startup add-on item according to business requirements;

[0024] The target operating system is executed using a preset operating system loader.

[0025] In a second aspect, the present application discloses a switch abnormal information determination device, comprising:

[0026] A judging module, used for judging whether the computer troubleshooting command in the local preset data packet is started;

[0027] A detailed log determination module, used for setting its own computer troubleshooting mode to an on state if the computer troubleshooting command in the local preset data packet is to be started, so as to obtain a detailed log for characterizing the computer troubleshooting startup;

[0028] The switch abnormal information determination module is used to send and save the detailed log to the local baseboard management controller, and perform abnormal detection on itself. If an abnormality is detected, an abnormal prompt message is sent to the client so that the client can determine the switch abnormal information from the detailed log of the baseboard management controller.

[0029] In a third aspect, the present application discloses an electronic device, comprising:

[0030] Memory, used to store computer programs;

[0031] The processor is used to execute the computer program to implement the aforementioned switch abnormal information determination method.

[0032] In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed method for determining abnormal switch information are implemented.

[0033] It can be seen that the present application provides a method for determining switch abnormal information, including determining whether the computer troubleshooting command in the local preset data packet is started; if the computer troubleshooting command in the local preset data packet is started, setting its own computer troubleshooting mode to the on state to obtain a detailed log for characterizing the startup of the computer troubleshooting; sending and saving the detailed log to the local baseboard management controller, and performing an abnormality detection on itself. If an abnormality is detected, sending an abnormal prompt message to the client, so that the client can determine the switch abnormality information from the detailed log of the baseboard management controller. This application improves the positioning process after the original switch BIOS crash problem occurs. When the switch is powered on, the debug mode is turned on by default, and the code execution information is filtered on the serial port to ensure the normal boot time of the system. After the BMC establishes link communication, the debug detailed boot information is synchronously recorded in the path specified by the BMC. When a fatal problem occurs, the client can determine the specific location of the error based on the startup debug information saved in the BMC to complete the positioning. When the fatal problem occurs for the first time, the bug environment can be retained in the form of code debug information to assist engineers in completing problem positioning, so as to completely avoid the risk of difficulty in reproducing probabilistic problems, and can increase the accuracy of determining the switch abnormal information and improve the efficiency of determining the switch abnormal information. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0035] Figure 1 A flow chart of a method for determining abnormal information of a switch disclosed in the present application;

[0036] Figure 2 A simplified code example diagram of a method for determining abnormal information of a switch disclosed in the present application;

[0037] Figure 3 A simplified code example diagram of a method for determining abnormal information of a switch disclosed in the present application;

[0038] Figure 4 A simplified code example diagram of a method for determining abnormal information of a switch disclosed in the present application;

[0039] Figure 5 A flow chart of a method for determining abnormal information of a switch disclosed in the present application;

[0040] Figure 6 A simplified code example diagram of a method for determining abnormal information of a switch disclosed in the present application;

[0041] Figure 7 A specific flow chart of a method for determining abnormal information of a switch disclosed in the present application;

[0042] Figure 8 A schematic diagram of the structure of a switch abnormal information determination device disclosed in the present application;

[0043] Fig. 9 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION

[0044] 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.

[0045] BIOS (Basic Input Output System) is a tamper-proof startup program engraved on the motherboard ROM (Read-Only Memory) chip. BIOS is responsible for calculating the system self-test program (POST, Power On Self Test) and the system self-startup program. Due to its tamper-proof nature, the program is stored in the ROM chip and can maintain the original settings after power failure. The main function of BIOS is to control the basic program after the switch or server device is started, including hard disk drive (such as hard disk boot, network boot or USB (Universal Serial Bus) boot disk is preferred during installation), serial port output settings, memory and related devices. As the first program after the switch system is started, once a vulnerability occurs in the BIOS code, it may cause serious consequences such as the entire machine downtime. For R&D and test engineers, the startup downtime problem is a fatal problem and requires the highest priority to concentrate resources for location diagnosis. However, once such a problem occurs, the means left for R&D personnel to locate the problem are extremely limited. During the R&D and testing phase of new switch products, after fatal problems such as startup stuck or downtime occur, the means left for R&D personnel to locate the problem are limited. The traditional method for locating this problem is to restart the switch and turn on the BIOS debug mode (computer troubleshooting mode) to reproduce the problem. After the debug mode is turned on, the BIOS will print the entire set of code execution process information to the serial port during startup. Once the problem is reproduced, the R&D personnel can locate the detailed location of the code being executed when the downtime occurs, and then complete the problem location and perform analysis and repair work. For the existing switch BIOS downtime problem, the commonly used positioning solution is that when the debug mode is manually turned on, the BIOS will print out a detailed startup log through the serial port during the POST (Power On Self Test) stage. Since the debug mode is turned off by default, after a downtime problem occurs, it is necessary to restart the switch to enter the BIOS and turn on the debug mode to reproduce the problem again. However, for the stuck problem that occurs with a small probability, it is very likely that the problem cannot be reproduced again after debugging is turned on, which increases the difficulty of locating the problem, or even loses the opportunity to locate the problem. In addition, the debug mode is not turned on by default, because after turning on the debug mode, a large amount of code information needs to be printed, the boot time will be seriously extended, and the cluttered startup interface affects the user experience. As can be seen from the above, how to increase the accuracy of determining the abnormal information of the switch, improve the efficiency of determining the abnormal information of the switch, and avoid the situation where the abnormal information of the switch cannot be determined due to a small probability problem is a problem to be solved in this field.

[0046] See also Figure 1As shown, an embodiment of the present invention discloses a method for determining abnormal information of a switch, which may specifically include:

[0047] Step S11: Determine whether the computer troubleshooting command in the local preset data package is started.

[0048] In this embodiment, after detecting that it is powered on, it performs security authentication on itself. If the security authentication passes, it determines whether the computer troubleshooting command in the local preset data packet is started.

[0049] Step S12: If the computer troubleshooting command in the local preset data package is to start, the computer troubleshooting mode itself is set to the on state to obtain a detailed log for characterizing the computer troubleshooting startup.

[0050] It can be understood that when the switch is powered on, it performs security authentication on itself during the BIOS startup process. If the security authentication is passed, the value of the Debug Mode (i.e., computer troubleshooting command) switch under Setup (i.e., preset data packet) is read, and the value of the CMOS offset 0x4a address is set. That is, when Debug Mode is set to Enabled (allowed), 0x4a=0 is set. The brief code is as follows: Figure 2 As shown, setting 0x4a=0 means turning on the Debug mode.

[0051] In this embodiment, the detailed log is simplified using a preset log simplification instruction to obtain a simplified log; the simplified log is printed and output to the client using a preset serial port. Figure 3 As shown, setting PcdDebugPrintErrorLevel (i.e., log simplification instruction) is used to control the printing information in Normal mode (i.e., simplifying the detailed log). After setting to enable Debug mode, the BIOS still prints out the simplified log through the serial port during the POST stage to ensure that the startup time will not be prolonged.

[0052] Step S13: Send and save the detailed log to the local baseboard management controller, and perform abnormal detection on itself. If abnormality is detected, send abnormal prompt information to the client, so that the client can determine the switch abnormal information from the detailed log of the baseboard management controller.

[0053] In this embodiment, the preset sending data function and receiving data function are called and the KCS interface under the LPC bus is used to establish a communication link between the local basic input and output system and the baseboard management controller; based on the basic input and output system and using the communication link, the detailed log is sent and saved to the local baseboard management controller. The brief code is as follows Figure 4 As shown, the two functions SendDataToBmcPort (i.e., data sending function) and ReceiveBmcDataFromPort (i.e., data receiving function) are mainly used to establish a communication link with the BMC through the KCS interface under the LPC (Low pin count Bus) bus, completing the functions of sending data to the BMC and reading data from the BMC.

[0054] In this embodiment, it is determined whether the computer troubleshooting command in the local preset data packet is started; if the computer troubleshooting command in the local preset data packet is started, the computer troubleshooting mode itself is set to the on state to obtain a detailed log for characterizing the computer troubleshooting startup; the detailed log is sent and saved to the local baseboard management controller, and an abnormality detection is performed on itself. If an abnormality is detected, an abnormal prompt information is sent to the client, so that the client can determine the switch abnormality information from the detailed log of the baseboard management controller. This application improves the positioning process after the original switch BIOS crash problem occurs. When the switch is powered on, the debug mode is turned on by default, and the code execution information is filtered on the serial port to ensure the normal boot time of the system. After the BMC establishes link communication, the debug detailed boot information is synchronously recorded in the path specified by the BMC. When a fatal problem occurs, the client can determine the specific location of the error based on the startup debug information saved in the BMC to complete the positioning. When the fatal problem occurs for the first time, the bug environment can be retained in the form of code debug information to assist engineers in completing problem positioning, so as to completely avoid the risk of difficulty in reproducing probabilistic problems, and can increase the accuracy of determining the switch abnormal information and improve the efficiency of determining the switch abnormal information.

[0055] See also Figure 5 As shown, an embodiment of the present invention discloses a method for determining abnormal information of a switch, which may specifically include:

[0056] Step S21: Determine whether the computer troubleshooting command in the local preset data package is started.

[0057] Step S22: If the computer troubleshooting command in the local preset data package is to start, the computer troubleshooting mode itself is set to the on state to obtain a detailed log for characterizing the computer troubleshooting startup.

[0058] Step S23: Send and save the detailed log to a local baseboard management controller, determine the current system time of the baseboard management controller, generate a timestamp based on the current system time, and add the timestamp to the detailed log.

[0059] In this embodiment, after establishing the communication link between BIOS and BMC, BIOS will synchronously send the detailed log to the BMC specified path, such as / var / log / bios_debug.log, and generate a timestamp with the current system time of BMC, and add the timestamp to the detailed log. The specific code is as follows: Figure 6 shown.

[0060] Step S24: Perform an abnormality detection on itself. If an abnormality is detected, generate and send abnormal prompt information to the client to characterize the abnormality of the self-detection, so that the client can determine the target timestamp based on the abnormal prompt information, and determine the switch abnormality information used to characterize the abnormality of computer troubleshooting startup from the detailed log according to the target timestamp.

[0061] In this embodiment, an abnormality detection is performed on itself. If the detection is normal, a device startup add-on is obtained, and a target operating system is determined from the device startup add-on according to business requirements; and the target operating system is executed using a preset operating system loader.

[0062] The specific process of this application is as follows Figure 7 First, the switch is powered on, and then enters the SEC stage, that is, it performs security authentication on itself. If the security authentication passes, it enters the PEI stage; the PEI stage is to read the value of the Debug Mode switch under Setup. When Mode is set to Enabled, 0x4a=0 is set to turn on the Debug mode, and the detailed log is simplified using the log simplification instruction to obtain a simplified log; then the DXE stage is entered, that is, the device, bus, driver and service stages are executed, specifically: the send data function and the receive data function are called and the KCS interface under the LPC bus is used to establish a communication link between the BIOS and the BMC, and then the detailed log is synchronously sent and saved to the BMC specified path using the communication link, and then an abnormality detection is performed on itself (i.e., determining whether it is down). If an abnormality is detected, an abnormal prompt message is sent to the client, and the client searches for the Debug information from the detailed log of the BMC, locates it according to the timestamp, and finally obtains the abnormal switch abnormality information. If the detection is not abnormal, the BDS stage is performed, that is, the device startup add-on is obtained, and the target operating system is determined from the device startup add-on according to business needs; then the TSL / RS / AL stage is performed, that is, the target operating system is executed using the preset operating system loader.

[0063] This application will implement a problem diagnosis and positioning mechanism for the BIOS program crash of the switch during the startup phase of the switch. While ensuring that the startup time will not be prolonged, the Debug mode is turned on by default and the detailed startup information is recorded synchronously through the BMC in the background. When the device crashes, engineers can immediately complete the positioning and analysis through the log information recorded by the BMC. That is, when the fatal problem occurs for the first time, the problem can be located, eliminating the risk of low-probability problems being difficult to reproduce. The key points of this application are: when the switch is powered on, the Debug mode is turned on by default in the PEI phase, and the code execution information is filtered in the serial port post, which ensures the normal startup time of the system. After establishing a link communication with the BMC in the DXE phase, the detailed Debug startup information is synchronously recorded under the path specified by the BMC. When a fatal problem occurs, the R&D personnel can determine the specific location of the error based on the startup Debug information saved under the BMC to complete the positioning. Therefore, this solution can retain the bug environment in the form of code Debug information when the fatal problem occurs for the first time to assist engineers in completing the problem location, so as to completely avoid the risk of difficulty in reproducing probabilistic problems.

[0064] In this embodiment, it is determined whether the computer troubleshooting command in the local preset data packet is started; if the computer troubleshooting command in the local preset data packet is started, the computer troubleshooting mode itself is set to the on state to obtain a detailed log for characterizing the computer troubleshooting startup; the detailed log is sent and saved to the local baseboard management controller, and an abnormality detection is performed on itself. If an abnormality is detected, an abnormal prompt information is sent to the client, so that the client can determine the switch abnormality information from the detailed log of the baseboard management controller. This application improves the positioning process after the original switch BIOS crash problem occurs. When the switch is powered on, the debug mode is turned on by default, and the code execution information is filtered on the serial port to ensure the normal boot time of the system. After the BMC establishes link communication, the debug detailed boot information is synchronously recorded in the path specified by the BMC. When a fatal problem occurs, the client can determine the specific location of the error based on the startup debug information saved in the BMC to complete the positioning. When the fatal problem occurs for the first time, the bug environment can be retained in the form of code debug information to assist engineers in completing problem positioning, so as to completely avoid the risk of difficulty in reproducing probabilistic problems, and can increase the accuracy of determining the switch abnormal information and improve the efficiency of determining the switch abnormal information.

[0065] See also Figure 8 As shown, an embodiment of the present invention discloses a switch abnormal information determination device, which may specifically include:

[0066] The judging module 11 is used to judge whether the computer troubleshooting command in the local preset data packet is started;

[0067] A detailed log determination module 12 is used to set its own computer troubleshooting mode to an on state if the computer troubleshooting command in the local preset data packet is to be started, so as to obtain a detailed log for characterizing the computer troubleshooting startup;

[0068] The switch abnormal information determination module 13 is used to send and save the detailed log to the local baseboard management controller, and perform abnormal detection on itself. If an abnormality is detected, an abnormal prompt message is sent to the client so that the client can determine the switch abnormal information from the detailed log of the baseboard management controller.

[0069] In this embodiment, it is determined whether the computer troubleshooting command in the local preset data packet is started; if the computer troubleshooting command in the local preset data packet is started, the computer troubleshooting mode itself is set to the on state to obtain a detailed log for characterizing the computer troubleshooting startup; the detailed log is sent and saved to the local baseboard management controller, and an abnormality detection is performed on itself. If an abnormality is detected, an abnormal prompt information is sent to the client, so that the client can determine the switch abnormality information from the detailed log of the baseboard management controller. This application improves the positioning process after the original switch BIOS crash problem occurs. When the switch is powered on, the debug mode is turned on by default, and the code execution information is filtered on the serial port to ensure the normal boot time of the system. After the BMC establishes link communication, the debug detailed boot information is synchronously recorded in the path specified by the BMC. When a fatal problem occurs, the client can determine the specific location of the error based on the startup debug information saved in the BMC to complete the positioning. When the fatal problem occurs for the first time, the bug environment can be retained in the form of code debug information to assist engineers in completing problem positioning, so as to completely avoid the risk of difficulty in reproducing probabilistic problems, and can increase the accuracy of determining the switch abnormal information and improve the efficiency of determining the switch abnormal information.

[0070] In some specific embodiments, the determination module 11 may specifically include:

[0071] The safety verification module is used to perform safety authentication on itself after detecting that it is powered on. If the safety authentication is passed, it is determined whether the computer troubleshooting command in the local preset data packet is started.

[0072] In some specific embodiments, the detailed log determination module 12 may specifically include:

[0073] A simplification module, used to simplify the detailed log using a preset log simplification instruction to obtain a simplified log;

[0074] The log printing module is used to print and output the simplified log to the client using a preset serial port.

[0075] In some specific embodiments, the switch abnormal information determination module 13 may specifically include:

[0076] A communication link establishment module, used to call a preset data sending function and data receiving function and use a KCS interface under the LPC bus to establish a communication link between a local basic input and output system and the baseboard management controller;

[0077] The detailed log sending module is used to send and save the detailed log to a local baseboard management controller based on the basic input and output system and using the communication link.

[0078] In some specific embodiments, the switch abnormal information determination module 13 may specifically include:

[0079] A timestamp generation module, used to determine the current system time of the baseboard management controller and generate a timestamp based on the current system time;

[0080] A timestamp adding module is used to add the timestamp to the detailed log.

[0081] In some specific embodiments, the switch abnormal information determination module 13 may specifically include:

[0082] The switch abnormality information determination module is used to generate and send abnormality prompt information for characterizing abnormality in its own detection to the client, so that the client can determine the target timestamp based on the abnormality prompt information, and determine the switch abnormality information for characterizing the abnormality of computer troubleshooting startup from the detailed log according to the target timestamp.

[0083] In some specific embodiments, the switch abnormal information determination module 13 may specifically include:

[0084] A target operating system determination module is used to obtain a device startup add-on item if the detection is normal, and determine a target operating system from the device startup add-on item according to business requirements;

[0085] The target operating system execution module is used to execute the target operating system using a preset operating system loader.

[0086] Fig. 9A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 20 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. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the switch abnormal information determination method performed by the electronic device disclosed in any of the aforementioned embodiments.

[0087] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 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 application, 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.

[0088] 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 include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.

[0089] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20 to realize the operation and processing of the data 223 in the memory 22 by the processor 21, which can be Windows, Unix, Linux, etc. In addition to including a computer program that can be used to complete the switch abnormal information determination method performed by the electronic device 20 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. In addition to including data transmitted from an external device received by the switch abnormal information determination device, the data 223 can also include data collected by its own input and output interface 25, etc.

[0090] 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.

[0091] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the method for determining abnormal switch information disclosed in any of the aforementioned embodiments are implemented.

[0092] 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.

[0093] The above is a detailed introduction to a method, device, equipment and storage medium for determining abnormal information of a switch provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods 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 general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for determining abnormal information of a switch, characterized in that: Applicable to switches, including: Determine whether the computer troubleshooting command in the local preset data package is started; If the computer troubleshooting command in the local preset data package is to start, the computer troubleshooting mode is set to the start state to obtain a detailed log for characterizing the computer troubleshooting start; Sending and saving the detailed log to a local baseboard management controller, and performing an abnormality detection on itself, and if an abnormality is detected, sending an abnormality prompt message to a client, so that the client can determine the abnormal information of the switch from the detailed log of the baseboard management controller; The step of determining whether the computer troubleshooting command in the local preset data packet is started includes: After detecting that it is powered on, it performs security authentication on itself. If the security authentication is passed, it determines whether the computer troubleshooting command in the local preset data packet is started; After sending and saving the detailed log to the local baseboard management controller, the method further includes: Determining a current system time of the baseboard management controller and generating a timestamp based on the current system time; adding the timestamp to the detailed log; The sending of abnormal prompt information to the client so that the client can determine the abnormal information of the switch from the detailed log of the baseboard management controller includes: Generate and send abnormal prompt information for characterizing abnormality in self-detection to the client, so that the client can determine the target timestamp based on the abnormal prompt information, and determine the switch abnormality information for characterizing abnormal startup of computer troubleshooting from the detailed log according to the target timestamp.

2. The method for determining abnormal switch information according to claim 1, characterized in that: After obtaining a detailed log for characterizing the computer troubleshooting startup, the method further includes: Simplifying the detailed log using a preset log simplification instruction to obtain a simplified log; The simplified log is printed and output to the client using a preset serial port.

3. The method for determining abnormal switch information according to claim 1, characterized in that: The sending and saving the detailed log to a local baseboard management controller includes: Calling the preset data sending function and data receiving function and using the KCS interface under the LPC bus to establish a communication link between the local basic input and output system and the baseboard management controller; The detailed log is sent and saved to a local baseboard management controller based on the basic input and output system and using the communication link.

4. The method for determining abnormal switch information according to any one of claims 1 to 3, characterized in that: After the abnormality detection is performed on itself, the following is also included: If the detection is normal, obtaining the device startup add-on item, and determining the target operating system from the device startup add-on item according to business requirements; The target operating system is executed using a preset operating system loader.

5. A switch abnormal information determination device, characterized in that: include: A judging module, used for judging whether the computer troubleshooting command in the local preset data packet is started; A detailed log determination module, used for setting its own computer troubleshooting mode to an on state if the computer troubleshooting command in the local preset data packet is to be started, so as to obtain a detailed log for characterizing the computer troubleshooting startup; A switch abnormality information determination module, used to send and save the detailed log to a local baseboard management controller, and perform abnormality detection on itself. If an abnormality is detected, an abnormality prompt message is sent to the client, so that the client can determine the switch abnormality information from the detailed log of the baseboard management controller; Wherein, the judgment module includes: The safety verification module is used to perform safety authentication on itself after detecting that it is powered on. If the safety authentication is passed, it is determined whether the computer troubleshooting command in the local preset data packet is started; The switch abnormal information determination module includes: A timestamp generation module, used to determine the current system time of the baseboard management controller and generate a timestamp based on the current system time; A timestamp adding module, used for adding the timestamp to the detailed log; The switch abnormality information determination module is used to generate and send abnormality prompt information for characterizing abnormality in its own detection to the client, so that the client can determine the target timestamp based on the abnormality prompt information, and determine the switch abnormality information for characterizing the abnormality of computer troubleshooting startup from the detailed log according to the target timestamp.

6. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the switch abnormal information determination method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the method for determining abnormal switch information according to any one of claims 1 to 4 is implemented.