CN116760786A - Switch state monitoring method and system - Google Patents

Switch state monitoring method and system Download PDF

Info

Publication number
CN116760786A
CN116760786A CN202311034152.9A CN202311034152A CN116760786A CN 116760786 A CN116760786 A CN 116760786A CN 202311034152 A CN202311034152 A CN 202311034152A CN 116760786 A CN116760786 A CN 116760786A
Authority
CN
China
Prior art keywords
port
bandwidth
update interval
switch
interval
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.)
Granted
Application number
CN202311034152.9A
Other languages
Chinese (zh)
Other versions
CN116760786B (en
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.)
China Telecom Construction 3rd Engineering Co Ltd
Original Assignee
China Telecom Construction 3rd Engineering 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 China Telecom Construction 3rd Engineering Co Ltd filed Critical China Telecom Construction 3rd Engineering Co Ltd
Priority to CN202311034152.9A priority Critical patent/CN116760786B/en
Publication of CN116760786A publication Critical patent/CN116760786A/en
Application granted granted Critical
Publication of CN116760786B publication Critical patent/CN116760786B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • 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/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction
    • H04L49/111Switch interfaces, e.g. port details

Abstract

The application belongs to the field of switch management, and discloses a switch state monitoring method and system, wherein the method comprises the following steps: s100, updating the query period of the port by adopting an adaptive update interval; s200, sending an acquisition instruction to a port based on a query period; s300, receiving port bandwidth about a port returned by the switch; s400, analyzing the port bandwidth to obtain a monitoring result. In addition, the application also discloses a system corresponding to the method. Compared with the prior art, when the bandwidth query is carried out on the port, the query period is not kept unchanged, but is updated based on the self-adaptive update interval, so that the bandwidth of the switch is occupied in an invalid way, and the occurrence probability of the situation that the change of the bandwidth in the port cannot be acquired in time is reduced.

Description

Switch state monitoring method and system
Technical Field
The present application relates to the field of switch management, and in particular, to a method and system for monitoring a switch state.
Background
In the prior art, the state of the switch is generally monitored by a Console port of the switch, and can be realized by using management protocols such as SNMP and the like. However, the existing management protocol generally uses a manually set query period to acquire the bandwidth of the port, however, because the management protocol also needs to occupy a certain bandwidth, for the port with smaller bandwidth variation, the too small acquisition period is adopted, which can cause too much bandwidth of the switch occupied during query, and the too much acquired bandwidth information does not bring more additional effects to detection; and for the port with relatively large bandwidth variation, the fixed query period is adopted, so that the occurrence probability of the situation that the bandwidth variation in the port cannot be timely acquired is increased.
Disclosure of Invention
The application aims to disclose a switch state monitoring method and a switch state monitoring system, which solve the problems of controlling the period of inquiring the bandwidth of a port of a switch, reducing the occurrence probability of the condition that the bandwidth of the switch is not occupied and the change of the bandwidth in the port cannot be acquired in time.
In order to achieve the above purpose, the present application provides the following technical solutions:
in order to achieve the above purpose, the present application provides the following technical solutions:
in one aspect, the present application provides a method for monitoring a switch state, including:
s100, updating the query period of the port by adopting an adaptive update interval;
s200, sending an acquisition instruction to a port based on a query period;
s300, receiving port bandwidth about a port returned by the switch;
s400, analyzing the port bandwidth to obtain a monitoring result.
Preferably, the determining of the adaptive update interval comprises:
the 1 st update interval and the 2 nd update interval are of preset time length;
starting from the 3 rd update interval, the update interval is determined in such a way that d is greater than or equal to 2;
acquiring the set of port bandwidths returned by the switch in the d update interval and the d-1 update intervalAnd->
Separately calculateAnd->Bandwidth characteristic value of (2);
the (d+1) th update interval is acquired based on the bandwidth characteristic value.
Preferably, acquiring the (d+1) th update interval based on the bandwidth characteristic value includes:
if it isThe (d+1) th update interval is calculated using the following function:
and->Represents the (d+1) th and (d) th update intervals, respectively,/->And->Respectively representAnd->Bandwidth characteristic value, < >>Representing a preset first duration, +.>Representing a set bandwidth characteristic value threshold;
if it isThe (d+1) th update interval is calculated using the following function:
representing a preset second duration, +.>
Preferably, the calculation function of the query period is:
andindicating the inquiry period corresponding to the d-th update interval,/->And->Representing the first port bandwidth mean and the second port bandwidth mean, respectively,/->,/>Representing time intervalsIn, the set of port bandwidths returned by the switch, +.>Indicate start of calculation +.>Is (are) time of day->Represents the set sampling interval, +.>Representing a preset third duration, +.>Representation->Total number of port bandwidths contained in +.>Representation->Port bandwidth u, in (a)>Representing the maximum value of port bandwidth;
,/>representing time interval +.>In, the set of port bandwidths returned by the switch, +.>Representation->Total number of port bandwidths contained in +.>Representation ofPort bandwidth v in (a).
Preferably, updating the query period of the port with the adaptive update interval includes:
after the d update interval is finished, entering a d+1th calculation stage, and calculating a d+1th update interval and a query period corresponding to the d+1th update interval in the calculation stage;
and after the query period corresponding to the (d+1) th update interval and the (d+1) th update interval is calculated, entering the (d+1) th update interval.
Preferably, the fetch instruction contains the number of the port for which a port bandwidth query is required.
Preferably, analyzing the port bandwidth to obtain a monitoring result includes:
judging whether the port bandwidth exceeds a set port bandwidth threshold, if so, judging that the monitoring result is that the port bandwidth is abnormal.
On the other hand, the application provides a switch state monitoring system, which comprises a period management module, a sending module, a receiving module and an analysis module;
the period management module is used for updating the query period of the port by adopting the self-adaptive updating interval;
the sending module is used for sending an acquisition instruction to the port based on the query period;
the receiving module is used for receiving port bandwidth about the port returned by the switch;
the analysis module is used for analyzing the port bandwidth and obtaining the monitoring result.
Advantageous effects
Compared with the prior art, when the bandwidth query is carried out on the port, the query period is not kept unchanged, but is updated based on the self-adaptive update interval, so that the bandwidth of the switch is occupied in an invalid way, and the occurrence probability of the situation that the change of the bandwidth in the port cannot be acquired in time is reduced.
Drawings
The present disclosure will become more fully understood from the detailed description given herein below and the accompanying drawings, which are given by way of illustration only, and thus are not limiting of the present disclosure, and wherein:
FIG. 1 is a schematic diagram of a switch state monitoring method according to the present application;
fig. 2 is a schematic diagram of a switch status monitoring system according to the present application.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will be more clearly understood, a more particular description of the application will be rendered by reference to the appended drawings and appended detailed description. It should be noted that, without conflict, the embodiments of the present application and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, however, the present application may be practiced in other ways than those described herein, and therefore the scope of the present application is not limited to the specific embodiments disclosed below.
In one aspect, as shown in an embodiment of fig. 1, the present application provides a switch status monitoring method, including:
s100, updating the query period of the port by adopting an adaptive update interval;
s200, sending an acquisition instruction to a port based on a query period;
s300, receiving port bandwidth about a port returned by the switch;
s400, analyzing the port bandwidth to obtain a monitoring result.
When the bandwidth inquiry is carried out on the port, the inquiry period is not kept unchanged, but is updated based on the self-adaptive updating interval, so that the bandwidth of the switch is not occupied, and the occurrence probability of the condition that the change of the bandwidth in the port cannot be acquired in time is reduced.
Preferably, the determining of the adaptive update interval comprises:
the 1 st update interval and the 2 nd update interval are of preset time length;
starting from the 3 rd update interval, the update interval is determined in such a way that d is greater than or equal to 2;
acquiring the set of port bandwidths returned by the switch in the d update interval and the d-1 update intervalAnd->
Separately calculateAnd->Bandwidth characteristic value of (2);
the (d+1) th update interval is acquired based on the bandwidth characteristic value.
Specifically, in the present application, since the determination of the update interval is made based on the port bandwidths obtained in the first two update intervals, the present application is a predetermined time length for the first update interval and the second update interval. The predetermined time period may be 1 hour, 5 hours, or the like.
Preferably, the calculation is performed separatelyAnd->Bandwidth characteristic values of (a) comprising:
calculated using the following functionBandwidth characteristic value of (2):
wherein, the liquid crystal display device comprises a liquid crystal display device,representation->Bandwidth characteristic value, < >>Representation->Total number of port bandwidths contained in +.>Representation->Port bandwidth i, contained in the memory>Representing a preset port bandwidth, +.>Representing a preset port bandwidth comparison value, +.>Representing the calculated proportion of the setting,/->
Calculated using the following functionBandwidth characteristic value of (2):
wherein, the liquid crystal display device comprises a liquid crystal display device,representation->Bandwidth characteristic value, < >>Representation->Total number of port bandwidths contained in +.>Representation->The port bandwidth j contained therein.
In the above embodiment, the bandwidth characteristic value is calculated from two aspects of the average value of the port bandwidths and the variance of the port bandwidths in the set, so that the bandwidth characteristic value can represent the average size of the port bandwidths in the set and the degree of difference of the sizes of the port bandwidths, which is favorable for more comprehensively representing the characteristics of the port bandwidths in one update interval, thereby obtaining the update interval with high self-adaption degree obtained by calculation.
Specifically, the preset port bandwidth may be the maximum value of the bandwidth that the port can be used in the switch, and the preset port bandwidth comparison value may be the square of the maximum value of the bandwidth that the port can be used. The maximum value of the bandwidth that a port can use refers to the bandwidth that the port can actually use, because some of the bandwidth in the port is required for information transmission of various management protocols.
Preferably, acquiring the (d+1) th update interval based on the bandwidth characteristic value includes:
if it isThe (d+1) th update interval is calculated using the following function:
and->Represents the (d+1) th and (d) th update intervals, respectively,/->And->Respectively representAnd->Bandwidth characteristic value, < >>Representing a preset first duration, +.>Representing a set bandwidth characteristic value threshold;
if it isThe (d+1) th update interval is calculated using the following function:
representing a preset second duration, +.>
Specifically, the latest update interval is calculated based on the characteristic value of the bandwidth in the latest two update intervals, so that the adaptive change of the update interval is realized.When (when)When the port bandwidth changes relatively slowly in the two latest update intervals, the application adopts the update interval calculation function with relatively small change amplitude to calculate the new update interval, and when>In this case, the port bandwidth changes faster in the two latest update intervals, so that the update interval calculation function with larger change amplitude is selected to calculate a new update interval, thereby realizing adaptive change of the update interval, so that the port with smaller change amplitude of the port bandwidth is updated in the acquisition period by using a longer update interval, and the port with larger change amplitude of the wide port bandwidth is updated in the acquisition period by using a shorter update interval. In addition, in the process of calculating the update interval, when +.>Is greater than->When the utilization rate of the port bandwidth is reduced, the monitoring requirement of the port bandwidth is reduced, and the application correspondingly increases the update interval, otherwise, correspondingly decreases the update interval, and the increase or decrease amplitude of the update interval is equal to->And->The absolute value of the difference between them is correlated, thereby further improving the adaptation of the update interval.
In particular, the bandwidth characteristic value threshold may be one quarter of the maximum value of the bandwidth that the port can use.
Preferably, the calculation function of the query period is:
andindicating the inquiry period corresponding to the d-th update interval,/->And->Representing the first port bandwidth mean and the second port bandwidth mean, respectively,/->,/>Representing time intervalsIn, the set of port bandwidths returned by the switch, +.>Indicate start of calculation +.>Is (are) time of day->Represents the set sampling interval, +.>Representing a preset third duration, +.>Representation->Total number of port bandwidths contained in +.>Representation->Port bandwidth u, in (a)>Representing the maximum value of port bandwidth;
,/>representing time interval +.>In, the set of port bandwidths returned by the switch, +.>Representation->Total number of port bandwidths contained in +.>Representation->Port bandwidth v in (a).
Specifically, the query period andand->The application increases the value of the inquiry period, otherwise, decreases the value of the inquiry period, thus the inquiry period can change along with the change of the change speed of the port bandwidth, and the occurrence probability of the condition that the port bandwidth of the port with smaller inquiry change speed is not occupied by the switch due to the adoption of the fixed inquiry period is reduced. At the same time make at the portWhen the bandwidth is changed rapidly, the inquiry period is shortened, and the change condition of the port bandwidth in the port can be obtained in time.
The theoretical port bandwidth is shown. For example, if one port is configured to be 1GB bandwidth, thenIs 1GB. />The value of (2) may be 10S.
Preferably, updating the query period of the port with the adaptive update interval includes:
after the d update interval is finished, entering a d+1th calculation stage, and calculating a d+1th update interval and a query period corresponding to the d+1th update interval in the calculation stage;
and after the query period corresponding to the (d+1) th update interval and the (d+1) th update interval is calculated, entering the (d+1) th update interval.
Preferably, the fetch instruction contains the number of the port for which a port bandwidth query is required.
Specifically, the switch queries the corresponding port according to the number.
The get instruction may be sent based on the SNMP protocol.
Preferably, analyzing the port bandwidth to obtain a monitoring result includes:
judging whether the port bandwidth exceeds a set port bandwidth threshold, if so, judging that the monitoring result is that the port bandwidth is abnormal.
In particular, the port bandwidth threshold may be 90% of the maximum bandwidth that the port can be used.
On the other hand, as shown in fig. 2, the application provides a switch state monitoring system, which comprises a period management module, a sending module, a receiving module and an analysis module;
the period management module is used for updating the query period of the port by adopting the self-adaptive updating interval;
the sending module is used for sending an acquisition instruction to the port based on the query period;
the receiving module is used for receiving port bandwidth about the port returned by the switch;
the analysis module is used for analyzing the port bandwidth and obtaining the monitoring result.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (8)

1. A method for monitoring the state of a switch, comprising:
s100, updating the query period of the port by adopting an adaptive update interval;
s200, sending an acquisition instruction to a port based on a query period;
s300, receiving port bandwidth about a port returned by the switch;
s400, analyzing the port bandwidth to obtain a monitoring result.
2. The method and system for monitoring switch status according to claim 1, wherein the adaptive update interval determining process comprises:
the 1 st update interval and the 2 nd update interval are of preset time length;
starting from the 3 rd update interval, the update interval is determined in such a way that d is greater than or equal to 2;
acquiring the set of port bandwidths returned by the switch in the d update interval and the d-1 update intervalAnd
separately calculateAnd->Bandwidth characteristic value of (2);
the (d+1) th update interval is acquired based on the bandwidth characteristic value.
3. The method and system for monitoring a switch state according to claim 2, wherein the step of obtaining the (d+1) th update interval based on the bandwidth characteristic value includes:
if it isThe (d+1) th update interval is calculated using the following function:
and->Represents the (d+1) th and (d) th update intervals, respectively,/->And->Respectively indicate->And->Is used to determine the bandwidth characteristic value of the (c),/>representing a preset first duration, +.>Representing a set bandwidth characteristic value threshold;
if it isThe (d+1) th update interval is calculated using the following function:
representing a preset second duration, +.>
4. The method and system for monitoring switch state according to claim 1, wherein the calculation function of the query period is:
andindicating the inquiry period corresponding to the d-th update interval,/->And->Representing the first port bandwidth mean and the second port bandwidth mean, respectively,/->,/>Representing time interval +.>In, the set of port bandwidths returned by the switch, +.>Indicate start of calculation +.>Is (are) time of day->Represents the set sampling interval, +.>Representing a preset third duration, +.>Representation->Total number of port bandwidths contained in +.>Representation ofPort bandwidth u, in (a)>Representing the maximum value of port bandwidth;
,/>representing time interval +.>In, the set of port bandwidths returned by the switch, +.>Representation->Total number of port bandwidths contained in +.>Representation->Port bandwidth v in (a).
5. The method and system for monitoring switch state according to claim 1, wherein updating the port's inquiry period with an adaptive update interval comprises:
after the d update interval is finished, entering a d+1th calculation stage, and calculating a d+1th update interval and a query period corresponding to the d+1th update interval in the calculation stage;
and after the query period corresponding to the (d+1) th update interval and the (d+1) th update interval is calculated, entering the (d+1) th update interval.
6. The method and system for monitoring switch status according to claim 1, wherein the get instruction includes a port number for which a port bandwidth query is required.
7. The method and system for monitoring switch status according to claim 1, wherein analyzing port bandwidth to obtain monitoring results comprises:
judging whether the port bandwidth exceeds a set port bandwidth threshold, if so, judging that the monitoring result is that the port bandwidth is abnormal.
8. The switch state monitoring system is characterized by comprising a period management module, a sending module, a receiving module and an analysis module;
the period management module is used for updating the query period of the port by adopting the self-adaptive updating interval;
the sending module is used for sending an acquisition instruction to the port based on the query period;
the receiving module is used for receiving port bandwidth about the port returned by the switch;
the analysis module is used for analyzing the port bandwidth and obtaining the monitoring result.
CN202311034152.9A 2023-08-17 2023-08-17 Switch state monitoring method and system Active CN116760786B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311034152.9A CN116760786B (en) 2023-08-17 2023-08-17 Switch state monitoring method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311034152.9A CN116760786B (en) 2023-08-17 2023-08-17 Switch state monitoring method and system

Publications (2)

Publication Number Publication Date
CN116760786A true CN116760786A (en) 2023-09-15
CN116760786B CN116760786B (en) 2023-10-20

Family

ID=87951864

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311034152.9A Active CN116760786B (en) 2023-08-17 2023-08-17 Switch state monitoring method and system

Country Status (1)

Country Link
CN (1) CN116760786B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180069775A1 (en) * 2016-09-03 2018-03-08 Cisco Technology, Inc. Just-in-time identification of slow drain devices in a fibre channel network
US20180278549A1 (en) * 2017-03-27 2018-09-27 Mellanox Technologies Tlv Ltd. Switch arbitration based on distinct-flow counts
US20190182180A1 (en) * 2017-12-11 2019-06-13 Ciena Corporation Adaptive communication network with cross-point switches
CN110035334A (en) * 2019-02-22 2019-07-19 国网山东省电力公司济南供电公司 A kind of power telecom network dynamically bandwidth resource optimization method
CN114401158A (en) * 2021-12-17 2022-04-26 中电信数智科技有限公司 Flow charging method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180069775A1 (en) * 2016-09-03 2018-03-08 Cisco Technology, Inc. Just-in-time identification of slow drain devices in a fibre channel network
US20180278549A1 (en) * 2017-03-27 2018-09-27 Mellanox Technologies Tlv Ltd. Switch arbitration based on distinct-flow counts
US20190182180A1 (en) * 2017-12-11 2019-06-13 Ciena Corporation Adaptive communication network with cross-point switches
CN110035334A (en) * 2019-02-22 2019-07-19 国网山东省电力公司济南供电公司 A kind of power telecom network dynamically bandwidth resource optimization method
CN114401158A (en) * 2021-12-17 2022-04-26 中电信数智科技有限公司 Flow charging method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116760786B (en) 2023-10-20

Similar Documents

Publication Publication Date Title
CN113091228A (en) Uploading frequency control method and device for air conditioning unit data and air conditioning system
CN110501947B (en) Signal processing method and device
CN116760786B (en) Switch state monitoring method and system
WO2020102928A1 (en) Wireless signal transmission method, wireless signal transmission device and terminal device
CN110513823B (en) Temperature control method and device of intelligent power module and air conditioner
CN113489653A (en) Message sending method and device and computer equipment
CN111819550B (en) Data processing method and network equipment
CN113890764A (en) Time synchronization system with prediction function and safety monitoring method and device thereof
CN113010367A (en) Monitoring method and monitoring system for JAVA process garbage recovery
CN109831315B (en) Capacity expansion prediction method and device for network traffic
CN109213589B (en) Message processing method and device
CN115314439A (en) Flow control method and related device for data storage IO (input/output) request
CN114328078A (en) Threshold dynamic calculation method and device and computer readable storage medium
US20030065830A1 (en) Parameters for an adaptive modem
CN114005256A (en) Alarm delay device design method and system based on alarm duration probability function
CN113383561B (en) Method for operating an audio device
CN113566391A (en) Air conditioner operation control method and device and air conditioner system
CN114999483A (en) Voice wake-up processing method and device
CN108961737B (en) Method for monitoring data acquisition terminal abnormity by using dynamic period
CN115934003B (en) Method, device and equipment for identifying slow disk in disk array and readable storage medium
CN111817923B (en) Early warning analysis method and device for sudden change of flow of switch port
CN113037597B (en) Flow monitoring method and device, electronic equipment and computer readable medium
CN114030476B (en) Vehicle acceleration control method and related equipment
CN112749070B (en) JVM load state evaluation method, device and storage medium
US9847919B2 (en) Data network device discovery optimization to reduce data transfer volume

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
GR01 Patent grant
GR01 Patent grant