CN112380047A - Method and device for restarting switch, terminal equipment and storage medium - Google Patents

Method and device for restarting switch, terminal equipment and storage medium Download PDF

Info

Publication number
CN112380047A
CN112380047A CN202011020285.7A CN202011020285A CN112380047A CN 112380047 A CN112380047 A CN 112380047A CN 202011020285 A CN202011020285 A CN 202011020285A CN 112380047 A CN112380047 A CN 112380047A
Authority
CN
China
Prior art keywords
switch
port
state
abnormal
error event
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
CN202011020285.7A
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.)
Shenzhen Scodeno Technology Co ltd
Original Assignee
Shenzhen Scodeno 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 Shenzhen Scodeno Technology Co ltd filed Critical Shenzhen Scodeno Technology Co ltd
Priority to CN202011020285.7A priority Critical patent/CN112380047A/en
Publication of CN112380047A publication Critical patent/CN112380047A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention provides a method and a device for restarting a switch, terminal equipment and a storage medium, wherein the method comprises the following steps: acquiring MIB base information in a switching unit, wherein the MIB base information comprises a port state of a switch, and the port state of the switch at least comprises a flow state and an error event of a port; judging the port state of the switch in the MIB information; if the port state is an abnormal state, a reset instruction is sent to the port corresponding to the abnormal state so as to restart the port of the switch.

Description

Method and device for restarting switch, terminal equipment and storage medium
Technical Field
The present invention relates to the field of network device technologies, and in particular, to a method and an apparatus for restarting a switch, a terminal device, and a storage medium.
Background
With the progress and development of networks, the requirements of network products for constructing networks are higher and higher, not only efficient data forwarding is required, but also strong fault diagnosis and recovery capabilities are required, and a watchdog function can provide simple and effective fault recovery capabilities.
The technical scheme of the watchdog is shown in fig. 1, and the watchdog is actually a counter which can be reset within a certain time. When the watchdog is started, the counter starts to count automatically, and after a certain time, if the counter is not reset, the overflow of the counter generates a reset signal to the CPU to restart the system (commonly called 'dog biting'). When the system normally operates, the watchdog counter needs to be cleared (commonly called "feeding dog") within the time interval allowed by the watchdog, and a reset signal is not generated. If the system is out of order, the program ensures to feed dogs on time, once the program runs away, no dogs are fed, and the system is bitten and reset.
For the switch, the watchdog function can detect the state of the CPU chip of the switch to provide a fault self-healing capability, but the fault problem of a single port of the switch cannot be monitored and self-healed in such a simple manner.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a restart method, apparatus, terminal device and storage medium for a switch that overcome or at least partially solve the above problems.
In a first aspect, an embodiment of the present invention provides a method for restarting a switch, where the method is applied to a processor in the switch, and the switch further includes a switching unit, including:
acquiring MIB base information in the switching unit, wherein the MIB base information comprises a port state of a switch, and the port state of the switch at least comprises a flow state and an error event of a port;
judging the port state of the switch in the MIB base information;
and if the port state is an abnormal state, sending a reset instruction to the port corresponding to the abnormal state to the switch so as to restart the port of the switch.
Optionally, the determining the port state of the switch in the MIB information includes:
judging the port flow state and the error event, wherein the error event comprises one or more of an error frame, an Ethernet ultra-long frame or an Ethernet discarding event;
if the port flow state is normal and no error event occurs, determining that the port of the switch is in a normal state;
and if the flow state is abnormal, or an error event occurs, or alarm information occurs, determining that the port of the switch is in an abnormal state.
Optionally, the method further comprises:
and if the port of the switch is judged to be in an abnormal state, clearing the flow state, the error event and the alarm information of the port of the switch.
Optionally, the method further comprises: :
and in a preset time period, when the frequency of the abnormal state of the port is greater than a first preset value, sending a reset instruction to the port corresponding to the abnormal state to the switch.
Optionally, the method further comprises:
and if all the ports of the switch are in abnormal states, sending a restart instruction of the switch equipment to the switch.
In a second aspect, an embodiment of the present invention provides an apparatus for restarting a switch, where the apparatus is applied to a processor in the switch, the switch further includes a switching unit, and the apparatus includes:
an obtaining module, configured to obtain MIB information in the switching unit, where the MIB information includes a port state of a switch, and the port state of the switch at least includes a traffic state and an error event of a port;
the judging module is used for judging the port state of the switch in the MIB information;
and the restarting module is used for sending a reset instruction to the port corresponding to the abnormal state to the switch if the port state is the abnormal state so as to restart the port of the switch.
Optionally, the determining module is configured to:
judging the port flow state and the error event, wherein the error event comprises one or more of an error frame, an Ethernet ultra-long frame or an Ethernet discarding event;
if the port flow state is normal and no error event occurs, determining that the port of the switch is in a normal state;
and if the flow state is abnormal, or an error event occurs, or alarm information occurs, determining that the port of the switch is in an abnormal state.
Optionally, the apparatus further comprises a deletion module, wherein the deletion module is configured to:
and if the port of the switch is judged to be in an abnormal state, clearing the flow state, the error event and the alarm information of the port of the switch.
Optionally, the determining module is configured to:
and in a preset time period, when the frequency of the abnormal state of the port is greater than a first preset value, sending a reset instruction to the port corresponding to the abnormal state to the switch.
Optionally, the restart module is further configured to:
and if all the ports of the switch are in abnormal states, sending a restart instruction of the switch equipment to the switch.
In a third aspect, an embodiment of the present invention provides a terminal device, including: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the computer program stored by the memory to implement the method for restarting a switch provided in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed, the computer program implements the method for restarting the switch provided in the first aspect.
The embodiment of the invention has the following advantages:
according to the method, the device, the terminal equipment and the storage medium for restarting the switch, provided by the embodiment of the invention, MIB base information in a switching unit is obtained, wherein the MIB base information comprises a port state of the switch, and the port state of the switch at least comprises a flow state and an error event of a port; judging the port state of the switch in the MIB information; if the port state is an abnormal state, a reset instruction is sent to the port corresponding to the abnormal state so as to restart the port of the switch.
Drawings
FIG. 1 is a flow chart of the steps of a prior art watchdog solution;
FIG. 2 is a flow chart of steps of an embodiment of a method for restarting a switch of the present invention;
FIG. 3 is a flow chart of steps of another method embodiment of a switch restart of the present invention;
FIG. 4 is a flow chart of steps of yet another method embodiment of a switch restart of the present invention;
FIG. 5 is a block diagram of an embodiment of a restart apparatus for a switch according to the present invention;
fig. 6 is a schematic structural diagram of a terminal device of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The nouns are explained as follows:
a Management Information Base (MIB), which defines data items that a managed device must hold, operations allowed to be performed on each data item, and their meanings, i.e., data variables such as control and status Information of the managed device accessible to the Management system, are stored in the MIB, is one of the contents of the TCP/IP network Management protocol standard framework.
CPLD (Complex Programmable Logic device): the complex programmable logic device is developed from PAL and GAL devices, and has relatively large scale and complex structure, and belongs to the field of large scale integrated circuit. The digital integrated circuit is a digital integrated circuit which is used by a user to construct logic functions according to respective needs. The basic design method is to generate corresponding target files by means of an integrated development software platform and methods such as schematic diagrams, hardware description languages and the like, and to transmit codes to a target chip through a download cable (programming in the system) so as to realize the designed digital system.
PD 69104A: the device is a Power-over-Ethernet (PoE) Power supply end Equipment (PSE) manager with an automatic mode and 4 ports.
Specifically, the method comprises the following steps: the embedded MOSFETs with Rds (on) of 0.3 ohm, the internal DC/DC rectifier, dynamic power management and emergency power management which can reach 4 ports at most are integrated, 3 groups of power good input (power good input) are provided, PD equipment which is designed before all standards are detected (pre-standard) is supported, the LED directly drives the ports, 4 ports and PoE maximum power supply state (PoE MAX) can be displayed, a complete 4-port PoE solution only needs 20 peripheral devices, UARTs and I2C communication ports, the voltage, current, power consumption and temperature of each port can be monitored in real time, complete monitoring can be carried out, the total power consumption of the system is less than 1.2W in an IEEE802.3at-2009 mode, and the total power consumption of the system is less than 0.52W in an IEEE802.3af-2003 mode.
An embodiment of the present invention provides a method for restarting a switch, which is used for restarting a port of the switch. The execution subject of this embodiment is a restart device of the switch, and is provided on the switch.
Referring to fig. 2, a flowchart illustrating steps of an embodiment of a method for restarting a switch according to the present invention is shown, where the method may be applied to a processor in the switch, and the switch further includes a switching unit, and specifically may include the following steps:
s201, acquiring MIB base information in the switching unit, wherein the MIB base information comprises a port state of a switch, and the port state of the switch at least comprises a flow state and an error event of a port;
specifically, the embodiment of the present invention is applied to a switch, where the switch includes a processor and a switching unit, the processor in the switch acquires MIB information from the switching unit, where the MIB information includes a port state of the switch, and the port state of the switch at least includes a traffic state and an error event of a port.
S202, judging the port state of the switch in the MIB base information;
specifically, the processor in the switch determines a port state of the switch in the MIB information, where the port state of the switch in the MIB information includes: a traffic status of a port and an error event, wherein the error event comprises one or more of an error frame, an Ethernet ultra-long frame, or an Ethernet drop event.
S203, if the port state is an abnormal state, sending a reset instruction to the port corresponding to the abnormal state to the switch so as to restart the port of the switch.
Specifically, after the processor in the switch determines the port state of the switch in the MIB information, if the flow state of the port is normal and there is no error event, it is determined that the port of the switch is in a normal state, and the other states are all abnormal states, and when the port state is in an abnormal state, a reset instruction is sent to one port of the switch.
The method for restarting the switch provided by the embodiment of the invention obtains the MIB base information in the switching unit, wherein the MIB base information comprises the port state of the switch, and the port state of the switch at least comprises the flow state and the error event of the port; judging the port state of the switch in the MIB information; if the port state is an abnormal state, a reset instruction is sent to the port corresponding to the abnormal state so as to restart the port of the switch.
The present invention further provides a supplementary description of the method for restarting the switch provided in the above embodiment.
Optionally, the determining the port state of the switch in the MIB information includes:
judging the port flow state and the error event, wherein the error event comprises one or more of an error frame, an Ethernet ultra-long frame or an Ethernet discarding event;
if the port flow state is normal and no error event occurs, determining that the port of the switch is in a normal state;
and if the flow state is abnormal, or an error event occurs, or alarm information occurs, determining that the port of the switch is in an abnormal state.
In particular, the processor may be an ARM chip.
The MIB information in the switching unit at least includes the parameters shown in table 1 below:
the switching unit at least comprises a Switch Marvell 88E6320 chip, the switching unit is connected with the power management module, the power management module at least comprises a Microsmi PD69104B chip, the chip has 4 ports for supplying power to the Ethernet, and the 4 ports are connected with the PD1, the PD2, the PD3 and the PD4, at this time, the switching unit can acquire the states of the 4 ports of the power management module, including a traffic receiving and sending state or an Ethernet frame discarding event and the like.
And then, the processor of the switch judges the flow state and the error event of the port of the switch, and if the flow state of the port is normal and no error event exists, the port of the switch is determined to be in a normal state, and other states are abnormal states.
The specific MIB information includes an abnormal event, i.e., an error event, such as a Frame Check Sequence (FCS) error Frame, an ethernet ultra-long Frame, an ethernet discard event, and the like, and also includes a port, where sending data includes sending unicast data, sending broadcast data, sending multicast data, and sending an IGMP leave message; the receiving data comprises receiving unicast data, receiving multicast data, receiving broadcast data, receiving a multicast port leaving message, receiving a multicast checksum error message of the IPV6, receiving a multicast collision frame, receiving a leave discarding suppression message, receiving an MLD leaving message, receiving an MLD joining success message and the like.
TABLE 1 MIB library information
Figure RE-GDA0002898495140000081
Optionally, the method further comprises:
and if the port of the switch is judged to be in an abnormal state, clearing the flow state, the error event and the alarm information of the port of the switch.
Optionally, the method further comprises:
and in a preset time period, when the frequency of the abnormal state of the port is greater than a first preset value, sending a reset instruction to the port corresponding to the abnormal state to the switch.
Specifically, the restart judgment is as follows according to the flow diagram:
the query frequency is 2S once, the query confirmation period is 1 minute, and the judgment method for once per minute comprises the following steps:
the state of port receiving and sending flow and whether there is an event of Ethernet frame discarding, only if there is flow in receiving and sending, and there is no event discarding, it is the normal state, other states are abnormal states, inquire, empty once;
when the number of times of the normal state in one minute is more than 60 percent (the numerical value is adjustable and used for controlling the sensitivity), judging the normal state, and continuing to inquire;
when the number of times of the normal state in one minute is lower than 60%, judging that the normal state is abnormal, and restarting the abnormal port;
when all ports are abnormal, the switch is restarted.
Optionally, the method further comprises:
and if all the ports of the switch are in abnormal states, sending a restart instruction of the switch equipment to the switch.
As shown in fig. 3, which shows a flowchart of another embodiment of a method for restarting an switch according to the present invention, a CPLD logic chip is connected to a switch chip, and the MIB base information of the chip is retrieved to determine the status of each interface of the switch, thereby determining whether the switch needs to be restarted or a certain port of the switch needs to be restarted.
As shown in fig. 4, a flow chart of steps of another embodiment of a method for restarting a switch according to the present invention is shown, and the method for restarting a switch includes:
inquiring MIB information, and inquiring each parameter in the MI information;
judging the sum of the received data values, the sum of the transmitted data values and 0;
if the sum of the received data values is greater than 0 and the sum of the sent data values is greater than 0, counting that the normal operation value is 1;
if the sum of the received data values and the sum of the sent data values do not meet the conditions, counting that the abnormal operation value is 1;
adding the normal operation value and the abnormal operation value to obtain 30;
if the proportion of the normal operation value occupying the 30% is more than 60% and no error event exists, determining that the port is normal;
if not, determining that the port is in an abnormal state;
in any state, the normal operation value and the abnormal operation value are all cleared, and the related receiving and sending registers are all cleared; the query continues after 2 s.
The existing switch watchdog technology avoids resetting of equipment by resetting a refresh timer according to a dog feeding model, and once the equipment has a problem, a chip cannot acquire a dog feeding signal, so that the whole resetting of the equipment is caused by a healing part of the problem.
The embodiment of the invention determines the data forwarding state of the switch by using real-time flow in an MIB (management information base) of the switch, confirms whether the interface state of the switch is normal or not by data acquisition for 30 times per minute, determines the switch problem and resets the interface once data abnormity occurs (receiving and sending abnormity or an Ethernet data discarding event can be recorded as an abnormity event) and one minute abnormity continues to occur, avoids resetting the whole switch, and resets the whole switch if all connected interfaces have abnormal forwarding when the whole switch has the problem.
From the above implementation method, the MIB-based watchdog has the following advantages compared with a general watchdog:
when the single interface is in a problem, the single interface is reset, the normal transmission of other interface data is not influenced, and the self-healing influence range is small;
the MIB-based watchdog judges whether the switch is abnormal or not in a mode of comprehensively evaluating 30 times of data within 1 minute, and has more scientific and accurate judgment, wherein the frequency of the collection and evaluation is moderate, the CPU has no pressure to process, the abnormal jamming of the equipment caused by overhigh CPU of the equipment can not be caused, and the automatic self-healing time of the watchdog can be prolonged if the frequency is too low. So 2s is considered to be appropriate once.
Due to the richness of the MIB database data, the watchdog can be customized according to different application requirements.
The embodiment of the invention can monitor the information such as flow, state, alarm and the like of each running port of the switch, provides more comprehensive monitoring data to judge the self-healing of the fault, and can perform resetting action aiming at different information.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
The method for restarting the switch provided by the embodiment of the invention obtains the MIB base information in the switching unit, wherein the MIB base information comprises the port state of the switch, and the port state of the switch at least comprises the flow state and the error event of the port; judging the port state of the switch in the MIB information; if the port state is an abnormal state, a reset instruction is sent to the port corresponding to the abnormal state so as to restart the port of the switch.
Another embodiment of the present invention provides a restarting apparatus for a switch, configured to execute the method for restarting the switch provided in the foregoing embodiment.
Referring to fig. 5, a block diagram of a restart apparatus of a switch according to an embodiment of the present invention is shown, where the restart apparatus may be applied to a processor in the switch, and the switch further includes a switching unit, which may specifically include the following modules: an obtaining module 501, a judging module 502 and a restarting module 503, wherein:
the obtaining module 501 is configured to obtain MIB information in the switching unit, where the MIB information includes a port state of a switch, and the port state of the switch at least includes a traffic state and an error event of a port;
the judging module 502 is configured to judge a port state of a switch in the MIB information;
the restarting module 503 is configured to send a reset instruction to the port corresponding to the abnormal state to the switch if the port state is the abnormal state, so as to restart the port of the switch.
The restarting device of the switch provided by the embodiment of the invention obtains the MIB base information in the switching unit, wherein the MIB base information comprises the port state of the switch, and the port state of the switch at least comprises the flow state and the error event of the port; judging the port state of the switch in the MIB information; if the port state is an abnormal state, a reset instruction is sent to the port corresponding to the abnormal state so as to restart the port of the switch.
The present invention further provides a supplementary explanation for the restarting apparatus of the switch provided in the above embodiment.
Optionally, the determining module is configured to:
judging the port flow state and the error event, wherein the error event comprises one or more of an error frame, an Ethernet ultra-long frame or an Ethernet discarding event;
if the port flow state is normal and no error event occurs, determining that the port of the switch is in a normal state;
and if the flow state is abnormal, or an error event occurs, or alarm information occurs, determining that the port of the switch is in an abnormal state.
Optionally, the apparatus further comprises a deletion module, wherein the deletion module is configured to:
and if the port of the switch is judged to be in an abnormal state, clearing the flow state, the error event and the alarm information of the port of the switch.
Optionally, the determining module is configured to:
and in a preset time period, when the frequency of the abnormal state of the port is greater than a first preset value, sending a reset instruction to the port corresponding to the abnormal state to the switch.
Optionally, the restart module is further configured to:
and if all the ports of the switch are in abnormal states, sending a restart instruction of the switch equipment to the switch.
It should be noted that the respective implementable modes in the present embodiment may be implemented individually, or may be implemented in combination in any combination without conflict, and the present application is not limited thereto.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The restarting device of the switch provided by the embodiment of the invention obtains the MIB base information in the switching unit, wherein the MIB base information comprises the port state of the switch, and the port state of the switch at least comprises the flow state and the error event of the port; judging the port state of the switch in the MIB information; if the port state is an abnormal state, a reset instruction is sent to the port corresponding to the abnormal state so as to restart the port of the switch.
Still another embodiment of the present invention provides a terminal device, configured to execute the method for restarting an exchange provided in the foregoing embodiment.
Fig. 6 is a schematic structural diagram of a terminal device of the present invention, and as shown in fig. 6, the terminal device includes: at least one processor 601 and memory 602;
the memory stores a computer program; the at least one processor executes the computer program stored in the memory to implement the switch reboot method provided by the above-described embodiments.
In the terminal device provided in this embodiment, MIB information in a switching unit is obtained, where the MIB information includes a port state of a switch, and the port state of the switch at least includes a traffic state and an error event of a port; judging the port state of the switch in the MIB information; if the port state is an abnormal state, a reset instruction is sent to the port corresponding to the abnormal state so as to restart the port of the switch.
Yet another embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed, implements the method for restarting the switch provided in any of the above embodiments.
According to the computer-readable storage medium of the embodiment, by acquiring MIB library information in a switching unit, where the MIB library information includes a port state of a switch, and the port state of the switch at least includes a traffic state and an error event of a port; judging the port state of the switch in the MIB information; if the port state is an abnormal state, a reset instruction is sent to the port corresponding to the abnormal state so as to restart the port of the switch.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention 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.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, electronic devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 electronic device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing electronic device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or electronic device 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 electronic device. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or electronic device that comprises the element.

Claims (10)

1. A method for restarting a switch, the method being applied to a processor in the switch, the switch further comprising a switching unit, the method comprising:
acquiring MIB base information in the switching unit, wherein the MIB base information comprises a port state of a switch, and the port state of the switch at least comprises a flow state and an error event of a port;
judging the port state of the switch in the MIB base information;
and if the port state is an abnormal state, sending a reset instruction to the port corresponding to the abnormal state to the switch so as to restart the port of the switch.
2. The method of claim 1, wherein the determining the port status of the switch in the MIB base information comprises:
judging the port flow state and the error event, wherein the error event comprises one or more of an error frame, an Ethernet ultra-long frame or an Ethernet discarding event;
if the port flow state is normal and no error event occurs, determining that the port of the switch is in a normal state;
and if the flow state is abnormal, or an error event occurs, or alarm information occurs, determining that the port of the switch is in an abnormal state.
3. The method of claim 2, further comprising:
and if the port of the switch is judged to be in an abnormal state, clearing the flow state, the error event and the alarm information of the port of the switch.
4. The method of claim 2, further comprising: :
and in a preset time period, when the frequency of the abnormal state of the port is greater than a first preset value, sending a reset instruction to the port corresponding to the abnormal state to the switch.
5. The method of claim 1, further comprising:
and if all the ports of the switch are in abnormal states, sending a restart instruction of the switch equipment to the switch.
6. A restarting apparatus of a switch, applied to a processor in the switch, the switch further including a switching unit, the apparatus comprising:
an obtaining module, configured to obtain MIB information in the switching unit, where the MIB information includes a port state of a switch, and the port state of the switch at least includes a traffic state and an error event of a port;
the judging module is used for judging the port state of the switch in the MIB information;
and the restarting module is used for sending a reset instruction to the port corresponding to the abnormal state to the switch if the port state is the abnormal state so as to restart the port of the switch.
7. The apparatus of claim 6, wherein the determining module is configured to:
judging the port flow state and the error event, wherein the error event comprises one or more of an error frame, an Ethernet ultra-long frame or an Ethernet discarding event;
if the port flow state is normal and no error event occurs, determining that the port of the switch is in a normal state;
and if the flow state is abnormal, or an error event occurs, or alarm information occurs, determining that the port of the switch is in an abnormal state.
8. The method of claim 6, wherein the apparatus further comprises a deletion module configured to:
and if the port of the switch is judged to be in an abnormal state, clearing the flow state, the error event and the alarm information of the port of the switch.
9. A terminal device, comprising: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the memory-stored computer program to implement the method of restarting the switch of any of claims 1-5.
10. A computer-readable storage medium, characterized in that a computer program is stored therein, which when executed implements the method of restarting the switch of any one of claims 1-5.
CN202011020285.7A 2020-09-25 2020-09-25 Method and device for restarting switch, terminal equipment and storage medium Pending CN112380047A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011020285.7A CN112380047A (en) 2020-09-25 2020-09-25 Method and device for restarting switch, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011020285.7A CN112380047A (en) 2020-09-25 2020-09-25 Method and device for restarting switch, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112380047A true CN112380047A (en) 2021-02-19

Family

ID=74586536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011020285.7A Pending CN112380047A (en) 2020-09-25 2020-09-25 Method and device for restarting switch, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112380047A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114401156A (en) * 2021-12-07 2022-04-26 成都市联洲国际技术有限公司 Power supply control method and device of PSE (Power supply Equipment), PSE equipment and power supply system
CN116827759A (en) * 2023-08-29 2023-09-29 北京中科网芯科技有限公司 Method and device for processing restarting instruction of converging current divider

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1741463A (en) * 2004-08-26 2006-03-01 杭州华为三康技术有限公司 Method for detecting exchanger single-port unretransmitting problem utilizing mode of deleting single-transmitting MAC address
CN101729264A (en) * 2009-12-31 2010-06-09 中兴通讯股份有限公司 Reset method for network switching equipment and network switching equipment
US20120081355A1 (en) * 2010-09-30 2012-04-05 Microsoft Corporation Dynamic Virtual Device Failure Recovery
CN106789110A (en) * 2016-12-20 2017-05-31 深圳市菲菱科思通信技术股份有限公司 A kind of long-range PoE controls and fault recovery method and system based on cloud method
CN110247800A (en) * 2019-06-18 2019-09-17 国网四川省电力公司内江供电公司 A kind of intelligent substation switch on-line monitoring system
CN111064584A (en) * 2019-12-13 2020-04-24 京信通信系统(中国)有限公司 Switch POE power supply abnormity recovery method and device and switch

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1741463A (en) * 2004-08-26 2006-03-01 杭州华为三康技术有限公司 Method for detecting exchanger single-port unretransmitting problem utilizing mode of deleting single-transmitting MAC address
CN101729264A (en) * 2009-12-31 2010-06-09 中兴通讯股份有限公司 Reset method for network switching equipment and network switching equipment
US20120081355A1 (en) * 2010-09-30 2012-04-05 Microsoft Corporation Dynamic Virtual Device Failure Recovery
CN106789110A (en) * 2016-12-20 2017-05-31 深圳市菲菱科思通信技术股份有限公司 A kind of long-range PoE controls and fault recovery method and system based on cloud method
CN110247800A (en) * 2019-06-18 2019-09-17 国网四川省电力公司内江供电公司 A kind of intelligent substation switch on-line monitoring system
CN111064584A (en) * 2019-12-13 2020-04-24 京信通信系统(中国)有限公司 Switch POE power supply abnormity recovery method and device and switch

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114401156A (en) * 2021-12-07 2022-04-26 成都市联洲国际技术有限公司 Power supply control method and device of PSE (Power supply Equipment), PSE equipment and power supply system
CN114401156B (en) * 2021-12-07 2023-09-08 成都市联洲国际技术有限公司 Power supply control method and device of PSE (Power sourcing equipment) equipment, PSE equipment and power supply system
CN116827759A (en) * 2023-08-29 2023-09-29 北京中科网芯科技有限公司 Method and device for processing restarting instruction of converging current divider
CN116827759B (en) * 2023-08-29 2023-11-03 北京中科网芯科技有限公司 Method and device for processing restarting instruction of converging current divider

Similar Documents

Publication Publication Date Title
CN105165054B (en) Network service failure processing method, service management system and system management module
US7430688B2 (en) Network monitoring method and apparatus
CN112380047A (en) Method and device for restarting switch, terminal equipment and storage medium
CN101977128B (en) Interface detection method and device for communication equipment
EP1890427B1 (en) A system and method for monitoring the device port state
CN110691398B (en) Network interaction method, system, equipment and storage medium of intelligent equipment
EP2908497B1 (en) Method, device and system for remote management of terminal peripheral
JP4616020B2 (en) Network monitoring program and network system
CN108616428A (en) A kind of mobile APP implementations of remote management RACK computer rooms
CN111130821B (en) Power failure alarm method, processing method and device
CN112148567A (en) Intelligent device active operation and maintenance method, device and storage medium
CN102142977B (en) Method, network management equipment and system for remotely managing detached node
EP3154238A1 (en) Policy-based m2m terminal device monitoring and control method and device
CN112256479A (en) Method and device for restarting power receiving end equipment, terminal equipment and storage medium
KR100908131B1 (en) Fault detection device and method using log filtering and fault detection system using the device
CN110932878A (en) Management method, equipment and system of distributed network
CN103166779A (en) Alarm confirming and processing method and device based on mobile terminal
CN116955232A (en) Hardware identification method and device based on control system
KR100500836B1 (en) Fault management system of metro ethernet network and method thereof
Cisco Polling---The Event Generation Process
Cisco Polling---The Event Generation Process
CN104394003B (en) Power supply trouble processing method, device and power supply unit
Cisco Polling-The Event Generation Process
CN103248505A (en) View-based network monitoring method and device
CN106899453B (en) Method and device for detecting power adapter fault

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210219

WD01 Invention patent application deemed withdrawn after publication