Switch port fault repairing method, device, equipment and medium
By automatically obtaining and monitoring switch port attribute information, defining fault levels and performing self-recovery operations, it solves the complex problems of switch port fault diagnosis and repair processes, and achieves fast and accurate fault location and repair, improving the stability and reliability of the system.
Patent Information
- Application Number
- CN202411996801.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-30
AI Technical Summary
In AI servers, the diagnosis and repair process of switch port failures is complex, relies on manual collection and analysis of logs, and the analysis of the cause of failure depends on problem reproduction, resulting in inefficiency and inconsistent results, making it difficult to quickly locate and repair.
By automatically obtaining the type and attribute information of the switch port, monitoring the rate, bandwidth and error count in real time, defining the fault level and matching the self-recovery operation strategy, automatic fault repair is achieved.
It improves fault diagnosis efficiency, reduces manual intervention, ensures system stability and reliability, reduces maintenance costs and downtime, and enhances the system's automation and intelligent processing capabilities.
Smart Images

Figure CN119814701A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a switch port fault repair method, device, equipment and medium. Background Art
[0002] With the development of AI servers, the topology of the high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, PCIE for short) is becoming more and more complex, and there are more and more external device models, especially GPUs. There are many manufacturers and some products have not been verified on a large scale, and the shipment volume is small. Various error reports are inevitable in actual use. Every time a problem occurs, engineers need to go deep into the site to collect logs and analyze the specific causes. In fault location, logs need to be collected from all directions, analyzed and compared, and the professional requirements are relatively high. Moreover, it is difficult to analyze the cause of the fault because the collected information is fragmented. The analysis of the cause of the fault depends more on the reproduction of the problem, but the reproduction of the problem will be affected by many factors and the reproduction cycle is long. The reproduction process may also be different from the actual situation before, and the cause cannot be analyzed very accurately. It may even cause the problem to be unable to be fully clarified, and then the specific cause cannot be analyzed.
[0003] In addition, many times it is just environmental or occasional failures that do not affect the use. If every problem needs to be clarified, it will seriously affect the efficiency of machine use. Summary of the invention
[0004] In view of this, the present invention provides a switch port fault repair method, device, equipment and medium to solve the above technical problems.
[0005] In a first aspect, the present invention provides a switch port fault repair method, the method comprising:
[0006] Obtaining the type of the switch port and target attribute information corresponding to each type of the switch port;
[0007] Read and record actual attribute information corresponding to each type of switch port;
[0008] When it is determined that the switch port has a fault according to the target attribute information and the actual attribute information, a fault level is determined;
[0009] According to the fault level, match the self-recovery operation strategy corresponding to the fault level;
[0010] According to the self-recovery operation strategy, the fault repair of the switch port is completed.
[0011] The present invention provides a switch port fault repair method, which has the following advantages:
[0012] By automatically obtaining the type of switch port and the corresponding actual attribute information, the tedious process of engineers manually collecting and analyzing logs is reduced, thereby improving the efficiency of fault diagnosis. By recording the actual attribute information and comparing it with the target attribute information, the port fault can be quickly located, reducing the complexity and time consumption of multi-faceted log collection. Due to the automation and systematization of information collection, the analysis of the cause of the fault no longer depends on the problem reproduction, reducing the problems of long reproduction cycle and inconsistent reproduction results. In addition, the fragmented information is integrated, making the fault analysis more direct and accurate, helping engineers to quickly find the root cause of the problem. Furthermore, the solution can automatically decide whether to perform self-recovery operations according to the fault level, improving the automation level of fault handling. By matching the fault level with the self-recovery operation strategy, fast and appropriate fault repair can be achieved, reducing the need for manual intervention. For environmental or occasional faults, the system can automatically identify and handle them without affecting the overall efficiency, thereby improving the stability and reliability of the system. The automated fault handling mechanism helps to reduce the downtime caused by faults and improve the availability of the system. Through the automated and intelligent fault handling process, the professional skills requirements of maintenance personnel are reduced, and the training and maintenance costs are reduced. Rapid fault location and repair reduces the number of on-site engineer visits, further reducing maintenance costs.
[0013] In an optional implementation, the attribute information corresponding to the switch port includes rate, bandwidth, correctable error, uncorrectable error, recovery count, and link status;
[0014] Determine whether a switch port fails based on the target attribute information and the actual attribute information, including:
[0015] When the actual rate is less than the target rate, it is determined that the switch port fails;
[0016] and / or, when the actual bandwidth is less than the target bandwidth, determining that the switch port fails;
[0017] and / or, determining that the switch port is faulty when a correctable error exists;
[0018] and / or, determining that the switch port is faulty when an uncorrectable error exists;
[0019] and / or, when a recovery count exists, determining that the switch port fails;
[0020] And / or, when the duration of the link being in the abnormal link state is greater than or equal to a first preset time threshold, it is determined that a switch port fails.
[0021] Specifically, by real-time monitoring of the switch port rate, bandwidth, error count, and link status, the system can detect potential faults in a timely manner and improve system stability and reliability. When the actual attribute information does not match the target attribute information, such as abnormal rate, bandwidth, error count, or link status, the system can accurately determine the port where the fault occurs, reducing the possibility of false alarms and missed alarms. By monitoring the link status, when the duration of the link in the abnormal state exceeds the preset threshold, the system can issue an early warning to prevent potential major failures. By ensuring that the switch port operates at the expected rate and bandwidth, the system can maintain optimal performance and avoid performance degradation caused by bandwidth limitations or improper error handling. The automated fault detection and repair process reduces the need for manual intervention, reduces maintenance costs, and improves maintenance efficiency.
[0022] In an optional implementation, the fault levels include: level one fault, level two fault, level three fault, and level four fault;
[0023] When it is determined that a switch port fails according to the target attribute information and the actual attribute information, the fault level is determined, including:
[0024] When there are correctable errors and the number of correctable errors is less than or equal to a first preset number threshold, and / or when there are recovery counts and the number of recovery counts is less than or equal to a second preset number threshold, determining that the fault level is a first-level fault;
[0025] Alternatively, when there are correctable errors, and the number of correctable errors is greater than a first preset number threshold, and less than or equal to a third preset number threshold, and / or, when there are uncorrectable errors, and the number of uncorrectable errors is less than or equal to a fourth preset number threshold, and / or, when the duration of the link being in the abnormal link state is greater than or equal to a first preset time threshold, and less than a second preset time threshold, it is determined that the fault level is level 2;
[0026] Alternatively, when the actual rate is less than the target rate, and / or when the actual bandwidth is less than the target bandwidth, and / or when the duration of the link being in the abnormal link state is greater than or equal to the second preset time threshold and less than the third preset time threshold, it is determined that the fault level is level three;
[0027] Alternatively, when the duration of the link being in the abnormal link state is greater than or equal to a third preset time threshold.
[0028] Specifically, by defining different fault levels (level 1, level 2, level 3, and level 4), the system can classify faults in detail, making it easier for engineers to take appropriate measures according to different fault levels. Level 1 faults usually represent the slightest anomaly and may not require immediate intervention; while level 4 faults are the most serious and require immediate response. This classification enables the system to respond quickly according to the urgency of the fault. Furthermore, according to the different fault levels, maintenance resources can be reasonably allocated, and more resources can be used to handle more serious faults, thereby improving maintenance efficiency and cost-effectiveness. Clear fault levels can help objects avoid excessive intervention in non-emergency faults and reduce the risk of misoperation. More serious faults can also be handled preferentially according to the fault level to improve work efficiency. Rapid response and appropriate handling of faults can enhance the overall reliability of the system.
[0029] In an optional implementation, when the fault level is level one, the self-recovery operation strategy includes: not performing the self-recovery operation;
[0030] When the fault level is level 2, the self-recovery operation strategy includes: disconnecting the previous link, creating a new link, and clearing the counted error reports, which include the reports for uncorrectable errors and the reports for correctable errors;
[0031] When the fault level is level 3, the self-recovery operation strategy includes: hot restarting the downstream equipment;
[0032] When the fault level is level 4, the self-recovery operation strategy includes: performing a cold restart operation on the downstream device.
[0033] Specifically, different self-recovery operation strategies can be adopted according to the fault level, so as to provide the most suitable repair strategy for faults of different severity, thereby improving the effectiveness of repair. For example, for a level 1 fault, not performing a self-recovery operation can avoid unnecessary system restarts, reduce resource consumption, and maintain system stability. Minimize the impact of service interruption on the object. For a level 2 fault, by disconnecting and creating a new link and clearing the number of error reports, the link performance can be quickly restored to help the system return to normal working state. Reduce error accumulation and optimize the overall system performance. For a level 3 fault, hot restarting the downstream device can quickly restore the device without shutting down the service, reduce service interruption time, and improve user experience. For a level 4 fault, performing a cold restart operation can completely shut down and restart the device, clear all runtime problems, ensure that the system solves the problem fundamentally, avoid the recurrence of the fault, and ensure the stable operation of the system. Furthermore, through an effective fault handling strategy, the frequency of repairing and replacing equipment can be reduced. Through recovery operations, the overall stability and reliability of the system can be improved. Reduce service interruptions and provide more stable and reliable services.
[0034] In an optional implementation, when the fault repair of the switch port is not completed according to the self-recovery operation strategy, the method further includes:
[0035] Identify the level at which self-recovery operations are performed;
[0036] When the self-recovery operation level is the pre-configured highest level, a hot restart operation is performed on the switch to which the switch port belongs and a peer device that establishes a communication connection with the switch at the same time, and / or a cold restart operation is performed at the same time, and operation records performed on the switch and the peer device are saved.
[0037] Specifically, when the self-recovery operation level is the highest pre-configured level, it means that the fault is already serious. The most effective measures must be taken quickly to improve the efficiency of fault resolution. Therefore, it is necessary to directly perform hot restart operations on the switch and the peer device that establishes a communication connection with the switch at the same time, and / or perform cold restart operations at the same time. Quickly restore the system and ensure that the system solves the problem fundamentally to reduce downtime caused by the fault. Ensure the consistency of the software and hardware status of the switch and the communication peer device to enhance the overall stability of the system. Saving operation records makes the operation process transparent, which helps other maintenance personnel or management personnel understand the history and details of fault handling.
[0038] In an optional embodiment, the method further includes:
[0039] Acquire an operation instruction transmitted through a preset data transmission channel, where the preset data transmission channel includes an in-band channel and / or an out-of-band transmission channel;
[0040] According to the operation instruction, a corresponding operation is performed on the recorded fault data corresponding to the switch port fault, wherein the operation instruction includes one or more of a data reading instruction, a parameter setting instruction, and a data acquisition mode configuration instruction.
[0041] Specifically, by supporting in-band channels and / or out-of-band transmission channels, the system can flexibly select the most appropriate data transmission method according to actual conditions, thereby improving the reliability and efficiency of data transmission. By using an out-of-band transmission channel to transmit operation instructions, the switch can be remotely controlled to handle the fault even when a switch port fails, thereby enhancing the remote management capability of the system. Providing data reading instructions, parameter setting instructions, and data acquisition method configuration instructions enables the system to perform a variety of operations, such as reading fault data, adjusting parameters, and configuring data acquisition methods, thereby increasing the functionality and adaptability of the system. By directly processing fault data according to operation instructions, faults can be responded to quickly, reducing the time for manual intervention and improving fault handling efficiency. This instruction-driven fault handling mechanism makes the system more manageable because all operations can be controlled and recorded through centralized instructions.
[0042] In an optional embodiment, the method further includes:
[0043] Complete the fault repair of the switch port according to the self-recovery operation strategy within a preset time range, wherein the preset time range includes any one of the following: at the moment of starting the first link; or, within the time period before performing the uplink hot start operation, or within the preset time period before the uplink is started.
[0044] Specifically, performing fault repair at the initial stage of link startup can ensure that the link is in good working condition at the initial stage. Repairing the fault before hot start can avoid additional problems during hot start and reduce the risk of system instability. Reserving time for fault repair before link startup can ensure that the link will not be affected by the fault during startup and improve the success rate of link startup. In summary, repairing the fault within the preset time range can limit the impact of the fault on other parts of the network. Through rapid repair, the impact of the fault on the object is reduced and the object satisfaction is improved. Rapid response and repair of faults can reduce subsequent maintenance work, thereby reducing maintenance costs. Timely repair of faults can ensure that network performance remains in the best state and avoid performance degradation caused by faults. The fault repair strategy within the preset time range enhances the resilience of the system and enables it to better cope with sudden faults.
[0045] In an optional example, when there are multiple failed switch ports, the method further includes:
[0046] Obtain the network traffic of each failed switch port;
[0047] Predict the fault repair time of each faulty switch port according to the fault level of the faulty switch port and the pre-acquired historical fault level repair time record;
[0048] Determine the self-recovery priority of each failed switch port according to the network traffic of each failed switch port and the fault repair time of each failed switch port;
[0049] According to the self-recovery priority, determine the self-recovery order of each failed switch port;
[0050] According to the self-recovery sequence, the fault repair of each failed switch port is completed.
[0051] Specifically, by giving priority to ports with large network traffic, the impact on key services can be minimized and the overall recovery efficiency can be improved. However, if the fault level of the port with large network traffic is high and the fault repair time is long, the assessment of the corresponding fault repair priority will be adjusted according to the actual situation. That is, the fault repair priority is assessed in combination with the fault level and repair time, so that key faults can be located and repaired more quickly and the overall fault duration can be reduced. Through intelligent fault recovery strategies, the continuity and availability of network services can be ensured. This method is based on analysis of real-time data and historical data and can adapt to different network environments and fault modes. The decision-making process is more scientific and accurate, reducing human errors. With the records and feedback after each fault repair, the system can continuously optimize its prediction model and decision-making rules, improve the quality of future decisions, and improve the availability of network services.
[0052] In a second aspect, the present invention provides a switch port fault repair method device, the device comprising:
[0053] An acquisition module, used to acquire the type of the switch port and target attribute information corresponding to each type of the switch port;
[0054] A reading module, used for reading and recording actual attribute information corresponding to each type of switch port;
[0055] A processing module, for determining a fault level when a switch port is determined to have a fault according to the target attribute information and the actual attribute information; and matching a self-recovery operation strategy corresponding to the fault level according to the fault level;
[0056] The fault repair module is used to complete the fault repair of the switch port according to the self-recovery operation strategy.
[0057] The present invention provides a switch port fault repair method and device, which has the following advantages:
[0058] By automatically obtaining the type of switch port and the corresponding actual attribute information, the tedious process of engineers manually collecting and analyzing logs is reduced, thereby improving the efficiency of fault diagnosis. By recording the actual attribute information and comparing it with the target attribute information, the port fault can be quickly located, reducing the complexity and time consumption of multi-faceted log collection. Due to the automation and systematization of information collection, the analysis of the cause of the fault no longer depends on the problem reproduction, reducing the problems of long reproduction cycle and inconsistent reproduction results. In addition, the fragmented information is integrated, making the fault analysis more direct and accurate, helping engineers to quickly find the root cause of the problem. Furthermore, the solution can automatically decide whether to perform self-recovery operations according to the fault level, improving the automation level of fault handling. By matching the fault level with the self-recovery operation strategy, fast and appropriate fault repair can be achieved, reducing the need for manual intervention. For environmental or occasional faults, the system can automatically identify and handle them without affecting the overall efficiency, thereby improving the stability and reliability of the system. The automated fault handling mechanism helps to reduce the downtime caused by faults and improve the availability of the system. Through the automated and intelligent fault handling process, the professional skills requirements of maintenance personnel are reduced, and the training and maintenance costs are reduced. Rapid fault location and repair reduces the number of on-site engineer visits, further reducing maintenance costs.
[0059] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the switch port fault repair method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0060] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the switch port fault repair method of the first aspect or any corresponding embodiment thereof.
[0061] In a fifth aspect, the present invention provides a computer program product, including computer instructions, where the computer instructions are used to enable a computer to execute the switch port fault repair method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0063] Figure 1 It is a flow chart of a switch port fault repair method provided by an embodiment of the present invention;
[0064] Figure 2 It is a flow chart of another switch port fault repair method provided by an embodiment of the present invention;
[0065] Figure 3 This is a simplified flowchart of a specific example of a switch port fault repair method provided by an embodiment of the present invention;
[0066] Figure 4 This is a structural block diagram of a switch port fault repair method device provided by an embodiment of the present invention;
[0067] Figure 5 It is a schematic diagram of the hardware structure of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0069] With the development of AI servers, PCIe topology is becoming more and more complex, and there are more and more external device models, especially GPUs. There are many manufacturers and some products have not been verified on a large scale, and the shipment volume is small. In actual use, it is inevitable that there will be speed reduction, bandwidth reduction, correctable error (Correctable Error, referred to as CE), and uncorrectable error (Uncorrectable Error, referred to as UCE) and other error reports. Every time a problem occurs, engineers need to go deep into the site to collect logs and analyze the specific causes. In fault location, logs need to be collected from all directions, analyzed and compared, and professional requirements are relatively high. Moreover, the information collected is fragmented, and it is difficult to analyze the cause of the fault. The analysis of the cause of the fault depends more on the reproduction of the problem, but the reproduction of the problem will be affected by many factors and the reproduction cycle is long. The reproduction process may also be different from the actual situation before, and the cause cannot be analyzed very accurately. It may even lead to the problem cannot be fully clarified, and then the specific cause cannot be analyzed.
[0070] In addition, many times it is just environmental or occasional failures that do not affect the use. If every problem needs to be clarified, it will seriously affect the efficiency of machine use.
[0071] Therefore, the method in the related art has three obvious defects:
[0072] 1. It has high requirements for users, who need to understand the knowledge in related fields and collect multi-module logs;
[0073] 2. Simple routine faults lack the ability to self-recover;
[0074] 3. Low efficiency, error reporting is not easy to reproduce, time-consuming and laborious.
[0075] To solve the above problems, an embodiment of the present invention provides an embodiment of a switch port fault repair method. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system (computer device) including a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0076] In this embodiment, a switch port fault repair method is provided, which can be used for the above-mentioned terminal equipment, such as mobile phones, tablet computers, etc. Figure 1 FIG. 1 is a flow chart of a switch port fault repair method provided by an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0077] Step S101 : acquiring the type of switch port and target attribute information corresponding to each type of switch port.
[0078] Specifically, the monitoring thread in the server can be started in the firmware initialization, and is responsible for maintaining the type of the switch port pcie switch port. Among them, the port type includes, for example, uplink, downlink, fabric (usually refers to the physical or logical network connecting various components), etc.
[0079] The attribute information corresponding to the switch port includes, for example, rate, bandwidth, correctable errors, uncorrectable errors, recovery count, and link status.
[0080] Step S102, reading and recording actual attribute information corresponding to each type of switch port.
[0081] Specifically, the actual attribute information corresponding to the switch port of the row can be periodically obtained and recorded. For example, the actual link status, actual rate information, actual bandwidth, correctable error statistics, uncorrectable error statistics, and recovery count of each port are read every 100ms. The specific actual attribute information will be recorded in the flash memory in the form of a log. This is to facilitate subsequent staff to assist in problem reproduction, problem clarification operations, and fault cause analysis based on the recorded logs. Moreover, because the information is recorded in the form of a log, it is no longer fragmented, the reproduction cycle will be greatly shortened, and the accuracy of reproduction will also be improved.
[0082] Step S103: When it is determined that a switch port fails according to the target attribute information and the actual attribute information, the fault level is determined.
[0083] Specifically, the target attribute information is a reference benchmark. When the actual attribute information is different from the target attribute information, or is less than the corresponding reference benchmark, it means that the switch port has a fault and the fault level needs to be determined. The specific fault level can be determined based on the difference or data gap between the target attribute information and the actual attribute information.
[0084] Step S104: According to the fault level, a self-recovery operation strategy corresponding to the fault level is matched.
[0085] Specifically, when the fault level is low, it may have little or no impact on the system, so the self-recovery operation may not be performed. When the fault level is high, it may have a certain impact on system performance, so the self-recovery operation needs to be performed. Some fault levels are more sensitive to objects, that is, objects have different sensitivities to whether to perform self-recovery operations. In this case, the self-recovery operation strategy can be adaptively adjusted according to the sensitivity of the object.
[0086] Step S105: Complete the fault repair of the switch port according to the self-recovery operation strategy.
[0087] The switch port fault repair method provided in this embodiment reduces the tedious process of engineers manually collecting and analyzing logs by automatically obtaining the type of switch port and the corresponding actual attribute information, thereby improving the efficiency of fault diagnosis. By recording the actual attribute information and comparing it with the target attribute information, the port fault can be quickly located, reducing the complexity and time consumption of multi-directional log collection. Due to the automation and systematization of information collection, the analysis of the cause of the fault no longer depends on the problem reproduction, reducing the problems of long reproduction cycle and inconsistent reproduction results. Moreover, the fragmented information is integrated, making the fault analysis more direct and accurate, which helps engineers quickly find the root cause of the problem. Furthermore, the scheme can automatically determine whether to perform self-recovery operations according to the fault level, thereby improving the automation level of fault handling. By matching the fault level with the self-recovery operation strategy, fast and appropriate fault repair can be achieved, reducing the need for manual intervention. For environmental or occasional faults, the system can automatically identify and handle them without affecting the overall use efficiency, thereby improving the stability and reliability of the system. The automated fault handling mechanism helps to reduce the downtime caused by faults and improve the availability of the system. Through the automated and intelligent fault handling process, the professional skill requirements of maintenance personnel are reduced, and the training and maintenance costs are reduced. Rapid fault location and repair reduces the number of on-site engineer visits, further reducing maintenance costs.
[0088] In this embodiment, a switch port fault repair method is provided. Based on the above embodiment, whether a switch port fails is determined according to target attribute information and actual attribute information, including the following steps:
[0089] When the actual rate is less than the target rate, it is determined that the switch port fails;
[0090] and / or, when the actual bandwidth is less than the target bandwidth, determining that the switch port fails;
[0091] and / or, determining that the switch port is faulty when a correctable error exists;
[0092] and / or, determining that the switch port is faulty when an uncorrectable error exists;
[0093] and / or, when a recovery count exists, determining that the switch port fails;
[0094] And / or, when the duration of the link being in the abnormal link state is greater than or equal to a first preset time threshold, it is determined that a switch port fails.
[0095] Specifically, the attribute information corresponding to the switch port includes rate, bandwidth, correctable error, uncorrectable error, recovery count, and link status. Then, if it is determined whether the switch port fails, it may include one or more of the above-mentioned situations.
[0096] The above situations determine that the switch port is faulty. If none of the above situations exist, it means that the switch port is not faulty.
[0097] By monitoring the rate, bandwidth, error count, and link status of the switch port in real time in the above manner, the system can detect potential faults in a timely manner and improve system stability and reliability. When the actual attribute information does not match the target attribute information, such as abnormal rate, bandwidth, error count, or link status, the system can accurately determine the port where the fault occurs, reducing the possibility of false alarms and missed alarms. By monitoring the link status, when the duration of the link in the abnormal state exceeds the preset threshold, the system can issue an early warning to prevent potential major faults from occurring. By ensuring that the switch port operates at the expected rate and bandwidth, the system can maintain optimal performance and avoid performance degradation caused by bandwidth limitations or improper error handling. The automated fault detection and repair process reduces the need for manual intervention, reduces maintenance costs, and improves maintenance efficiency.
[0098] In an optional example, the fault levels include: level one fault, level two fault, level three fault, and level four fault;
[0099] On the basis of the aforementioned method steps, when it is determined that a switch port fails according to the target attribute information and the actual attribute information, the fault level is determined, including the following:
[0100] When there are correctable errors and the number of correctable errors is less than or equal to a first preset number threshold, and / or when there are recovery counts and the number of recovery counts is less than or equal to a second preset number threshold, determining that the fault level is a first-level fault;
[0101] Alternatively, when there are correctable errors, and the number of correctable errors is greater than a first preset number threshold, and less than or equal to a third preset number threshold, and / or, when there are uncorrectable errors, and the number of uncorrectable errors is less than or equal to a fourth preset number threshold, and / or, when the duration of the link being in the abnormal link state is greater than or equal to a first preset time threshold, and less than a second preset time threshold, it is determined that the fault level is level 2;
[0102] Alternatively, when the actual rate is less than the target rate, and / or when the actual bandwidth is less than the target bandwidth, and / or when the duration of the link being in the abnormal link state is greater than or equal to the second preset time threshold and less than the third preset time threshold, it is determined that the fault level is level three;
[0103] Alternatively, when the duration of the link being in the abnormal link state is greater than or equal to a third preset time threshold.
[0104] Specifically, a level 1 fault is a level that has no impact on the system, a level 2 fault is a level that has a slight impact on the system, a level 3 fault is a level that affects the system function, and a level 4 fault is a level that has a serious impact on the system.
[0105] For example, if there are individual CE or recovey counts, it does not affect the use, and the user will see recoverable error counts during the startup process, which is a first-level fault. If there are more CE counts or individual UCEs, the link status has changes such as link down and link up, and the function can be used in the end, but an abnormality has occurred, which is a second-level fault. If the speed has been reduced, the bandwidth has been reduced, or the link status has continued to fluctuate, it is a third-level fault; if the link cannot be normal, or errors are repeatedly reported, it is a fourth-level fault.
[0106] By defining different fault levels (level 1, level 2, level 3, and level 4), the system can classify faults in detail, making it easier for engineers to take appropriate measures according to different fault levels. Level 1 faults usually represent the mildest anomaly and may not require immediate intervention; while level 4 faults are the most serious and require immediate response. This classification allows the system to respond quickly according to the urgency of the fault. Furthermore, according to the different fault levels, maintenance resources can be reasonably allocated, and more resources can be used to handle more serious faults, thereby improving maintenance efficiency and cost-effectiveness. Clear fault levels can help objects avoid excessive intervention in non-emergency faults and reduce the risk of misoperation. More serious faults can also be handled preferentially according to the fault level to improve work efficiency. Rapid response and appropriate handling of faults can enhance the overall reliability of the system.
[0107] On the basis of the above-mentioned embodiment, when the fault level is level one, the self-recovery operation strategy includes: not performing the self-recovery operation;
[0108] When the fault level is level 2, the self-recovery operation strategy includes: disconnecting the previous link, creating a new link, and clearing the counted error reports, which include the reports for uncorrectable errors and the reports for correctable errors;
[0109] When the fault level is level 3, the self-recovery operation strategy includes: hot restarting the downstream equipment;
[0110] When the fault level is level 4, the self-recovery operation strategy includes: performing a cold restart operation on the downstream device.
[0111] Specifically, different self-recovery operation strategies can be adopted according to the fault level, so as to provide the most suitable repair strategy for faults of different severity, thereby improving the effectiveness of repair. For example, for a level 1 fault, not performing a self-recovery operation can avoid unnecessary system restarts, reduce resource consumption, and maintain system stability. Minimize the impact of service interruption on the object. For a level 2 fault, by disconnecting and creating a new link and clearing the number of error reports, the link performance can be quickly restored to help the system return to normal working state. Reduce error accumulation and optimize the overall system performance. For a level 3 fault, hot restarting the downstream device can quickly restore the device without shutting down the service, reduce service interruption time, and improve user experience. For a level 4 fault, performing a cold restart operation can completely shut down and restart the device, clear all runtime problems, ensure that the system solves the problem fundamentally, avoid the recurrence of the fault, and ensure the stable operation of the system. Furthermore, through an effective fault handling strategy, the frequency of repairing and replacing equipment can be reduced. Through recovery operations, the overall stability and reliability of the system can be improved. Reduce service interruptions and provide more stable and reliable services.
[0112] In addition to executing the above self-recovery operation strategy, the system performance can also be optimized in the following ways.
[0113] For example, in the case of a level 1 fault, in addition to not performing self-recovery operations, the system can introduce machine learning algorithms to predict possible fault trends by analyzing historical fault data and current system status, and take preventive measures before the fault actually occurs. In the case of a level 2 fault, when creating a new link, the system can dynamically select the optimal link path based on factors such as network traffic, latency, and reliability, thereby improving the overall performance of the network.
[0114] When a level 3 failure occurs and a self-recovery operation strategy is adopted, during the hot restart process, the system can optimize the restart process, such as implementing incremental restart, reloading only necessary system modules and services, and reducing the time and resource consumption required for restart.
[0115] Taking the system optimization solution for level 3 faults as an example, the specific implementation process includes:
[0116] 1. System monitoring and status recording;
[0117] The system continuously monitors the operating status of each module and service, records the health indicators and performance data of the corresponding modules, and creates status records for each module and service, including its startup time, configuration information, dependencies, etc.
[0118] 2. Dependency analysis and construction of dependency graph;
[0119] Analyze the dependencies of each module and service, build a dependency graph, and identify which modules and services need to be restarted together. Also, maintain the version information of each module and service to identify the components that need to be updated during incremental restart.
[0120] 3. Restart strategy planning;
[0121] Determine the order of incremental restarts based on the dependency graph and the running status of the modules to ensure that the system will not be unstable due to the wrong restart sequence. And plan the use of resources required during the restart process, such as memory, CPU cycles, etc.
[0122] 4. Implement incremental restart;
[0123] When modules that need to be restarted are detected, the system identifies which modules need to be reloaded. The services provided by the modules that need to be restarted are gradually disconnected to ensure that they do not affect the normal operation of users or other parts of the system. Using the incremental update mechanism, only the modules marked as needing to be updated are loaded and started. The configuration files of the modules are updated synchronously to ensure that the modules run correctly in the new version. After the modules are loaded, the services are restarted and the communication between them is ensured to be normal.
[0124] Further optionally, in order to verify that the aforementioned operations are effective, the following steps may also be included:
[0125] 5. Verification and monitoring;
[0126] Perform a series of functional tests to ensure that the modules and services are operating normally after the restart. Follow up by monitoring the system performance after the restart to ensure that there is no performance degradation. Check the status of all modules to confirm that the system has fully recovered.
[0127] 6. Logging and feedback;
[0128] Record every step of the incremental restart process in detail, including successful and failed operations. If an error occurs during the restart process, the system should provide a feedback mechanism to allow a quick rollback to the state before the restart.
[0129] Through such an implementation process, the system can effectively perform incremental restarts, reduce restart time, reduce resource consumption, and maintain system stability and availability.
[0130] In addition, for level 4 faults, the optimization operations performed include, for example:
[0131] After a cold restart, the system should automatically generate a detailed fault analysis report, including the cause of the fault, the scope of impact, the recovery process, etc. This information is used to improve system design and prevent similar faults from occurring in the future.
[0132] Furthermore, if the above cannot be restored, the method may also include:
[0133] Identify the level at which self-recovery operations are performed;
[0134] When the self-recovery operation level is the pre-configured highest level, a hot restart operation is performed on the switch to which the switch port belongs and a peer device that establishes a communication connection with the switch at the same time, and / or a cold restart operation is performed at the same time, and operation records performed on the switch and the peer device are saved.
[0135] Specifically, if the aforementioned self-recovery operation strategies cannot recover the fault, and the self-recovery operation strategy level is the highest level, both the PCIE Switch and the peer device are reset. Because the previous information cannot be obtained after the Switch is reset, in this case the Switch also needs to write a log to the flash, that is, record the operation behavior.
[0136] In this embodiment, a switch port fault repair method is provided, which can be used for the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Figure 2 FIG. 1 is a flow chart of another switch port fault repair method provided by an embodiment of the present invention. Figure 2 As shown, the method also includes the following steps:
[0137] Step S201, obtaining an operation instruction transmitted through a preset data transmission channel, where the preset data transmission channel includes an in-band channel and / or an out-of-band transmission channel.
[0138] Step S202: According to the operation instruction, a corresponding operation is performed on the recorded fault data corresponding to the fault of the switch port.
[0139] Specifically, the PCIE Switch provides two channels, in-band and out-band, to manage fault information collection, self-recovery operations, etc. In-band refers to the OS using commands or scripts to manage through the PCIE channel; out-band refers to the BMC using commands or scripts to manage through the I2C channel. Regardless of the channel through which the object transmits the operation instruction, the PCIE Switch has prepared a command interface that can accept the corresponding operation instruction. The operation instruction may include, for example: one or more of: data reading instructions, parameter setting instructions, and data acquisition method configuration instructions.
[0140] The data read instruction is used to read actual attribute information, fault level, self-recovery operation strategy, level of self-recovery operation strategy, etc. Specifically, the level of self-recovery operation strategy corresponds to the level of fault level.
[0141] Parameter setting instructions are used to make corresponding settings, such as the threshold settings corresponding to each attribute information; such as the setting of the cycle for reading the actual attribute information; such as whether to save the data after reading, that is, whether to close the log control; such as whether to perform real-time monitoring;
[0142] Alternatively, because attribute information, fault information, and the acquisition and execution of self-recovery repair strategies can all be transmitted according to corresponding types, they can also be packaged together for transmission. The specific transmission method can also be set.
[0143] In addition, the parameters will be saved in the flash after setting, and will not be affected even if the system is restarted or the firmware is upgraded.
[0144] By supporting in-band channels and / or out-of-band transmission channels, the system can flexibly select the most appropriate data transmission method according to actual conditions, thereby improving the reliability and efficiency of data transmission. By using out-of-band transmission channels to transmit operation instructions, the switch can be remotely controlled to handle faults even when a switch port fails, thereby enhancing the remote management capabilities of the system. Providing data reading instructions, parameter setting instructions, and data acquisition method configuration instructions enables the system to perform a variety of operations, such as reading fault data, adjusting parameters, and configuring data acquisition methods, thereby increasing the functionality and adaptability of the system. By directly processing fault data according to operation instructions, faults can be responded to quickly, reducing the time for manual intervention and improving fault handling efficiency. This instruction-driven fault handling mechanism makes the system more manageable because all operations can be controlled and recorded through centralized instructions.
[0145] In an optional example, the method further includes:
[0146] Complete the fault repair of the switch port according to the self-recovery operation strategy within a preset time range, wherein the preset time range includes any one of the following: at the moment of starting the first link; or, within the time period before performing the uplink hot start operation, or within the preset time period before the uplink is started.
[0147] Specifically, performing fault repair at the initial stage of link startup can ensure that the link is in good working condition at the initial stage. Repairing the fault before hot start can avoid additional problems during hot start and reduce the risk of system instability. Reserving time for fault repair before link startup can ensure that the link will not be affected by the fault during startup and improve the success rate of link startup. In summary, repairing the fault within the preset time range can limit the impact of the fault on other parts of the network. Through rapid repair, the impact of the fault on the object is reduced and the object satisfaction is improved. Rapid response and repair of faults can reduce subsequent maintenance work, thereby reducing maintenance costs. Timely repair of faults can ensure that network performance remains in the best state and avoid performance degradation caused by faults. The fault repair strategy within the preset time range enhances the resilience of the system and enables it to better cope with sudden faults.
[0148] In an optional example, when there are multiple failed switch ports, the method further includes the following method steps:
[0149] Step a1, obtaining the network traffic of each failed switch port.
[0150] Step a2: predicting the fault repair time of each failed switch port according to the fault level of the failed switch port and the pre-acquired historical fault level repair time record.
[0151] Step a3: Determine the self-recovery priority of each failed switch port according to the network traffic of each failed switch port and the fault repair time of each failed switch port.
[0152] Step a4: Determine the self-recovery order of each failed switch port according to the self-recovery priority.
[0153] Step a5: complete the fault repair of each failed switch port according to the self-recovery sequence.
[0154] Specifically, when there are multiple switch ports that have failed, in order to reduce the duration of the failure as much as possible, a more effective fault recovery strategy is provided to adapt to changes in the network environment and failure mode, and to provide the availability of network services. In the above method steps, considering that multiple switch ports fail, the network traffic of each failed switch port can be determined in advance. Generally, the port with a larger network traffic has a higher demand for repair, that is, the order weight of the repair should be higher. In this way, the impact on network services will be smaller. However, considering that some fault levels are too high, the repair time may be longer. Although the network traffic of other switch fault ports is slightly smaller, the repair time will be shorter because the fault level is relatively low. Then, it can be considered to give priority to repairing the switch ports with a shorter repair time.
[0155] Therefore, in the embodiment of the present application, after each fault repair, the historical repair time of the switch port with different network traffic for different fault levels is recorded. Then, big data statistics are used to predict the next fault repair time of the switch port under different network traffic. For example, the average value of the historical fault repair time of the level is used as the next predicted fault repair time of the fault level.
[0156] Finally, the self-recovery priority of each failed switch port is determined according to the network traffic of each failed switch port and the fault repair time of each failed switch port.
[0157] Specifically, according to historical data statistics, weight coefficients can be configured for different network flows and fault repair times of different fault levels, and then the self-recovery priority can be determined according to the network flow, fault repair time of different fault levels, and their corresponding weight coefficients. Then, according to the self-recovery priority level, the self-recovery order of each failed switch port can be determined.
[0158] After the self-recovery sequence is determined, the self-recovery operation for each failed switch port is completed according to the self-recovery sequence.
[0159] In the above method, by giving priority to ports with large network traffic, the impact on key services can be minimized and the overall recovery efficiency can be improved. However, if the fault level of the port with large network traffic is high and the fault repair time is long, the assessment of the corresponding fault repair priority will be adjusted according to the actual situation. That is, the fault repair priority is assessed in combination with the fault level and repair time, so that key faults can be located and repaired more quickly and the overall fault duration can be reduced. Through intelligent fault recovery strategies, the continuity and availability of network services can be ensured. This method is based on analysis of real-time data and historical data and can adapt to different network environments and fault modes. The decision-making process is more scientific and accurate, reducing human errors. With the records and feedback after each fault repair, the system can continuously optimize its prediction model and decision-making rules, improve the quality of future decisions, and improve the availability of network services.
[0160] It should be noted that the above operation is applicable to the case where the server can perform self-repair on one or more switch ports of the same priority at the same time when performing fault repair on different types of switch ports.
[0161] Of course, if the server can directly process the self-repair of all switch ports in batches without considering the priority, the self-repair priority determination process can be omitted, and the self-repair of each failed switch port can be directly completed.
[0162] It should also be noted that the self-recovery priority here is used to assess the fault repair order of the switch port, and the self-recovery level mentioned above is used to assess the user's acceptance of the self-recovery operation.
[0163] Figure 3 The above method provided in the embodiment of the present invention is summarized as follows:
[0164] Start, load the adaptive fault self-recovery operation level (corresponding to the fault level), time period parameters (such as the time period for periodic data acquisition, self-recovery time, and other parameters related to time nodes in the above scheme); obtain port status information, fault information (such as bandwidth, data transmission speed, and other information that may cause device failure in the previous text), etc., and then evaluate whether a fault occurs according to the above method. If so, determine the fault information, fault level, etc.;
[0165] Determine whether there is recovery logic, such as the self-recovery operation level and self-recovery operation strategy described above; and determine whether the current time period is operational, that is, whether it meets the time to perform the self-recovery operation. If so, perform the self-recovery operation. If not, log it and end the operation. If there is no fault, log it and end the operation.
[0166] The above method flow has been introduced in detail in the previous article, so it will not be repeated here.
[0167] In this embodiment, a switch port fault repair method device is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made are not repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0168] This embodiment provides a switch port fault repair method and device, such as Figure 4 As shown, it includes: an acquisition module 401, a reading module 402, a processing module 403, and a fault repair module 404.
[0169] An acquisition module 401 is used to acquire the type of the switch port and target attribute information corresponding to each type of the switch port;
[0170] A reading module 402, used to read and record actual attribute information corresponding to each type of switch port;
[0171] The processing module 403 is used to determine the fault level when it is determined that the switch port has a fault according to the target attribute information and the actual attribute information; and match the self-recovery operation strategy corresponding to the fault level according to the fault level;
[0172] The fault repair module 404 is used to complete the fault repair of the switch port according to the self-recovery operation strategy.
[0173] In an optional example, the attribute information corresponding to the switch port includes rate, bandwidth, correctable error, uncorrectable error, recovery count, and link status;
[0174] The processing module 403 is specifically configured to determine that a switch port fails when the actual rate is less than the target rate;
[0175] and / or, when the actual bandwidth is less than the target bandwidth, determining that the switch port fails;
[0176] and / or, determining that the switch port is faulty when a correctable error exists;
[0177] and / or, determining that the switch port is faulty when an uncorrectable error exists;
[0178] and / or, when a recovery count exists, determining that the switch port fails;
[0179] And / or, when the duration of the link being in the abnormal link state is greater than or equal to a first preset time threshold, it is determined that a switch port fails.
[0180] In an optional example, the fault levels include: level one fault, level two fault, level three fault, and level four fault;
[0181] The processing module 403 is specifically configured to determine that the fault level is a primary fault when there are correctable errors and the number of correctable errors is less than or equal to a first preset number threshold, and / or when there are recovery counts and the number of recovery counts is less than or equal to a second preset number threshold;
[0182] Alternatively, when there are correctable errors, and the number of correctable errors is greater than a first preset number threshold, and less than or equal to a third preset number threshold, and / or, when there are uncorrectable errors, and the number of uncorrectable errors is less than or equal to a fourth preset number threshold, and / or, when the duration of the link being in the abnormal link state is greater than or equal to a first preset time threshold, and less than a second preset time threshold, it is determined that the fault level is level 2;
[0183] Alternatively, when the actual rate is less than the target rate, and / or when the actual bandwidth is less than the target bandwidth, and / or when the duration of the link being in the abnormal link state is greater than or equal to the second preset time threshold and less than the third preset time threshold, it is determined that the fault level is level three;
[0184] Alternatively, when the duration of the link being in the abnormal link state is greater than or equal to a third preset time threshold.
[0185] In an optional example, when the fault level is level one, the self-recovery operation strategy includes: not performing the self-recovery operation;
[0186] When the fault level is level 2, the self-recovery operation strategy includes: disconnecting the previous link, creating a new link, and clearing the counted error reports, which include the reports for uncorrectable errors and the reports for correctable errors;
[0187] When the fault level is level 3, the self-recovery operation strategy includes: hot restarting the downstream equipment;
[0188] When the fault level is level 4, the self-recovery operation strategy includes: performing a cold restart operation on the downstream device.
[0189] In an optional example, the processing module 403 is further used to identify the level of performing the self-recovery operation;
[0190] When the self-recovery operation level is the pre-configured highest level, a hot restart operation is performed on the switch to which the switch port belongs and a peer device that establishes a communication connection with the switch at the same time, and / or a cold restart operation is performed at the same time, and operation records performed on the switch and the peer device are saved.
[0191] In an optional example, the acquisition module 401 is further used to acquire an operation instruction transmitted through a preset data transmission channel, where the preset data transmission channel includes an in-band channel and / or an out-of-band transmission channel;
[0192] The processing module 403 is further used to perform corresponding operations on the recorded fault data corresponding to the switch port fault according to the operation instruction, wherein the operation instruction includes one or more of a data reading instruction, a parameter setting instruction, and a data acquisition method configuration instruction.
[0193] In an optional example, the fault repair module 404 is also used to complete the fault repair of the switch port according to the self-recovery operation strategy within a preset time range, wherein the preset time range includes any one of the following: at the moment of starting the first link; or, within the time period before performing the uplink hot start operation, or within the preset time period before the uplink is started.
[0194] In an optional example, the acquisition module 401 is further used to acquire the network traffic of each failed switch port;
[0195] The processing module 403 is further used to predict the fault repair time of each failed switch port according to the fault level of the failed switch port and the pre-acquired historical fault level repair time record;
[0196] Determine the self-recovery priority of each failed switch port according to the network traffic of each failed switch port and the fault repair time of each failed switch port;
[0197] According to the self-recovery priority, determine the self-recovery order of each failed switch port;
[0198] The fault repair module 404 is further used to complete the fault repair of each failed switch port according to the self-recovery sequence.
[0199] The switch port fault repair method device in this embodiment is presented in the form of a functional module, where the module refers to an application specific integrated circuit (Application Specific Integrated Circuit, referred to as ASIC), a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0200] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0201] A switch port fault repair method and device provided by an embodiment of the present invention automatically obtains the type of switch port and the corresponding actual attribute information, thereby reducing the tedious process of engineers manually collecting and analyzing logs, thereby improving the efficiency of fault diagnosis. By recording the actual attribute information and comparing it with the target attribute information, the port fault can be quickly located, reducing the complexity and time consumption of multi-directional log collection. Due to the automation and systematization of information collection, the analysis of the cause of the fault no longer depends on the problem reproduction, reducing the problems of long reproduction cycle and inconsistent reproduction results. Moreover, the fragmented information is integrated, making the fault analysis more direct and accurate, which helps engineers quickly find the root cause of the problem. Furthermore, the scheme can automatically determine whether to perform a self-recovery operation according to the fault level, thereby improving the automation level of fault handling. By matching the fault level with the self-recovery operation strategy, fast and appropriate fault repair can be achieved, reducing the need for manual intervention. For environmental or occasional faults, the system can automatically identify and handle them without affecting the overall use efficiency, thereby improving the stability and reliability of the system. The automated fault handling mechanism helps to reduce the downtime caused by faults and improve the availability of the system. Through the automated and intelligent fault handling process, the professional skills requirements of maintenance personnel are reduced, and the training and maintenance costs are reduced. Rapid fault location and repair reduce the number of on-site work of engineers, further reducing maintenance costs.
[0202] The embodiment of the present invention also provides a computer device having the above Figure 4 The switch port fault repair method device shown.
[0203] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.
[0204] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include an integrated circuit. The integrated circuit may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0205] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0206] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of a computer device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0207] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0208] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0209] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0210] The embodiment of the present invention also provides a computer-readable storage medium. The method provided in the above embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or is implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0211] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0212] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A switch port fault repair method, characterized in that: The method comprises: Acquire the type of switch port and target attribute information corresponding to each type of switch port; Reading and recording actual attribute information corresponding to each of the switch ports of the type; When it is determined that the switch port has a fault according to the target attribute information and the actual attribute information, determining a fault level; According to the fault level, matching a self-recovery operation strategy corresponding to the fault level; According to the self-recovery operation strategy, the fault repair of the switch port is completed.
2. The method according to claim 1, characterized in that The attribute information corresponding to the switch port includes rate, bandwidth, correctable error, uncorrectable error, recovery count, and link status; Determining whether a fault occurs on the switch port according to the target attribute information and the actual attribute information includes: When the actual rate is less than the target rate, determining that the switch port fails; and / or, when the actual bandwidth is less than the target bandwidth, determining that the switch port fails; and / or, when a correctable error exists, determining that the switch port fails; and / or, when an uncorrectable error exists, determining that the switch port fails; and / or, when a recovery count exists, determining that the switch port fails; And / or, when the duration of the link being in the abnormal link state is greater than or equal to a first preset time threshold, it is determined that the switch port fails.
3. The method according to claim 2, characterized in that The fault levels include: level one fault, level two fault, level three fault and level four fault; When it is determined according to the target attribute information and the actual attribute information that the switch port fails, determining a fault level includes: When the correctable error exists and the number of the correctable errors is less than or equal to a first preset number threshold, and / or when the recovery count exists and the number of the recovery count is less than or equal to a second preset number threshold, determining that the fault level is a first-level fault; Alternatively, when the correctable error exists and the number of the correctable errors is greater than the first preset number threshold and less than or equal to the third preset number threshold, and / or, when the uncorrectable error exists and the number of the uncorrectable errors is less than or equal to the fourth preset number threshold, and / or, when the duration of the link being in the abnormal link state is greater than or equal to the first preset time threshold and less than the second preset time threshold, it is determined that the fault level is level 2; Alternatively, when the actual rate is less than the target rate, and / or when the actual bandwidth is less than the target bandwidth, and / or when the duration of the link being in the abnormal link state is greater than or equal to the second preset time threshold and less than the third preset time threshold, it is determined that the fault level is level three; Alternatively, when the duration of the link being in the abnormal link state is greater than or equal to the third preset time threshold.
4. The method according to claim 3, characterized in that When the fault level is level one, the self-recovery operation strategy includes: not performing a self-recovery operation; When the fault level is level 2, the self-recovery operation strategy includes: disconnecting the previous link, creating a new link, and clearing the counted error reports, the error reports include reports for uncorrectable errors and reports for correctable errors; When the fault level is level three, the self-recovery operation strategy includes: performing a hot restart operation on the downstream device; When the fault level is level 4, the self-recovery operation strategy includes: performing a cold restart operation on the downstream device.
5. The method according to claim 4, characterized in that When the fault repair of the switch port is not completed according to the self-recovery operation strategy, the method further includes: identifying a level at which to perform the self-recovery operation; When the self-recovery operation level is the pre-configured highest level, a hot restart operation is performed on the switch to which the switch port belongs and a peer device that establishes a communication connection with the switch at the same time, and / or a cold restart operation is performed at the same time, and operation records performed on the switch and the peer device are saved.
6. The method according to any one of claims 2 to 4, characterized in that: The method further comprises: Acquire an operation instruction transmitted through a preset data transmission channel, wherein the preset data transmission channel includes an in-band channel and / or an out-of-band transmission channel; According to the operation instruction, a corresponding operation is performed on the recorded fault data corresponding to the fault of the switch port, wherein the operation instruction includes one or more of a data reading instruction, a parameter setting instruction, and a data acquisition mode configuration instruction.
7. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The fault repair of the switch port is completed according to the self-recovery operation strategy within a preset time range, wherein the preset time range includes any one of the following: at the moment of starting the first link; or, within the time period before performing the uplink hot start operation, or within the preset time period before the uplink is started.
8. The method according to any one of claims 1 to 4, characterized in that: When the number of failed switch ports is multiple, the method further includes: Obtaining network traffic of each of the failed switch ports; Predicting the fault repair time of each of the failed switch ports according to the fault level of the failed switch port and the pre-acquired historical fault level repair time record; Determine the self-recovery priority of each of the failed switch ports according to the network traffic of each of the failed switch ports and the fault repair time of each of the failed switch ports; Determining a self-recovery order for each of the failed switch ports according to the self-recovery priority; According to the self-recovery sequence, the fault repair of each of the failed switch ports is completed.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the switch port fault repair method according to any one of claims 1 to 8 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the switch port fault repair method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Network flow load balancing method
CN106452926A
SDN network service recovery device, system and method and master controller
CN108270669A
Link fault processing method, switch and link fault processing system
CN108566298A
Switch traffic abnormality alarm method and device
CN111106961A
Fault repair method and device and storage medium
CN113328872A
Cited By
Fault information processing method, electronic device, storage medium and program product
CN120743637A