CN116866226A - Automatic detection processing method, equipment and storage medium for switch - Google Patents

Automatic detection processing method, equipment and storage medium for switch Download PDF

Info

Publication number
CN116866226A
CN116866226A CN202311058049.8A CN202311058049A CN116866226A CN 116866226 A CN116866226 A CN 116866226A CN 202311058049 A CN202311058049 A CN 202311058049A CN 116866226 A CN116866226 A CN 116866226A
Authority
CN
China
Prior art keywords
switch
detected
fault
preset
algorithm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311058049.8A
Other languages
Chinese (zh)
Inventor
尹莎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Cisco Networking Technology Co Ltd
Original Assignee
Inspur Cisco Networking Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Cisco Networking Technology Co Ltd filed Critical Inspur Cisco Networking Technology Co Ltd
Priority to CN202311058049.8A priority Critical patent/CN116866226A/en
Publication of CN116866226A publication Critical patent/CN116866226A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses an automatic testing method, equipment and a storage medium for a switch, and belongs to the technical field of switches. The method comprises the following steps: the test terminal is connected with the switch to be detected; operating the switch to be detected according to a remote terminal protocol, and acquiring operation data of the switch to be detected based on a serial port; reconnecting the switch to be detected through a network reconnection algorithm based on a remote terminal protocol in a first time period when the switch to be detected is network abnormality; detecting the fault of the switch to be detected based on a fault query algorithm when the first time period is exceeded and the switch to be detected cannot be reconnected, and maintaining the switch to be detected based on a fault maintenance algorithm; and reminding the switch to be detected of faults when the fault query algorithm or the fault maintenance algorithm cannot process the switch to be detected. The application realizes the effect of automatically detecting and maintaining faults when the switch fails so as to improve the efficiency of the automatic test of the switch.

Description

Automatic detection processing method, equipment and storage medium for switch
Technical Field
The present application relates to the technical field of switches, and in particular, to a method, an apparatus, and a storage medium for automatically testing a switch.
Background
A switch means a "switch" is a network device used for electrical (optical) signal forwarding. It can provide an unshared electrical signal path for any two network nodes of the access switch. The most common switch is an ethernet switch. Other common are voice over phone switches, fiber optic switches, etc.
During the automatic test or use process of the switch, some uncontrollable factors can exist to cause network abnormality, and if the situation can not be handled in time, the automatic test task of the switch can be failed or the use fault can be caused, so that the efficiency of the automatic test of the switch is affected.
Therefore, how to automatically detect and repair faults when the switch fails to improve the efficiency of automatic testing of the switch is a problem to be solved.
Disclosure of Invention
The embodiment of the application provides an automatic test method, equipment and a storage medium for a switch, which are used for solving the following technical problems: how to automatically detect and maintain faults when the switch breaks down so as to improve the efficiency of automatic testing of the switch.
In a first aspect, an embodiment of the present application provides a method for automatically detecting and processing a switch, where the method includes: the test terminal is connected with the switch to be detected through a serial port of the switch to be detected; the test terminal operates the switch to be detected according to a preset remote terminal protocol, and acquires operation data of the switch to be detected based on the serial port; wherein the operation data comprises a network state and an operation log; reconnecting the switch to be detected through a preset network reconnection algorithm based on a remote terminal protocol in a preset first time period when the network state of the switch to be detected is network abnormality; detecting the fault of the switch to be detected based on a preset fault query algorithm when the first time period is exceeded and the switch to be detected cannot be reconnected, and maintaining the switch to be detected based on a preset fault maintenance algorithm; and reminding the switch to be detected of faults when the fault query algorithm cannot detect the faults of the switch to be detected or can not maintain the switch to be detected through the fault maintenance algorithm.
In one implementation manner of the present application, when the network state of the switch to be detected is network abnormality, reconnecting the switch to be detected through a preset network reconnection algorithm based on a remote terminal protocol in a preset first time period, specifically including: a step of suspending and recording a remote terminal protocol running when the network is abnormal; according to a preset second time period, repeatedly sending a login instruction to the switch to be detected through a remote terminal protocol, and acquiring login data fed back by the switch to be detected; judging the network state of the switch to be detected based on the login data; and when the network state is that the network is normal, closing the network reconnection algorithm, and continuously operating the switch to be detected based on the recorded remote terminal protocol.
Through adopting above-mentioned technical scheme, when waiting to detect the switch and breaking down, repeatedly connected switch in the first time quantum can be when the switch appears the network concussion, repeatedly connected wait to detect the switch to improve the efficiency of waiting to detect the automation task of switch operation or detection.
In one implementation manner of the present application, when the first period of time is exceeded and the switch to be detected cannot be reconnected, detecting a fault of the switch to be detected based on a preset fault query algorithm, and maintaining the switch to be detected based on a preset fault maintenance algorithm, specifically including: judging whether a service port loop exists in a service port of the switch to be detected according to the service port data of the switch to be detected; when a service port loop exists at a service port of the switch to be detected, maintaining the fault of the switch to be detected based on a preset loop maintenance algorithm; when a service port of the switch to be detected does not have a loop, judging whether the memory of the switch to be detected reaches a preset memory threshold value or not based on the operation log; when the memory reaches a preset memory threshold value, cleaning the memory of the switch to be detected according to the operation log; when the memory does not reach the preset memory threshold, the failure maintenance algorithm is judged to be incapable of maintaining the switch to be detected and is added into a preset failure detection report.
By adopting the technical scheme, if the switch to be detected still has no reply connection in the first time period, the data of the switch to be detected is queried based on a preset fault query algorithm, so that the conventional fault of the switch to be detected is obtained, and the efficiency of an automation task of the switch to be detected in the operation or detection stage is improved.
In one implementation manner of the present application, when a service port loop exists in a service port of a switch to be detected, repairing a fault of the switch to be detected based on a preset loop repairing algorithm specifically includes: isolating a service port with a service port loop, and reconfiguring the switch to be detected to obtain a second switch to be detected; reconnecting a second switch to be detected through a remote terminal protocol, and searching the network state of the second switch to be detected; and when the network state of the second switch to be detected is that the network is normal, removing isolation of the service port with the service port loop, and operating the switch to be detected according to a remote terminal protocol.
By adopting the technical scheme, when a service port loop appears in the service port of the switch to be detected, namely when the wiring of the switch to be detected is wrong, the switch to be detected is reconfigured so as to solve the service port fault of the switch to be detected, thereby improving the efficiency of the automatic test of the switch.
In one implementation manner of the present application, when the memory reaches a preset memory threshold, the memory of the switch to be detected is cleaned according to the running log, which specifically includes: acquiring newly added data of the switch to be detected after connection based on the operation log, generating a cleaning instruction and sending the cleaning instruction to the switch to be detected; the clearing instruction is used for deleting newly added data after the switch to be detected is connected; deleting the newly added data after the switch to be detected receives the clearing instruction, and generating a second operation log; judging whether the memory of the switch to be detected reaches a preset memory threshold value or not based on the second operation log; and when the memory of the switch to be detected is smaller than a preset memory threshold value, the switch to be detected is rerun according to the remote terminal protocol.
Through adopting above-mentioned technical scheme, through detecting the switch memory that waits to detect, can be because the switch breaks down and lead to the repetitive operation procedure to when leading to the memory to occupy too big, clear up the memory of waiting to detect the switch, thereby improve the efficiency of switch automated test.
In one implementation manner of the present application, when a failure query algorithm cannot detect a failure of a switch to be detected or cannot repair the switch to be detected through a failure repair algorithm, prompting that the switch to be detected has a failure, specifically including: intercepting operation data of the switch to be detected after connection, and packaging the operation data into fault data; the fault data are sent to a preset operation and maintenance management platform until the operation and maintenance management platform receives and stores the fault data; the operation and maintenance management platform informs maintenance personnel that the switch to be detected has faults.
In one implementation manner of the present application, fault data is sent to a preset operation and maintenance management platform until the operation and maintenance management platform receives and stores the fault data, which specifically includes: adding a confirmation instruction to the fault data to generate a fault data packet; repeatedly sending the fault data packet to an operation and maintenance management platform according to a preset third time period; after the operation and maintenance management platform receives and stores the fault data packet, generating a confirmation return instruction; and receiving an acknowledgement return instruction and stopping sending the fault data packet.
In one implementation manner of the present application, when the network state of the switch to be detected is network abnormality, reconnecting the switch to be detected based on a preset network reconnection algorithm in a first period of time, the method further includes: repeatedly detecting the network state of the switch to be detected according to a preset fourth time period outside the first time period; when the network state of the switch to be detected is normal, closing a fault query algorithm; and/or closing the fault maintenance algorithm when the network state of the switch to be detected is normal; and/or when the network state of the switch to be detected is normal, sending a fault release instruction to maintenance personnel corresponding to the switch to be detected.
Through adopting above-mentioned technical scheme, when waiting to detect the switch and breaking down, except in the first time quantum repeatedly connected waiting to detect the switch, the repeated connection is waiting to detect the switch outside the first time quantum to avoid waiting to detect the switch to resume normal work in a certain extent, still wait to detect the switch and inquire about the trouble or carry out maintenance treatment, thereby improve the efficiency of switch automation test.
In a second aspect, an embodiment of the present application further provides an automatic detection processing device for a switch, where the device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to: the test terminal is connected with the switch to be detected through a serial port of the switch to be detected; the test terminal operates the switch to be detected according to a preset remote terminal protocol, and acquires operation data of the switch to be detected based on the serial port; wherein the operation data comprises a network state and an operation log; reconnecting the switch to be detected through a preset network reconnection algorithm based on a remote terminal protocol in a preset first time period when the network state of the switch to be detected is network abnormality; detecting the fault of the switch to be detected based on a preset fault query algorithm when the first time period is exceeded and the switch to be detected cannot be reconnected, and maintaining the switch to be detected based on a preset fault maintenance algorithm; and reminding the switch to be detected of faults when the fault query algorithm cannot detect the faults of the switch to be detected or can not maintain the switch to be detected through the fault maintenance algorithm.
In a third aspect, an embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions for a switch automation detection process, where the computer executable instructions are configured to: the test terminal is connected with the switch to be detected through a serial port of the switch to be detected; the test terminal operates the switch to be detected according to a preset remote terminal protocol, and acquires operation data of the switch to be detected based on the serial port; wherein the operation data comprises a network state and an operation log; reconnecting the switch to be detected through a preset network reconnection algorithm based on a remote terminal protocol in a preset first time period when the network state of the switch to be detected is network abnormality; detecting the fault of the switch to be detected based on a preset fault query algorithm when the first time period is exceeded and the switch to be detected cannot be reconnected, and maintaining the switch to be detected based on a preset fault maintenance algorithm; and reminding the switch to be detected of faults when the fault query algorithm cannot detect the faults of the switch to be detected or can not maintain the switch to be detected through the fault maintenance algorithm.
According to the automatic test method, the automatic test equipment and the automatic test storage medium for the switch, the switch to be detected is tested or operated, and feedback of the switch to be detected is obtained, so that when the switch to be detected fails, the switch to be detected can be reconnected through a network reconnection algorithm, and when the switch to be detected has network oscillation, the switch to be detected is reconnected. If the switch to be detected cannot be reconnected to the network in a short time, the data of the switch to be detected is queried through a fault query algorithm, so that the fault of the switch to be detected is obtained, and the switch to be detected is maintained through a fault maintenance algorithm, so that the switch to be detected is maintained when the switch to be detected has a simple fault. When the method can not solve the faults of the switch to be detected, the data of the switch to be detected is sent to the operation and maintenance management platform, and maintenance personnel are notified to go to maintenance through the operation and maintenance management platform, so that the waste of events caused by network reconnection is avoided to a certain extent, and the efficiency of automatic testing of the switch is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
fig. 1 is a flowchart of an automatic test method for a switch according to an embodiment of the present application;
fig. 2 is a schematic diagram of an internal structure of an automatic test equipment for a switch according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The embodiment of the application provides an automatic test method, equipment and a storage medium for a switch, which are used for solving the following technical problems: how to automatically detect and maintain faults when the switch breaks down so as to improve the efficiency of automatic testing of the switch.
The following describes the technical scheme provided by the embodiment of the application in detail through the attached drawings.
Fig. 1 is a flowchart of an automatic test of a switch according to an embodiment of the present application. As shown in fig. 1, the embodiment of the application provides an automatic testing method for a switch, which specifically includes the following steps:
and step 1, connecting the test terminal with the switch to be detected through a serial port of the switch to be detected.
The test terminal is used for testing the performance of the switch to be tested.
The test terminal can be used for testing the performance of the switch to be tested, and is connected with the switch to be tested through the serial port of the switch to be tested, so that the switch to be tested is operated and tested.
Meanwhile, in the actual operation stage of the switch, the switch can be tested.
In a specific embodiment, the test terminal is disposed inside the switch to be tested, where the test terminal is used to detect the daily work of the switch to be tested, and the switch to be tested is used to perform the daily work, i.e. the test terminal is actually a "terminal for testing the operation of the switch", and the switch to be tested is actually a "actually operated switch".
Step 2, the test terminal operates the switch to be detected according to a preset remote terminal protocol, and acquires operation data of the switch to be detected based on a serial port; wherein the operational data includes network status and an operational log.
A remote terminal protocol is arranged in the test terminal, and the remote terminal protocol can be set by a worker = automatic operation program, and the automatic operation program is telnet to be tested on the exchanger according to a preset sequence; the remote terminal protocol can also be different telnet instructions, and an operator manually issues the telnet instructions to enable the switch to be detected to perform corresponding operation.
When telnet operation is performed on the switch to be detected, the switch to be detected executes telnet instructions, and various data are generated during the execution of telnet instructions, and the data are recorded in the running log. Meanwhile, in the telnet instruction transmission process, the network condition of the switch to be detected can also be obtained. The network condition and the operation log of the switch to be detected form the operation data of the switch to be detected, and the operation data are fed back to the test terminal through the serial port of the switch to be detected.
And 3, reconnecting the switch to be detected through a preset network reconnection algorithm based on a remote terminal protocol in a preset first time period when the network state of the switch to be detected is network abnormality.
When the network of the switch to be detected is abnormal, the network oscillation of the switch to be detected is very large, and the network recovery needs to be waited at the moment, but the long-time and blind waiting for the network recovery can cause time waste to a certain extent, so that the efficiency of automatic test is reduced, a time period, namely a first time period, needs to be set, the network recovery is waited in the first time period, and if the network is not recovered in the first time period, the subsequent operation is carried out. It will be appreciated that the first period of time is set by the staff member according to the customer's needs or production needs, typically 1 minute.
The network reconnection algorithm is used for reconnecting the test terminal and the switch to be detected, namely, waiting for network restoration, and continuously reconnecting the test terminal and the switch to be detected when the network is not restored, and connecting the test terminal with the switch to be detected when the network is restored, wherein the network reconnection algorithm is explained in detail from step 31 to step 34.
Step 31, a step of suspending and recording a remote terminal protocol running when the network is abnormal.
When the network abnormality occurs, the telnet instruction issued by the remote terminal protocol is running or is about to run, and at the moment, the network abnormality will cause the termination of the telnet instruction, namely the step of the remote terminal protocol, so that after the network is recovered, the corresponding telnet instruction needs to be issued again, and the telnet instruction needs to be re-operated whether the automation program issues or is issued manually, so that the step of the remote terminal protocol running when the network abnormality needs to be recorded.
And step 32, repeatedly sending a login instruction to the switch to be detected through the remote terminal protocol according to a preset second time period, and acquiring login data fed back by the switch to be detected.
The preset second time period is far smaller than the first time period, that is, if the first time period is 1 minute, the second time period is usually set to 0.1 second, and the remote terminal protocol issues a login instruction to the switch to be detected, wherein the login instruction is one of telnet instructions.
In a specific example, the test terminal sends a login instruction to the terminal to be tested every 0.1 seconds within 1 minute.
The login instruction is sent to the switch to be detected, the switch to be detected feeds back login data, and the login data comprise login time, login success condition, login time and the like.
And step 33, judging the network state of the switch to be detected based on the login data.
If the login is successful, the fed back login data comprise login time, login success condition and login time, wherein the login time is the time for the switch to be detected to be successfully connected with the test terminal, the login success condition is the condition of whether the switch to be detected is logged in or not, the login time is the time between the switch to be detected receiving a login instruction and feeding back the login data, the connection success of the switch to be detected and the test terminal can be judged through the login success condition, and the network condition of the switch to be detected is the network normal. If the login fails, the fed back login data comprise login time, login success condition and login time, wherein the login time is the issuing time of a login instruction, the login success condition is no, the login time is no, and the network condition of the switch to be detected is network abnormality.
And step 34, when the network state is that the network is normal, closing the network reconnection algorithm, and continuously operating the switch to be detected based on the recorded remote terminal protocol.
When the fed back login data is that the network is normal, the test terminal is successfully connected with the switch to be detected, and reconnection is not needed, and at the moment, a network reconnection algorithm is closed.
Because the operation of the remote terminal protocol is interrupted due to the network abnormality, the operation is continued at this time, so that the switch to be detected is continued to be operated according to the procedure of the remote terminal protocol recorded in step 31.
And 4, detecting the fault of the switch to be detected based on a preset fault query algorithm when the first time period is exceeded and the switch to be detected cannot be reconnected, and maintaining the switch to be detected based on a preset fault maintenance algorithm.
When the test terminal cannot be connected with the switch to be detected in the first period of time, a great amount of time is wasted by continuing to wait for the network to recover without performing other operations. The time of network oscillation is generally smaller than the first time period, so that if the test terminal cannot be connected with the switch to be detected in the first time period, the switch to be detected possibly fails, and at the moment, the switch to be detected needs to be detected through a preset failure query algorithm, so that the possible failure of the switch to be detected is queried, and when the failure of the switch to be detected is detected, the switch to be detected is maintained according to the preset failure maintenance algorithm.
The troubleshooting algorithm and the troubleshooting algorithm are illustrated by steps 41 through 45.
And step 41, judging whether a service port loop exists in the service port of the switch to be detected according to the service port data of the switch to be detected.
When the switch to be detected is connected with the test terminal, the running data are transmitted to the test terminal in real time, and the test terminal plays a role of managing the switch at the moment, namely, whether a service port loop exists in a service port of the switch to be detected is detected through the test terminal.
And 42, maintaining the fault of the switch to be detected based on a preset loop maintenance algorithm when the service port loop exists in the service port of the switch to be detected.
When the service port of the switch to be detected has a service port loop, the switch to be detected needs to be maintained according to a loop maintenance algorithm. The loop maintenance algorithm is illustrated by steps 421 through 423.
Step 421, isolating the service port with the service port loop, and reconfiguring the switch to be detected to obtain a second switch to be detected.
The test terminal is usually connected with a plurality of switches to be detected, and when the service port of the switch to be detected exists in a service port loop, the switch to be detected is isolated.
And after isolating the service port with the service port loop, reconfiguring the switch to be detected to obtain a second switch to be detected, wherein the second switch to be detected is the switch to be detected obtained after the switch to be detected is reconfigured.
Step 422, reconnecting the second switch to be detected through the remote terminal protocol, and retrieving the network status of the second switch to be detected.
And after the switch to be detected is reconfigured, reconnecting a second switch to be detected through a remote terminal protocol, and acquiring the network state of the second switch to be detected. The acquisition process refers to step 32 and step 33, and will not be described in detail herein.
Step 423, when the network state of the second switch to be detected is that the network is normal, removing isolation of the service port with the service port loop, and operating the switch to be detected according to the remote terminal protocol.
When the network state of the second switch to be detected is that the network is normal, the service port loop of the service port of the switch to be detected is released, the isolation of the service port is contacted at the moment, and the switch to be detected is rerun according to a remote terminal protocol, and the switch to be detected is the second switch to be detected.
And 43, judging whether the memory of the switch to be detected reaches a preset memory threshold or not based on the operation log when the service port of the switch to be detected does not have a loop.
When the service port of the switch to be detected does not have a loop, the memory data of the switch to be detected needs to be acquired through the operation log, when the switch to be detected executes the instruction of the remote terminal protocol, the operation data are stored in the memory of the switch to be detected, when the memory of the switch to be detected is overlarge, the obtained operation data generated when the instruction of the new remote terminal protocol is executed cannot be stored, namely network blocking or network abnormality occurs, and the memory of the switch to be detected needs to be cleaned.
Or when the switch to be detected executes the instruction of the remote terminal protocol, a large amount of operation data can be generated, so that the memory of the switch to be detected is filled up rapidly, and network abnormality is caused.
The memory threshold is a threshold at which network blocking or network abnormality occurs in the switch to be detected, and is typically set to 80% of the upper limit of the memory of the switch to be detected.
And step 44, when the memory reaches a preset memory threshold, cleaning the memory of the switch to be detected according to the operation log.
When the memory reaches the memory threshold, the memory of the switch to be detected is cleaned according to the running log, and the cleaning process is shown in steps 441 to 444.
Step 441, acquiring newly added data of the switch to be detected after connection based on the operation log, and generating a clearing instruction to be sent to the switch to be detected; the clearing instruction is used for deleting newly added data after the switch to be detected is connected.
All instructions received by the switch to be detected and tasks done according to the instructions are recorded in the running log, and the time of receiving the instructions and the time of executing various tasks done by the instructions are recorded.
And acquiring an operation log which is connected with the test terminal in the operation log, wherein newly added data corresponding to the operation log is data which causes the memory of the switch to be detected to exceed a memory threshold value, and the test terminal issues a deleting instruction which is used for deleting the newly added data after the switch to be detected is connected with the test terminal.
Step 442, deleting the newly added data after the switch to be detected receives the clearing command, and generating a second operation log.
After the switch to be detected receives the deleting instruction, the newly added data is cleared according to the deleting instruction, and the memory size after the newly added data is cleared is recorded in the operation log to acquire a second operation log.
And 443, judging whether the memory of the switch to be detected reaches a preset memory threshold or not based on the second operation log.
The second operation log records the memory of the switch to be detected, so that whether the memory of the large detection switch reaches a preset memory threshold value can be judged according to the second log.
And 444, when the memory of the switch to be detected is smaller than a preset memory threshold, the switch to be detected is rerun according to the remote terminal protocol.
When the memory of the switch to be detected after the new data are cleared is smaller than a preset memory threshold, the switch to be detected can be restarted according to a remote terminal protocol.
It will be appreciated that the switch to be detected will regenerate new data after re-running, and if the switch to be detected has a network anomaly, the memory of the switch to be detected may not be enough to support the test or running, and step 45 is performed.
And 45, when the memory does not reach the preset memory threshold, judging that the fault maintenance algorithm cannot maintain the switch to be detected and adding the switch to a preset fault detection report.
When the internal memory of the switch to be detected after cleaning does not reach the preset memory threshold value, the internal memory of the switch to be detected is insufficient, and the switch to be detected cannot be maintained through a fault maintenance algorithm, and then the memory data of the switch to be detected is added into a preset fault detection report.
At this time, maintenance personnel needs to be notified to expand the memory of the switch to be detected or clean the memory of the switch to be detected.
And 5, reminding the switch to be detected of faults when the fault query algorithm cannot detect the faults of the switch to be detected or the switch to be detected cannot be maintained through the fault maintenance algorithm.
When the fault query algorithm cannot detect the fault of the switch to be detected or the switch to be detected cannot be maintained through the fault maintenance algorithm, the method based on the application is described that the switch to be detected cannot be automatically repaired, and at the moment, manual intervention is needed, and maintenance personnel is used for repairing.
And step 51, intercepting the operation data of the switch to be detected after connection, and packaging the operation data into fault data.
All operation data generated after the switch to be detected is connected with the test terminal are packaged into fault data, wherein the fault data comprises the reason of the fault of the switch to be detected, but maintenance cannot be performed by means of a fault maintenance algorithm, so maintenance personnel are required to perform maintenance according to actual conditions.
And step 52, transmitting the fault data to a preset operation and maintenance management platform until the operation and maintenance management platform receives and stores the fault data.
One maintainer is generally responsible for a plurality of switches to be detected, and importance differences exist among the switches to be detected, so that an operation and maintenance management platform is required to uniformly distribute maintenance tasks of the switches to be detected.
Firstly, adding a confirmation instruction into fault data, wherein the confirmation instruction is used for determining that the operation and maintenance management platform receives the fault data, the fault data added with the confirmation instruction is a fault data packet, the fault data packet is sent to the operation and maintenance management platform according to a preset third time period, the operation and maintenance management platform generates a confirmation return instruction according to the confirmation instruction after receiving the fault data packet, and the test terminal stops sending the fault data packet after receiving the confirmation return instruction. The third period of time is typically set to half an hour.
And step 53, the operation and maintenance management platform informs maintenance personnel that the switch to be detected has a fault.
The operation and maintenance management platform informs maintenance personnel of the form of mail, telephone, short message and the like, and is not described herein.
It should be noted that, when the network abnormality of the switch to be detected cannot be resolved in the step 3, the step 4 or the step 5 is executed, and the network condition of the switch to be detected is synchronously detected at this time, which specifically includes the following steps:
and 3a, repeatedly detecting the network state of the switch to be detected according to a preset fourth time period outside the first time period.
The fourth period of time is typically set to be greater than the second period of time.
Step 3b, closing a fault query algorithm when the network state of the switch to be detected is normal; and/or closing the fault maintenance algorithm when the network state of the switch to be detected is normal; and/or when the network state of the switch to be detected is normal, sending a fault release instruction to maintenance personnel corresponding to the switch to be detected.
When the network of the switch to be detected is normal, only the switch to be detected needs to be reconnected, so that the processes of the step 4 and the step 5 are terminated, namely, the fault inquiry algorithm is closed, the fault maintenance algorithm is closed, and a fault release instruction is sent to maintenance personnel corresponding to the switch to be detected.
The above is a method embodiment of the present application. Based on the same inventive concept, the embodiment of the application also provides an automatic test device for the switch, and the structure of the automatic test device is shown in fig. 2.
Fig. 2 is a schematic diagram of an internal structure of an automatic test equipment for a switch according to an embodiment of the present application. As shown in fig. 2, the apparatus includes:
at least one processor 201;
and a memory 202 communicatively coupled to the at least one processor;
wherein the memory 202 stores instructions executable by the at least one processor, the instructions being executable by the at least one processor 201 to enable the at least one processor 201 to:
the test terminal is connected with the switch to be detected through a serial port of the switch to be detected; the test terminal operates the switch to be detected according to a preset remote terminal protocol, and acquires operation data of the switch to be detected based on the serial port; wherein the operation data comprises a network state and an operation log; reconnecting the switch to be detected through a preset network reconnection algorithm based on a remote terminal protocol in a preset first time period when the network state of the switch to be detected is network abnormality; detecting the fault of the switch to be detected based on a preset fault query algorithm when the first time period is exceeded and the switch to be detected cannot be reconnected, and maintaining the switch to be detected based on a preset fault maintenance algorithm; and reminding the switch to be detected of faults when the fault query algorithm cannot detect the faults of the switch to be detected or can not maintain the switch to be detected through the fault maintenance algorithm.
Some embodiments of the application provide a non-volatile computer storage medium corresponding to the switch automation test of fig. 1, storing computer executable instructions configured to:
the test terminal is connected with the switch to be detected through a serial port of the switch to be detected; the test terminal operates the switch to be detected according to a preset remote terminal protocol, and acquires operation data of the switch to be detected based on the serial port; wherein the operation data comprises a network state and an operation log; reconnecting the switch to be detected through a preset network reconnection algorithm based on a remote terminal protocol in a preset first time period when the network state of the switch to be detected is network abnormality; detecting the fault of the switch to be detected based on a preset fault query algorithm when the first time period is exceeded and the switch to be detected cannot be reconnected, and maintaining the switch to be detected based on a preset fault maintenance algorithm; and reminding the switch to be detected of faults when the fault query algorithm cannot detect the faults of the switch to be detected or can not maintain the switch to be detected through the fault maintenance algorithm.
The embodiments of the present application are described in a progressive manner, and the same and similar parts of the embodiments are all referred to each other, and each embodiment is mainly described in the differences from the other embodiments. In particular, for the internet of things device and the medium embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and the relevant points are referred to in the description of the method embodiment.
The system, the medium and the method provided by the embodiment of the application are in one-to-one correspondence, so that the system and the medium also have similar beneficial technical effects to the corresponding method, and the beneficial technical effects of the method are explained in detail above, so that the beneficial technical effects of the system and the medium are not repeated here.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (10)

1. A method for automatically detecting and processing a switch, the method comprising:
the test terminal is connected with the switch to be detected through a serial port of the switch to be detected;
the test terminal operates the switch to be detected according to a preset remote terminal protocol, and acquires operation data of the switch to be detected based on the serial port; wherein the operation data comprises a network state and an operation log;
reconnecting the switch to be detected through a preset network reconnection algorithm based on the remote terminal protocol in a preset first time period when the network state of the switch to be detected is network abnormality;
detecting the fault of the switch to be detected based on a preset fault query algorithm when the first time period is exceeded and the switch to be detected cannot be reconnected, and maintaining the switch to be detected based on a preset fault maintenance algorithm;
And when the fault query algorithm can not detect the fault of the switch to be detected or can not repair the switch to be detected through the fault repair algorithm, the switch to be detected is noticed to have the fault.
2. The automatic detection processing method of a switch according to claim 1, wherein when the network state of the switch to be detected is a network abnormality, reconnecting the switch to be detected through a preset network reconnection algorithm based on the remote terminal protocol in a preset first period of time, specifically comprising:
a step of suspending and recording the remote terminal protocol running at the time of network abnormality;
repeatedly sending a login instruction to the switch to be detected through a remote terminal protocol according to a preset second time period, and acquiring login data fed back by the switch to be detected;
judging the network state of the switch to be detected based on the login data;
and when the network state is that the network is normal, closing the network reconnection algorithm, and continuously operating the switch to be detected based on the recorded remote terminal protocol.
3. The automatic detection processing method of a switch according to claim 2, wherein when the first period of time is exceeded and the switch to be detected cannot be reconnected, detecting a failure of the switch to be detected based on a preset failure query algorithm, and repairing the switch to be detected based on a preset failure repair algorithm, specifically comprising:
Judging whether a service port loop exists in a service port of the switch to be detected according to the service port data of the switch to be detected;
when a service port loop exists at a service port of the switch to be detected, maintaining the fault of the switch to be detected based on a preset loop maintenance algorithm;
when a loop does not exist in a service port of the switch to be detected, judging whether the memory of the switch to be detected reaches a preset memory threshold value or not based on the operation log;
when the memory reaches a preset memory threshold value, cleaning the memory of the switch to be detected according to the running log;
and when the memory does not reach a preset memory threshold, judging that the fault maintenance algorithm cannot maintain the switch to be detected and adding the switch to a preset fault detection report.
4. The automatic detection processing method of a switch according to claim 3, wherein when a service port loop exists in a service port of the switch to be detected, repairing a fault of the switch to be detected based on a preset loop repairing algorithm specifically comprises:
isolating the service port with the service port loop, and reconfiguring the switch to be detected to obtain a second switch to be detected;
Reconnecting the second switch to be detected through a remote terminal protocol, and searching the network state of the second switch to be detected;
and when the network state of the second switch to be detected is that the network is normal, removing isolation of the service port of the loop with the service port, and operating the switch to be detected according to the remote terminal protocol.
5. The method for automatically detecting and processing the switch according to claim 3, wherein when the memory reaches a preset memory threshold, cleaning the memory of the switch to be detected according to the operation log, specifically comprising:
acquiring newly added data of the switch to be detected after connection based on the running log, generating a clearing instruction and sending the clearing instruction to the switch to be detected; the clearing instruction is used for deleting newly added data after the switch to be detected is connected;
deleting the newly added data after the switch to be detected receives the clearing instruction, and generating a second operation log;
judging whether the memory of the switch to be detected reaches a preset memory threshold value or not based on the second operation log;
and when the memory of the switch to be detected is smaller than a preset memory threshold value, the switch to be detected is rerun according to the remote terminal protocol.
6. The automatic detection processing method of a switch according to claim 1, wherein when the failure query algorithm cannot detect the failure of the switch to be detected or the switch to be detected cannot be repaired by a failure repair algorithm, the method specifically comprises:
intercepting the operation data of the switch to be detected after connection, and packaging the operation data into fault data;
the fault data are sent to a preset operation and maintenance management platform until the operation and maintenance management platform receives and stores the fault data;
and the operation and maintenance management platform informs maintenance personnel that the switch to be detected has faults.
7. The automatic detection processing method of the switch according to claim 6, wherein the sending the fault data to a preset operation and maintenance management platform until the operation and maintenance management platform receives and stores the fault data specifically includes:
adding a confirmation instruction to the fault data to generate a fault data packet;
repeatedly sending the fault data packet to the operation and maintenance management platform according to a preset third time period;
after the operation and maintenance management platform receives and stores the fault data packet, generating a confirmation return instruction;
And receiving the confirmation return instruction and stopping sending the fault data packet.
8. The method for automatically detecting and processing a switch according to claim 1, wherein when the network state of the switch to be detected is a network abnormality, after reconnecting the switch to be detected based on a preset network reconnection algorithm in a first period of time, the method further comprises:
repeatedly detecting the network state of the switch to be detected according to a preset fourth time period outside the first time period;
when the network state of the switch to be detected is that the network is normal, closing the fault query algorithm; and/or
When the network state of the switch to be detected is that the network is normal, closing the fault maintenance algorithm; and/or;
and when the network state of the switch to be detected is normal, sending a fault release instruction to maintenance personnel corresponding to the switch to be detected.
9. An automatic detection processing apparatus for a switch, the apparatus comprising:
at least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to:
The test terminal is connected with the switch to be detected through a serial port of the switch to be detected;
the test terminal operates the switch to be detected according to a preset remote terminal protocol, and acquires operation data of the switch to be detected based on the serial port; wherein the operation data comprises a network state and an operation log;
reconnecting the switch to be detected through a preset network reconnection algorithm based on the remote terminal protocol in a preset first time period when the network state of the switch to be detected is network abnormality;
detecting the fault of the switch to be detected based on a preset fault query algorithm when the first time period is exceeded and the switch to be detected cannot be reconnected, and maintaining the switch to be detected based on a preset fault maintenance algorithm;
and when the fault query algorithm can not detect the fault of the switch to be detected or can not repair the switch to be detected through the fault repair algorithm, the switch to be detected is noticed to have the fault.
10. A non-volatile computer storage medium storing computer executable instructions for a switch automation detection process, the computer executable instructions configured to:
The test terminal is connected with the switch to be detected through a serial port of the switch to be detected;
the test terminal operates the switch to be detected according to a preset remote terminal protocol, and acquires operation data of the switch to be detected based on the serial port; wherein the operation data comprises a network state and an operation log;
reconnecting the switch to be detected through a preset network reconnection algorithm based on the remote terminal protocol in a preset first time period when the network state of the switch to be detected is network abnormality;
detecting the fault of the switch to be detected based on a preset fault query algorithm when the first time period is exceeded and the switch to be detected cannot be reconnected, and maintaining the switch to be detected based on a preset fault maintenance algorithm;
and when the fault query algorithm can not detect the fault of the switch to be detected or can not repair the switch to be detected through the fault repair algorithm, the switch to be detected is noticed to have the fault.
CN202311058049.8A 2023-08-21 2023-08-21 Automatic detection processing method, equipment and storage medium for switch Pending CN116866226A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311058049.8A CN116866226A (en) 2023-08-21 2023-08-21 Automatic detection processing method, equipment and storage medium for switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311058049.8A CN116866226A (en) 2023-08-21 2023-08-21 Automatic detection processing method, equipment and storage medium for switch

Publications (1)

Publication Number Publication Date
CN116866226A true CN116866226A (en) 2023-10-10

Family

ID=88221834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311058049.8A Pending CN116866226A (en) 2023-08-21 2023-08-21 Automatic detection processing method, equipment and storage medium for switch

Country Status (1)

Country Link
CN (1) CN116866226A (en)

Similar Documents

Publication Publication Date Title
CN107634860B (en) Method for automatically upgrading weblogic cluster patches in batches
US9817709B2 (en) Systems and methods for automatic replacement and repair of communications network devices
CN102355368B (en) Fault processing method of network equipment and system
CN112637368B (en) Distributed industrial data acquisition system and method
CN105790980A (en) Fault recovery method and apparatus
CN101136781B (en) Performance data acquisition occasion control method and device in network management system
JP2013130901A (en) Monitoring server and network device recovery system using the same
CN113825164A (en) Network fault repairing method and device, storage medium and electronic equipment
CN111698121B (en) SNMP trap alarm test method and related device
CN107544867B (en) Method, device and system for recovering intelligent network service
CN111464601A (en) Node service scheduling system and method
CN104601668A (en) State management based data push method, device and system
CN114422386B (en) Monitoring method and device for micro-service gateway
CN116866226A (en) Automatic detection processing method, equipment and storage medium for switch
KR20150079418A (en) Facility management system and history recording method
CN116560908B (en) Data recovery method of industrial control system and related equipment thereof
CN109525436A (en) Application program main/standby switching method and system
CN115981261A (en) Production line control method and device, computer equipment and computer readable storage medium
CN113179180A (en) Basalt client disaster fault repairing method, basalt client disaster fault repairing device and basalt client disaster storage medium
CN108089917A (en) A kind of application process control method and device
CN114691395A (en) Fault processing method and device, electronic equipment and storage medium
KR20170127876A (en) System and method for dealing with troubles through fault analysis of log
KR100506248B1 (en) How to Diagnose Links in a Private Switching System
JPH1188471A (en) Test method and test equipment
CN111464357A (en) Resource allocation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination