Fault processing method, apparatus and device

By obtaining the operation logs of the switching board and generating configuration files, the problem of untimely and incorrect reconfiguration after the switching board configuration files are lost is solved, ensuring the timeliness and correctness of switching board fault handling.

CN117811923BActive Publication Date: 2025-11-18XFUSION DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211172213.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-26
Publication Date
2025-11-18
Estimated Expiration
2042-09-26

AI Technical Summary

Technical Problem

In existing technologies, when the configuration file of a switchboard is lost, maintenance personnel cannot guarantee the timeliness and correctness of reconfiguration, resulting in poor handling of switchboard failures.

Method used

By obtaining the operation logs of the switching board, multiple configuration commands are identified, corresponding configuration files are generated, and the configuration files are sent to the switching board to ensure the timeliness and correctness of the configuration.

Benefits of technology

It ensures the timeliness and accuracy of switchboard reconfiguration, improves fault handling, and avoids the risk of service recovery failure after the configuration file takes effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117811923B_ABST
    Figure CN117811923B_ABST
Patent Text Reader

Abstract

The application provides a fault processing method, device and equipment, the method comprising: determining that a first switching board is faulty, obtaining a running log of the first switching board; determining a plurality of setting class commands in the running log; generating a configuration file corresponding to the first switching board according to the plurality of setting class commands, and sending the configuration file to the first switching board. Through the above method, the timeliness and correctness of the reconfiguration of the switching board can be ensured when the switching board is faulty, and the fault processing effect of the switching board is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, and in particular to a fault processing method, device and equipment. BACKGROUND

[0002] The switching board is a switching control unit of a blade server. When the switching board is normally running, the configuration file of the switching board is indispensable. If the switching board has a configuration file loss fault, the switching board needs to be accurately and quickly reconfigured.

[0003] In the related art, if the switching board has a configuration file loss fault, an operation and maintenance personnel can reconfigure the faulty switching board according to an archived configuration file. However, the switching board may have experienced configuration adjustment in the running process, so that the archived configuration file is not the configuration file required by the faulty switching board. Therefore, the above method cannot guarantee the correctness of the reconfiguration of the switching board. SUMMARY

[0004] The present application provides a fault processing method, device and equipment, which can guarantee the timeliness and correctness of the reconfiguration of the switching board when the switching board has a fault, and improves the fault processing effect of the switching board.

[0005] In a first aspect, the present application provides a fault processing method, comprising:

[0006] When a first switching board has a fault, obtaining a running log of the first switching board;

[0007] Determining a plurality of setting type commands in the running log;

[0008] Generating a configuration file corresponding to the first switching board according to the plurality of setting type commands, and sending the configuration file to the first switching board.

[0009] The above technical solution can obtain the running log of the first switching board when the first switching board has a fault, determine a plurality of setting type commands in the running log, and generate a configuration file corresponding to the first switching board according to the plurality of setting type commands, and send the configuration file to the first switching board. Thereby, the timeliness and correctness of the reconfiguration of the first switching board can be guaranteed, and the fault processing effect of the switching board is improved.

[0010] In a possible implementation manner, generating the configuration file corresponding to the first switching board according to the plurality of setting type commands comprises:

[0011] Obtaining a setting parameter of each setting type command, the setting type command being used for setting the setting parameter;

[0012] Obtaining an execution time of each setting type command;

[0013] According to the setting parameter of each setting class command and the execution time of each setting class command, a configuration file is generated.

[0014] The technical solution can generate a configuration file according to the setting parameters and execution times of multiple setting class commands, and achieve the purpose of regenerating a configuration file for a first switching board.

[0015] In a possible implementation, according to the setting parameter of each setting class command and the execution time of each setting class command, a configuration file is generated, including:

[0016] According to the setting parameter of each setting class command, a plurality of setting class command groups are determined in the multiple setting class commands, and the setting parameters of each setting class command in the setting class command group are the same;

[0017] According to the execution time of each setting class command, the setting class command with the latest execution time in each setting class command group is determined as a target setting class command, and a plurality of target setting class commands are obtained;

[0018] According to the plurality of target setting class commands, a configuration file is generated.

[0019] The technical solution can generate a configuration file according to the plurality of target device class commands, to ensure the correctness of the configuration file.

[0020] In a possible implementation, according to the setting parameter of each setting class command and the execution time of each setting class command, a configuration file is generated, including:

[0021] The multiple setting class commands are sorted according to the execution time from front to back;

[0022] The first setting class command after sorting is written into the configuration file; initially, the configuration file is empty;

[0023] If the i th setting class command corresponding to a to-be-replaced command does not exist in the configuration file, the i th setting class command is written into the configuration file; if the i th setting class command corresponding to the to-be-replaced command exists in the configuration file, the to-be-replaced command is replaced with the i th setting class command in the configuration file; wherein the setting parameters corresponding to the to-be-replaced command and the i th setting class command are the same; i is taken as 2, 3, …, N in turn, and N is the number of the multiple setting class commands.

[0024] The technical solution can write the setting class commands or the to-be-replaced commands corresponding to the setting class commands into the configuration file in turn according to the order of the execution time, to ensure the correctness of the configuration file.

[0025] In a possible implementation, when the first switching board is determined to be faulty, the running log of the first switching board is obtained, including:

[0026] When the first switching board fails, a first time when the first switching board fails is determined, and a second time when the first switching board is last restarted is determined;

[0027] A time period between the first time and the second time is determined as a first time period;

[0028] A running log of the first switching board in the first time period is obtained.

[0029] The above technical solution can obtain the running log between the time when the first switching board is last restarted and the time when the first switching board fails, thereby ensuring the effectiveness of the obtained running log.

[0030] In a possible implementation, a plurality of setting class commands are determined in the running log, including:

[0031] According to the configuration command keyword, a plurality of key logs are determined in the running log; the plurality of key logs include a plurality of query class commands and a plurality of setting class commands;

[0032] According to the query command keyword, the plurality of query class commands are determined in the plurality of key logs;

[0033] The plurality of query class commands are deleted in the plurality of key logs, to obtain the plurality of setting class commands.

[0034] The above technical solution can determine the plurality of key logs and the plurality of setting class commands in sequence, thereby avoiding the problem that directly determining the plurality of setting class commands may cause a large load of the management board.

[0035] In a possible implementation, the method is applied to the main management board, and the method further includes:

[0036] The configuration file is sent to the backup management board.

[0037] The above technical solution can send the configuration file to the backup management board, so that the backup management board stores the configuration file.

[0038] In a second aspect, the present application provides a server, the server including a first switching board and a main management board, wherein,

[0039] When the first switching board fails, the main management board executes the method of any one of the first aspect to send the generated configuration file to the first switching board.

[0040] The technical solution can acquire the running log of the first switching board when the first switching board fails, and can generate a configuration file according to the acquired running log; the configuration file can be sent to the first switching board, so that the first switching board can be reconfigured according to the configuration file, and the service can be recovered. Therefore, the timeliness and correctness of the reconfiguration of the first switching board can be ensured, and the fault processing effect of the switching board is improved.

[0041] In a possible implementation manner, the server further includes a backup management board, and the backup management board is configured to:

[0042] The main management board is further configured to send the configuration file to the backup management board.

[0043] The technical solution can send the configuration file to the backup management board, so that the backup management board can store the configuration file.

[0044] In a third aspect, the present application provides a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program is executed by a computer, the method in any one of the first aspect is implemented.

[0045] The technical solution can acquire the running log of the first switching board when the first switching board fails, and can generate a configuration file according to the acquired running log; the configuration file can be sent to the first switching board, so that the first switching board can be reconfigured according to the configuration file, and the service can be recovered. Therefore, the timeliness and correctness of the reconfiguration of the first switching board can be ensured, and the fault processing effect of the switching board is improved; the configuration file can be sent to the backup management board, so that the backup management board can store the configuration file. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0047] Figure 1 A schematic diagram of a blade server structure is provided for the embodiments of the present application;

[0048] Figure 2 A schematic diagram of a fault processing system architecture is provided for the embodiments of the present application;

[0049] Figure 3 A schematic diagram of a switching board configuration change is provided for the embodiments of the present application;

[0050] Figure 4Another switching board configuration change diagram provided by the embodiment of the present application;

[0051] Figure 5 A switching board fault processing method diagram provided by the embodiment of the present application;

[0052] Figure 6 A flow diagram of a fault processing method provided by the embodiment of the present application;

[0053] Figure 7 A diagram for determining the last restart time of the first switching board provided by the embodiment of the present application;

[0054] Figure 8 A diagram for obtaining the running log of the first switching board provided by the embodiment of the present application;

[0055] Figure 9 A diagram of the running log of the first switching board provided by the embodiment of the present application;

[0056] Figure 10 A set class command diagram provided by the embodiment of the present application;

[0057] Figure 11 Another flow diagram of a fault processing method provided by the embodiment of the present application;

[0058] Figure 12 A structure diagram of a fault processing device provided by the embodiment of the present application;

[0059] Figure 13 A hardware structure diagram of a fault processing device provided by the present application. DETAILED DESCRIPTION

[0060] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, the same numbers refer to the same elements throughout the drawings. The following exemplary embodiments described in the following description are not meant to be limiting of the present application. Instead, they are meant to provide an example of apparatus and methods in accordance with aspects of the present application as detailed in the following claims.

[0061] It should be noted that, in this document, the terms "comprising", "including", or any other variant thereof are intended to cover a non-exclusive inclusion, such that processes, methods, articles, or apparatuses that comprise a list of elements are not limited to those elements, but can include other elements not expressly listed or inherent to such processes, methods, articles, or apparatuses. Without more limitations, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0062] Embodiments of the present application relate to a blade server. For ease of understanding, first, the blade server is described in combination with Figure 1 The blade server is described in detail.

[0063] Figure 1 A blade server structure schematic diagram is provided for embodiments of the present application. Please refer to Figure 1 The blade server 100 includes a plurality of server boards 101, a backplane 102, a switching board 103, and a management board 105. Each server board 101 is similar in shape to a blade. Each server board 101 is an independent system motherboard. On the one hand, each server board 101 can start its own operating system through a local hard disk, serve different user groups designated, and have no association with each other. On the other hand, the blade server 100 can also be used to form a server cluster with system software. In the cluster mode, all server boards 101 can be connected to provide a high-speed network environment and share resources, and provide services for the same user group.

[0064] For ease of understanding, the fault processing system architecture related to embodiments of the present application is described below in combination with Figure 2 The fault processing system architecture related to embodiments of the present application is described.

[0065] Figure 2 A fault processing system architecture schematic diagram is provided for embodiments of the present application. Please refer to Figure 2 The blade server 100 includes a server board 101, a backplane 102, a switching board 103, a management board 104, and a management board 105.

[0066] A plurality of server boards 101 similar in shape to a blade can be plugged into the blade server 100. The server board 101 can include a processor, a memory, a hard disk, a motherboard, a redundant array of independent disks (RAID) card, and a network card, etc. The server board 101 cooperates with the power supply and the chassis of the blade server 100 and other basic hardware to provide central processing unit (CPU) computing power, external data throughput capacity, or data storage services.

[0067] The backboard 102 can be a circuit board for device interconnection in the blade server 100. The backboard 102 can connect the server board 101 and the switching board 103.

[0068] The switching board 103 is a switching control unit of the blade server 100. The blade server 100 can include one or more switching boards 103. The switching board 103 can provide data switching functions for the plurality of server boards 101 in the blade server 100, and can centrally provide service interfaces and management interfaces. The switching board 103 can be interconnected with the server board 101 and the management board 104 / management board 105 through the backboard 102 to realize the switching of data packets and control and management packets in the blade server 100, and to provide high-speed data transmission for users.

[0069] Either of the management board 104 and the management board 105 serves as a main management board, and the other serves as a redundant module or a backup module of the main management board. The redundant module or the backup module has the same functions as the main management board. The management board can manage power supplies, fans, computing nodes, switching boards and other hardware devices in the blade server 100. The management board supports the Simple Network Management Protocol (SNMP) and the Intelligent Platform Management Interface (IPMI), supports the Graphical User Interface (GUI), supports the Keyboard Video Mouse (KVM), supports virtual media, remote control, hardware monitoring, intelligent power supply and historical power consumption and other comprehensive management functions.

[0070] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the blade server 100. In other embodiments of the present application, the blade server 100 can include more or fewer components than illustrated, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software or a combination of software and hardware.

[0071] The configuration file of the switching board is indispensable when the switching board normally operates services. The switching board needs to read the configuration file when normally operating services. If the switching board has a configuration file loss fault, the services operated by the switching board will be affected. For example, the configuration file loss fault can be caused by configuration file deletion, switching board file system error, switching board failure and the like.

[0072] In the related art, if the configuration file of the switching board is lost, the operation and maintenance personnel can reconfigure the switching board according to the archived configuration file, so that the switching board can normally operate the service.

[0073] In the following, combined with Figure 3 The change of the configuration of the switching board during operation is analyzed in detail.

[0074] Figure 3 A configuration change diagram of the switching board is provided for the embodiments of the present application. Please refer to Figure 3 Before the configuration file of the switching board is lost, there are several important moments of the configuration change of the switching board. The above-mentioned several important moments are sequentially obtained by reversing the time sequence from the last to the front, which are:

[0075] Moment 1: The configuration file of the switching board is lost at moment 1, resulting in abnormal service of the switching board.

[0076] Moment 2: Moment 2 is the moment before moment 1. At moment 2, the switching board is normally operated.

[0077] Moment 3: Moment 3 is the moment of configuration increase, configuration decrease or configuration modification of the switching board.

[0078] It should be understood that moment 3 can exist or moment 3 can not exist.

[0079] For example, assuming that the switching board is configured to increase, decrease or modify multiple times during operation, there are multiple moments 3 during the operation of the switching board. Assuming that the switching board does not increase, decrease or modify the configuration during operation, moment 3 does not exist.

[0080] Moment 4: Moment 4 is the initialization configuration moment of the switching board.

[0081] Moment 5: Moment 5 is the last restart moment of the switching board.

[0082] Moment 6: Moment 6 is the moment before moment 5. The time period before moment 6 is the set of all moments before the last restart moment of the switching board. In the embodiments of the present application, the state of the switching board at moment 6 can be recorded as an unknown state.

[0083] According to the above analysis, there can be multiple configuration increasing, configuration reducing or configuration modifying moments in the process of running the switching board, thereby causing the archived configuration file not to be the configuration file required by the faulty switching board. Therefore, the reconfiguration of the switching board by the operation and maintenance personnel according to the archived configuration file can cause the reconfiguration of the switching board to fail, resulting in the failure of the switching board to recover the service. Secondly, in the above method, the archived configuration file needs to be found first, and then the switching board is reconfigured according to the found configuration file. After the configuration takes effect, it is verified whether the service running on the switching board is recovered to normal. The whole process takes a long time. Therefore, the above method cannot guarantee the timeliness and correctness of the reconfiguration of the switching board, resulting in poor fault handling effect of the switching board.

[0084] Therefore, the present application provides a fault handling method according to the configuration changes in the process of running the switching board, which improves the fault handling effect of the switching board. As shown in Figure 4 Figure 4 Another switching board configuration change diagram provided by the embodiments of the present application. Please refer to Figure 4 , the switching board loses the configuration file at time 1, causing the switching board service to be abnormal. Time 2 is the time before time 1. The switching board is running normally at time 2. Therefore, at time 2, the configuration running on the switching board is the configuration required to reconfigure the switching board. Therefore, the present application can reconfigure the faulty switching board according to the configuration of the switching board at time 2, so that the switching board can recover the service.

[0085] Time 2 is located in the time interval from time 5 to time 1. As shown in Figure 4 , time 5 can be recorded as T1, and time 1 can be recorded as T2. The T1-T2 time interval is the smallest time interval that can be determined containing time 2. The fault handling method provided by the present application can generate a correct configuration file according to the running log of the switching board in the T1-T2 time interval, and reconfigure the switching board according to the correct configuration file.

[0086] Next, the fault handling method provided by the present application will be described in combination with Figure 5 .

[0087] Figure 5 A switching board fault handling method diagram provided by the embodiments of the present application. Please refer to Figure 5 , the blade server 100 includes a switching board 103, a management board 104 and a management board 105. Among them, the management board 104 is the main management board, and the management board 105 is the standby management board of the management board 104.

[0088] ​The switching board 103 comprises a file system 1031 in the switching board 103. The file system 1031 can store the running log of the switching board 103.

[0089] The management board 104 is provided with a configuration generator 1041. If the switching board 103 has a configuration file loss fault, the management board 104 can obtain the running log of the switching board 103 from the file system 1031 through the configuration generator 1041. Alternatively, the management board 104 can obtain the running log of the switching board 103 in the time period from T1 to T2 from the file system 1031 through the configuration generator 1041. The configuration generator 1041 can process and analyze the running log of the switching board 103, and generate a correct configuration file according to the running log. The management board 104 can also send the correct configuration file to the switching board 103, so that the switching board 103 can realize the purpose of restoring the service according to the correct configuration file. At the same time, the management board 104 can also send the correct configuration file to the management board 105, so that the management board 105 can backup and save the correct configuration file. Through the above method, the timeliness and correctness of the reconfiguration of the switching board can be ensured, and the fault processing effect of the switching board is improved.

[0090] The technical solutions of the present application will be described in detail in the following specific embodiments. The following several specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in some embodiments.

[0091] Figure 6 A flowchart of a fault processing method provided by an embodiment of the present application is shown in FIG. 6. As shown in FIG. 6, the method can comprise the following steps. Figure 6

[0092] S601, the management board determines that the first switching board has a fault.

[0093] In this embodiment, the blade server can comprise one or more switching boards.

[0094] The management board can monitor the running data and / or running state of the one or more switching boards in real time.

[0095] The first switching board is a switching board that has a fault and is waiting to restore the service.

[0096] According to different contents monitored by the management board, the management board determines that the first switching board has a fault, which at least includes the following two cases.

[0097] Case 1: The management board determines that the first switching board has a configuration fault according to the running data of the first switching board.

[0098] ​In this case, the management single board can monitor the plurality of running data of the first switching single board in real time. For example, the management single board can monitor the memory usage information, the power usage information, and the like of the first switching single board.

[0099] If the management single board does not monitor the running data of the first switching single board in the first preset time length from the first time, the management single board can determine that the first switching single board has a configuration fault. That is, if the monitoring data is lost and the time of the lost monitoring data is greater than or equal to the first preset time length, the management single board can determine that the first switching single board has a configuration fault.

[0100] For example, it is assumed that the first preset time length is 5 seconds. If the management single board does not monitor the running data of the first switching single board for 5 seconds continuously from the time t, the management single board can determine that the first switching single board has a configuration fault.

[0101] Case 2: The management single board determines that the first switching single board has a configuration fault according to the running state of the first switching single board.

[0102] The running state of the first switching single board can include normal running and abnormality. When the running state of the first switching single board is normal running, the first switching single board does not have a fault; and when the running state of the first switching single board is abnormality, the first switching single board has a configuration fault.

[0103] In this case, the management single board can monitor the running state of the first switching single board in real time. If the management single board monitors that the running state of the first switching single board is abnormality, the management single board can determine that the first switching single board has a configuration fault.

[0104] S602: The management single board determines the first time when the first switching single board has a fault.

[0105] The first time can be recorded as time T2.

[0106] The time T2 when the first switching single board has a fault can be the starting time of the lost monitoring data; or the time T2 when the first switching single board has a fault can be the time when the management single board monitors that the running state of the first switching single board is abnormality.

[0107] For example, it is assumed that the management single board can monitor the plurality of running data of the first switching single board in real time, and the first preset time length is 5 seconds. If the management single board does not monitor the running data of the first switching single board for 5 seconds continuously from the time t1, the management single board can determine that the time T2 when the first switching single board has a fault is the time t1.

[0108] It is assumed that the management single board can monitor the running state of the first switching single board in real time. If the management single board monitors that the running state of the first switching single board is abnormality at the time t2, the management single board can determine that the time T2 when the first switching single board has a fault is the time t2.

[0109] S603, the management board determines a second time when the first switching board was last restarted.

[0110] The second time can be recorded as time T1.

[0111] In this embodiment, the management board is provided with a configuration generator. The management board can query the running log of the first switching board through the configuration generator, and determine the time T1 when the first switching board was last restarted according to the running log of the first switching board.

[0112] Specifically, the configuration generator can be automatically started after the management board determines that the first switching board has failed. The management board can query the restart log of the first switching board in the file system of the first switching board through the configuration generator, and determine the time T1 when the first switching board was last restarted according to the restart log.

[0113] It should be understood that the first switching board has one or more restart logs. Each restart log can include a restart time. The management board can determine the restart time closest to time T2 as the time T1 when the first switching board was last restarted.

[0114] For example, it is assumed that the running log of the first switching board includes three restart logs. The restart times corresponding to the three restart logs are time t1, time t2 and time t3, respectively. Figure 7 A schematic diagram for determining the time T1 when the first switching board was last restarted is provided for the embodiments of the present application. Please refer to Figure 7 , the positions of time t1, time t2, time t3 and T2 on the time axis are as shown in Figure 7 It can be seen from Figure 7 that among the times t1, t2 and t3 corresponding to the three restart logs, the time t2 is closest to time T2. Therefore, the management board can determine the time t2 as the time T1 when the first switching board was last restarted.

[0115] S604, the management board obtains the running log of the first switching board within a first time period, and the first time period is the time period between the first time and the second time.

[0116] In this embodiment, the management board can obtain the running log of the first switching board through the configuration generator.

[0117] After determining the time T2 when the first switching board failed and the time T1 when the first switching board was last restarted, the configuration generator can obtain the running log of the first switching board within the time period T1-T2 from the file system of the first switching board.

[0118] Optionally, a communication interface is arranged between the management board and the first switching board. The configuration generator can obtain the running log of the first switching board in the T1-T2 time period from the file system of the first switching board through the communication interface.

[0119] In the following, the process of obtaining the running log by the management board is described. Figure 8 In the following, the process of obtaining the running log by the management board is described.

[0120] Figure 8 A running log obtaining schematic diagram of a first switching board is provided for the embodiment of the present application. Please refer to Figure 8 The switching board 103 comprises a file system 1031 and a management module 1032. The file system 1031 and the management module 1032 can communicate with each other. The file system 1031 comprises the running log of the switching board 103.

[0121] The management board 104 comprises a configuration generator 1041 and a local area network switch 1042. The configuration generator 1041 and the local area network switch 1042 can communicate with each other. The local area network switch 1042 is provided with a Gigabit Ethernet (GE) interface. The management board 104 can be connected (communicate) with the management module 1032 of the switching board 103 through the GE interface.

[0122] In the embodiment, the configuration generator 1041 can obtain the running log of the first switching board from the file system 1031 through the local area network switch 1042 and the management module 1032. For example, the path of the configuration generator 1041 to obtain the running log can be as shown by the dotted line path in Figure 8

[0123] S605, the management board retains a plurality of setting class commands in the running log.

[0124] The setting class command is the running log of configuring, or adding configuration, or reducing configuration, or modifying configuration of the first switching board.

[0125] In the following, the running log obtained by the management board is described. Figure 9 In the following, the running log obtained by the management board is described.

[0126] Figure 9 A running log schematic diagram of a first switching board is provided for the embodiment of the present application. Please refer to Figure 9 The running log of the first switching board in the T1-T2 time period can comprise fault alarm, debug diagnosis, system security log, query class command, setting class command, etc. Among them, the query class command and the setting class command belong to the key log of the first switching board. The configuration command keyword can be contained in the query class command and the setting class command. ​

[0127] In this embodiment, the management board can filter the key logs from the obtained running logs according to the configuration command keyword. That is, the management board can filter the query type commands and the setting type commands from the obtained running logs according to the configuration command keyword.

[0128] The configuration command keywords of the first switching boards produced by different manufacturers are different. That is, the corresponding configuration command keyword can be determined according to the manufacturer of the first switching board. For example, the configuration command keyword of the first switching board can be “command” and the like.

[0129] For example, it is assumed that the configuration command keyword of the first switching board is “command”. The management board can search “command” in the obtained running logs through the configuration generator, and keep the logs containing “command”. The logs containing “command” are the key logs.

[0130] Further, the query type commands can contain query command keywords. The management board can filter the query type commands from the key logs according to the query command keyword, and delete the query type commands and keep the setting type commands.

[0131] The query command keywords of the first switching boards produced by different manufacturers are different. That is, the corresponding query command keyword can be determined according to the manufacturer of the first switching board. For example, the query command keyword of the first switching board can be “display”, “show” and the like.

[0132] For example, it is assumed that the query command keyword of the first switching board is “display”. The management board can search “display” in the key logs through the configuration generator, and delete the logs containing “display” and keep the remaining key logs. The remaining key logs are the setting type commands.

[0133] In this embodiment, the management board does not directly filter the setting type commands in the obtained running logs, but first filters the key logs in the running logs of the first switching board in the T1-T2 time period, and then filters the setting type commands in the key logs. Since the number of running logs is large, by the above method, the problem of large load of the management board caused by directly filtering the setting type commands in the obtained running logs by the management board can be avoided.

[0134] S606, the management board sorts the plurality of setting type commands.

[0135] The management board can sort the plurality of setting type commands in the order from the front to the back according to the execution time.

[0136] It should be understood that the setting parameter can be included in each setting class command and the execution time of each setting class command.

[0137] In this embodiment, the configuration generator in the management board can sort the plurality of setting class commands according to the execution time from front to back according to the execution time in each setting class command.

[0138] S607, the management board generates a configuration file according to the plurality of setting class commands.

[0139] The configuration file can be the splicing result of the plurality of setting class commands.

[0140] In this embodiment, the first setting class command after sorting can be written into the configuration file; initially, the configuration file is empty; if the i-th setting class command corresponding to the to-be-replaced command does not exist in the configuration file, the i-th setting class command is written into the configuration file; if the i-th setting class command corresponding to the to-be-replaced command exists in the configuration file, the to-be-replaced command is replaced with the i-th setting class command in the configuration file; wherein the to-be-replaced command and the i-th setting class command correspond to the same setting parameter; i is taken as 2, 3, …, N in turn, and N is the number of the plurality of setting class commands.

[0141] The to-be-replaced command corresponding to the i-th setting class command can be a setting class command with the same setting parameter as the i-th setting class command and later than the execution time of the i-th setting class command.

[0142] Specifically, for the plurality of setting class commands corresponding to any setting parameter, the setting result of the setting class command with the latest execution time is used as the reference. That is, for the plurality of setting class commands corresponding to the same setting parameter, the setting result of the setting class command spliced later covers the setting result of the setting class command spliced earlier.

[0143] Next, the process of splicing the setting class commands by the management board will be described. Figure 10 The process of splicing the setting class commands by the management board will be described.

[0144] Figure 10 A setting class command diagram provided by an embodiment of the present application is provided. Please refer to Figure 10 , it is assumed that the plurality of setting class commands are in the order of setting class command 1, setting class command 2, setting class command 3, setting class command 4 and setting class command 5 from front to back according to the execution time.

[0145] Among them, the setting parameters corresponding to the setting class command 1, the setting class command 3 and the setting class command 4 are the same. That is, the setting class command 1 is the to-be-replaced command of the setting class command 3, and the setting class command 3 is the to-be-replaced command of the setting class command 4.

[0146] Initially, the configuration file is empty. The management board can write multiple setting class commands into the configuration file in sequence to splice the final configuration file.

[0147] Firstly, the management board writes the setting class command 1 into the configuration file, because the configuration file does not contain the to-be-replaced command corresponding to the first setting class command. Secondly, the management board writes the setting class command 2 into the configuration file in sequence, because the configuration file does not contain the to-be-replaced command corresponding to the second setting class command. Thirdly, the management board replaces the setting class command 1 with the setting class command 3 in the configuration file, because the configuration file contains the to-be-replaced command (the setting class command 1) corresponding to the third setting class command. Fourthly, the management board replaces the setting class command 3 with the setting class command 4 in the configuration file, because the configuration file contains the to-be-replaced command (the setting class command 3) corresponding to the fourth setting class command. Finally, the management board writes the setting class command 5 into the configuration file in sequence, because the configuration file does not contain the to-be-replaced command corresponding to the fifth setting class command, and the final configuration file is formed.

[0148] Through the above method, the management board can splice multiple setting class commands in sequence according to the time sequence to generate the configuration file.

[0149] S608, the management board sends the configuration file to the first switching board.

[0150] The management board can send the configuration file to the first switching board through the communication interface between the management board and the first switching board, so that the first switching board can be reconfigured according to the configuration file.

[0151] The communication interface between the management board and the first switching board can be referred to S604, which will not be described here.

[0152] S609, the management board sends the configuration file to the standby management board.

[0153] In this embodiment, two management boards can be set, one of which is the main management board, and the other is the redundant management board / standby management board of the main management board. The main management board and the redundant management board / standby management board have the same function and information exchange. If the main management board fails, the redundant management board / standby management board can replace the main management board at any time.

[0154] It should be understood that the management board in S601-S609 is the main management board. The management board can send the configuration file to the standby management board, so that the standby management board stores the configuration file.

[0155] It should be understood that S609 can be performed before S608; or, S609 can be performed after S608; or, S609 can be performed simultaneously with S608. The present application does not limit this.

[0156] In the fault processing method provided by the embodiment, the management board can determine the time T2 when the first switching board fails and the time T1 when the first switching board is restarted last time. The management board can obtain the running log of the first switching board in the time period T1-T2, and can generate a configuration file according to the obtained running log. The management board can send the configuration file to the first switching board, so that the first switching board can be reconfigured according to the configuration file and the service can be restored. Through the above method, the timeliness and correctness of the reconfiguration of the first switching board can be ensured, and the fault processing effect of the switching board is improved.

[0157] On the basis of any of the above embodiments, the following will be described in combination with Figure 11 The fault processing method shown in the present application is described.

[0158] Figure 11 Another flowchart of a fault processing method provided by the embodiment of the present application is shown. As shown in the figure, the method of the embodiment includes: Figure 11

[0159] S1101, when the first switching board fails, obtaining the running log of the first switching board.

[0160] The execution subject of the embodiment of the present application can be a management board, or a fault processing device in the management board. Optionally, the fault processing device can be realized by software, or realized by the combination of software and hardware.

[0161] In the embodiment, whether the first switching board fails can be determined according to the running data and / or running state of the first switching board.

[0162] The specific implementation of determining that the first switching board fails can be referred to S601, which will not be described here.

[0163] The running log of the first switching board can be the running log of the first switching board in the time period from the time T1 when the first switching board is restarted last time to the time T2 when the first switching board fails.

[0164] The specific implementation of obtaining the running log of the first switching board can be referred to S602-S604, and Figure 8 Embodiment, which will not be described here.

[0165] S1102, determining a plurality of setting type commands in the running log.

[0166] ​For details on how to implement multiple setting commands in the runtime log, please refer to [link / reference]. Figure 9 Examples are not described here.

[0167] S1103. Generate the configuration file corresponding to the first switching board based on multiple configuration commands, and send the configuration file to the first switching board.

[0168] In this embodiment, the setting parameters of each setting command can be obtained, and the setting commands are used to set the setting parameters; the execution time of each setting command can be obtained; and a configuration file can be generated based on the setting parameters and the execution time of each setting command.

[0169] In one possible implementation, multiple configuration command groups can be determined from multiple configuration command groups based on the configuration parameters of each configuration command group, where the configuration parameters of each configuration command group are the same; based on the execution time of each configuration command, the configuration command with the latest execution time in each configuration command group is determined as the target configuration command, resulting in multiple target configuration commands; and a configuration file is generated based on the multiple target configuration commands.

[0170] A set of settings commands can include multiple settings commands that share the same setting parameter.

[0171] For any given setting parameter, the target setting command can be the setting command that was executed latest for that setting parameter.

[0172] The method for identifying the target setting command within each setting command group is the same. Assume that multiple setting commands can be divided into setting command group A, setting command group B, ..., and setting command group N. Below, we will explain the setting method for the target setting command by taking the example of identifying the target setting command within setting command group A.

[0173] Suppose that command group A contains n configuration commands, and the execution times of these n configuration commands are t1, t2, ..., tn. n Sort the n execution times in chronological order, and the latest execution time among the n execution times is t. n Then t n The setting command corresponding to the current time is determined to be the target setting command of setting command group A.

[0174] Multiple target setting commands can be identified based on their configuration methods. Concatenating these commands sequentially generates a configuration file.

[0175] In another possible implementation, the plurality of setting class commands can be sorted in the order from the time of execution to the back, and the configuration file can be generated according to the sorted plurality of setting class commands. This can be referred to as S607, and will not be repeated here.

[0176] The specific implementation of sending the configuration file to the first switching board can be referred to as S608, and will not be repeated here.

[0177] In the fault processing method provided in this embodiment, when it is determined that the first switching board is faulty, the running log of the first switching board can be acquired; the plurality of setting class commands can be determined in the running log; and the configuration file corresponding to the first switching board can be generated according to the plurality of setting class commands, and the configuration file can be sent to the first switching board. Through the above method, the timeliness and correctness of the reconfiguration of the first switching board can be ensured, and the fault processing effect of the switching board is improved.

[0178] Figure 12 A structural diagram of a fault processing apparatus provided in this embodiment is shown in FIG. 13. Figure 12 The fault processing apparatus 10 includes an acquisition module 11, a determination module 12, a generation module 13, and a sending module 14, wherein,

[0179] The acquisition module 11 is configured to acquire the running log of the first switching board when it is determined that the first switching board is faulty.

[0180] The determination module 12 is configured to determine the plurality of setting class commands in the running log.

[0181] The generation module 13 is configured to generate the configuration file corresponding to the first switching board according to the plurality of setting class commands.

[0182] The sending module 14 is configured to send the configuration file to the first switching board.

[0183] In a possible implementation, the generation module 13 is specifically configured to,

[0184] acquire the setting parameter of each setting class command, the setting class command being used to set the setting parameter;

[0185] acquire the time of execution of each setting class command;

[0186] generate the configuration file according to the setting parameter of each setting class command and the time of execution of each setting class command.

[0187] In a possible implementation, the generation module 13 is specifically configured to,

[0188] According to the setting parameters of each setting class command, a plurality of setting class command groups are determined from the plurality of setting class commands, and setting parameters of each setting class command in the setting class command group are identical;

[0189] According to execution time of each setting class command, a setting class command with the latest execution time in each setting class command group is determined as a target setting class command, and a plurality of target setting class commands are obtained;

[0190] According to the plurality of target setting class commands, the configuration file is generated.

[0191] In a possible implementation, the generating module 13 is specifically configured to,

[0192] The plurality of setting class commands are sorted according to execution time from front to back;

[0193] The first setting class command after sorting is written into the configuration file; initially, the configuration file is empty;

[0194] If the i th setting class command corresponding to a to-be-replaced command does not exist in the configuration file, the i th setting class command is written into the configuration file; if the i th setting class command corresponding to the to-be-replaced command exists in the configuration file, the to-be-replaced command is replaced with the i th setting class command in the configuration file; wherein the to-be-replaced command and the i th setting class command correspond to the same setting parameter; the i is 2, 3, …, N in turn, and the N is the number of the plurality of setting class commands.

[0195] In a possible implementation, the obtaining module 11 is specifically configured to,

[0196] When the first switching board fails, a first time when the first switching board fails and a second time when the first switching board is restarted last time are determined;

[0197] A time period between the first time and the second time is determined as a first time period;

[0198] The running log of the first switching board in the first time period is obtained.

[0199] In a possible implementation, the determining module 12 is specifically configured to,

[0200] According to a configuration command keyword, a plurality of key logs are determined from the running log; the plurality of key logs include a plurality of query class commands and the plurality of setting class commands;

[0201] According to a query command keyword, a plurality of query class commands are determined from the plurality of key logs;

[0202] delete the plurality of query type commands in the plurality of key logs to obtain the plurality of setting type commands.

[0203] In a possible implementation, the sending module 14 is further configured to send the configuration file to a backup management board.

[0204] Figure 13 A hardware structure schematic diagram of the fault processing device provided in the present application is shown in FIG. 2. Figure 13 The fault processing device 20 can include a processor 21 and a memory 22, wherein the processor 21 and the memory 22 can communicate; for example, the processor 21 and the memory 22 communicate through a communication bus 23, the memory 22 is configured to store program instructions, and the processor 21 is configured to invoke the program instructions in the memory to execute the fault processing method shown in any method embodiment described above.

[0205] Optionally, the fault processing device 20 can further include a communication interface, and the communication interface can include a transmitter and / or a receiver.

[0206] Optionally, the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the present application can be directly embodied as hardware processor execution, or executed by a combination of hardware and software modules in the processor.

[0207] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a computer to implement the fault processing method executed by any one of the above method embodiments, and the implementation principle and technical effects are similar, and thus are not described here.

[0208] The embodiment of the present application further provides a computer program product, which includes a computer program, and the computer program is executed by a computer to implement the fault processing method executed by any one of the above method embodiments, and the implementation principle and technical effects are similar, and thus are not described here.

[0209] The embodiment of the present application further provides a server, which includes a first switching board and a main management board, wherein,

[0210] The main management board executes the fault processing method executed by any of the method embodiments to send the generated configuration file to the first switching board when determining that the first switching board is faulty.

[0211] Optionally, the server further comprises a backup management board, wherein,

[0212] The main management board is further configured to send the configuration file to the backup management board.

[0213] The server provided by the embodiment can be used to execute the technical solutions shown in any of the method embodiments, and has similar implementation principles and technical effects, which will not be described here.

[0214] All or part of the steps of the above method embodiments can be completed by program instruction related hardware. The foregoing program can be stored in a readable memory. When the program is executed, the steps of the above method embodiments are executed; and the foregoing memory (storage medium) includes: read-only memory (English: read-only memory, abbreviation: ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape (English: magnetic tape), floppy disk (English: floppy disk), optical disc (English: optical disc), and any combination thereof.

[0215] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams according to the methods, devices (systems), and computer program products of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to the processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable terminal equipment to produce a machine, so that the instructions executed by the processing unit of the computer or other programmable terminal equipment produce a device that implements the functions specified in the flow Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The functions specified in one block or multiple blocks.

[0216] These computer program instructions can also be stored in a computer readable memory that can guide the computer or other programmable terminal equipment to work in a specific way, so that the instructions stored in the computer readable memory produce a product including instruction devices that implement the functions specified in the flow Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The functions specified in one block or multiple blocks.

[0217] These computer program instructions can also be loaded into a computer or other programmable terminal device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer implemented process, and the instructions executed on the computer or other programmable device provide a process for implementing the functions specified in the flowchart Figure 1 one flow or multiple flows and / or the functions specified in the block Figure 1 one block or multiple blocks.

[0218] Obviously, those skilled in the art can make various modifications and variations to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.

[0219] In the present application, the term "comprising" and its variants can refer to non-limiting inclusion; the term "or" and its variants can refer to "and / or". In the present application, the terms "first", "second" and the like are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. In the present application, "multiple" refers to two or more. "And / or", which describes the relationship between the associated objects, means that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents a "or" relationship between the associated objects.

Claims

1. A fault handling method, characterized in that, include: When a fault is determined in the first switching board, the operation log of the first switching board is obtained; Several configuration commands were identified in the operation log; Based on the multiple configuration commands, a configuration file corresponding to the first switching board is generated, and the configuration file is sent to the first switching board.

2. The method according to claim 1, characterized in that, The step of generating the configuration file corresponding to the first switching board based on the plurality of setting commands includes: Obtain the setting parameters for each setting command, wherein the setting command is used to set the setting parameters; Get the execution time of each setting command; The configuration file is generated based on the setting parameters of each setting command and the execution time of each setting command.

3. The method according to claim 2, characterized in that, The step of generating the configuration file based on the setting parameters of each setting command and the execution time of each setting command includes: Based on the setting parameters of each setting command, multiple setting command groups are determined from the plurality of setting commands, wherein the setting parameters of each setting command in the setting command group are the same; Based on the execution time of each setting command, the setting command with the latest execution time in each setting command group is determined as the target setting command, resulting in multiple target setting commands; The configuration file is generated based on the multiple target setting commands.

4. The method according to claim 2, characterized in that, The step of generating the configuration file based on the setting parameters of each setting command and the execution time of each setting command includes: The multiple setting commands are sorted in order of execution time from beginning to end; Write the first sorted setting command to the configuration file; initially, the configuration file is empty. If the configuration file does not contain a replacement command corresponding to the i-th setting command, then the i-th setting command is written into the configuration file; if the configuration file contains a replacement command corresponding to the i-th setting command, then the replacement command is replaced with the i-th setting command in the configuration file; wherein the replacement command has the same setting parameters as the i-th setting command; i takes the values ​​2, 3, ..., N in sequence, and N is the number of the plurality of setting commands.

5. The method according to any one of claims 1-4, characterized in that, When a fault is determined in the first switching board, the operation log of the first switching board is obtained, including: When the first switching board fails, determine the first moment when the first switching board fails and the second moment when the first switching board last restarted; The time period between the first time point and the second time point is defined as the first time period; Obtain the operation log of the first switching board during the first time period.

6. The method according to any one of claims 1-4, characterized in that, The process of identifying multiple setting commands in the operation log includes: Based on the configuration command keywords, multiple key logs are identified in the running log; the multiple key logs include multiple query commands and multiple setting commands. Based on the query command keywords, identify multiple query class commands in the multiple key logs; Delete the multiple query commands from the multiple key logs to obtain the multiple setting commands.

7. The method according to any one of claims 1-4, characterized in that, The method is applied to the main management board, and the method further includes: Send the configuration file to the backup management board.

8. A server, characterized in that, The server includes a first switching board and a main management board, wherein, When the main management board determines that the first switching board is faulty, the main management board executes the method described in any one of claims 1-7 to send the generated configuration file to the first switching board.

9. The server according to claim 8, characterized in that, The server also includes a backup management board, wherein... The main management board is also used to send the configuration file to the backup management board.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a computer, implements the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Seamless switch-over system of data link based on Ethernet exchange and its method

    CN101047538A

  • Apparatus and method for management of fault historyin exchange

    KR1020030010916A