CN115525510A - Port state monitoring method and device, computer equipment and storage medium - Google Patents

Port state monitoring method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115525510A
CN115525510A CN202211210089.5A CN202211210089A CN115525510A CN 115525510 A CN115525510 A CN 115525510A CN 202211210089 A CN202211210089 A CN 202211210089A CN 115525510 A CN115525510 A CN 115525510A
Authority
CN
China
Prior art keywords
destination
source
port
state
transmission rate
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
CN202211210089.5A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211210089.5A priority Critical patent/CN115525510A/en
Publication of CN115525510A publication Critical patent/CN115525510A/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/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

The application relates to a port state monitoring method, a port state monitoring device, computer equipment and a storage medium. The method comprises the following steps: responding to the connected state of the source terminal and the destination terminal, and acquiring the activation state of a transmission link between the source terminal and the destination terminal; responding to the activated state of a transmission link between the source end and the destination end, acquiring a transmission rate peak value of the source end and a transmission rate peak value of the destination end to obtain a rate adaptability detection result of the source end and the destination end and a transmission rate of the transmission link between the source end and the destination end, wherein the transmission rate of the transmission link is adaptively adjusted according to the rate adaptability detection result; and generating port state warning information according to a preset port state warning rule based on the rate adaptability detection result so as to realize the state monitoring of the port.

Description

Port state monitoring method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of port status monitoring technologies, and in particular, to a port status monitoring method and apparatus, a computer device, and a storage medium.
Background
With the continuous development of computer technology, more and more application scenes of the server are provided. In an actual application scene, a plurality of external card slots are arranged on the server to realize the insertion of the external cards.
In the prior art, the external card slot (source) of the server only displays the code of the slot or identifies the type of the pluggable external card, and does not mark the maximum transmission rate supported by the external card slot. In an actual test scenario and an application scenario, a technician can only obtain the adaptation information of the transmission rates of the external card (destination) and the external card slot through a specification or other technical documents. That is to say, once the specification or the technical document is lost, the technical staff cannot visually acquire the adaptation information of the external card and the external card slot, cannot judge the status information of the source terminal and the destination terminal, cannot acquire the status information of the transmission link between the source terminal and the destination terminal, and even cannot process and maintain the port (the source terminal and the destination terminal) and the transmission link with abnormal status information.
Therefore, it is urgently needed to provide a port status monitoring method, device, computer equipment and storage medium capable of intuitively obtaining port status information.
Disclosure of Invention
In view of the above, it is necessary to provide a port status monitoring method, apparatus, computer device and storage medium capable of intuitively acquiring port status information.
In one aspect, a method for monitoring a port status is provided, where the port includes a source port and a destination port, and the method includes:
responding to the connected state of the source terminal and the destination terminal, and acquiring the activation state of a transmission link between the source terminal and the destination terminal;
responding to the activated state of a transmission link between the source end and the destination end, acquiring a transmission rate peak value of the source end and a transmission rate peak value of the destination end to obtain a rate adaptability detection result of the source end and the destination end and a transmission rate of the transmission link between the source end and the destination end, wherein the transmission rate of the transmission link is adaptively adjusted according to the rate adaptability detection result;
and generating port state warning information according to a preset port state warning rule based on the rate adaptability detection result so as to realize the state monitoring of the port.
In one embodiment, obtaining a transmission rate peak of the source peer and a transmission rate peak of the destination peer to obtain a rate adaptation detection result of the source peer and the destination peer includes: acquiring an absolute value of a difference value between the transmission rate peak value of the source end and the transmission rate peak value of the destination end; if the absolute value is 0, the rate adaptability detection result of the source terminal and the destination terminal is adaptive; and if the absolute value is not 0, the rate adaptability detection result of the source terminal and the destination terminal is not suitable.
In one embodiment, the adaptively adjusting the transmission rate of the transmission link according to the rate adaptation detection result includes: when the adaptability detection result is adaptive, the transmission rate of the transmission link is the transmission rate of the source end, or the transmission rate of the destination end; and when the adaptability detection result is not suitable, the transmission rate of the transmission link is the smaller value of the transmission rate of the source terminal and the transmission rate of the destination terminal.
In one embodiment, acquiring the activation status of the transmission link between the source terminal and the destination terminal includes: the source end sends a handshake request to the destination end, and the destination end returns a handshake response to the source end; if the source end successfully receives the handshake response, the activation state of the transmission link between the source end and the destination end is an activated state; otherwise, the active state of the transmission link between the source and the destination is an inactive state.
In one embodiment, when the active state of the transmission link between the source terminal and the destination terminal is an inactive state, the method further includes: judging the connection state of the source terminal and the destination terminal again; and when the connection state of the source end and the destination end is a connected state, judging that a transmission link between the source end and the destination end has a fault, and generating port state warning information according to a preset port state warning rule.
In one embodiment, the generating port status alert information according to the preset port status alert rule includes: generating port state warning types in advance, wherein the port state warning type is at least one; based on each port state warning category, buzzing warning information with different buzzing frequencies is generated, or breathing lamp warning information with different light colors is generated, so that the state of the port is monitored.
In one embodiment, the port status alert category includes: the transmission rate of the source end is greater than that of the destination end, the transmission rate of the source end is less than that of the destination end, the transmission rate of the source end is equal to that of the destination end, and a transmission link fault between the source end and the destination end occurs.
In another aspect, a port status monitoring apparatus is provided, where the port includes a source port and a destination port, the apparatus includes:
a response unit for responding to a connected state of the source terminal and the destination terminal;
an acquiring unit, communicatively connected to the responding unit, for acquiring an activation status of a transmission link between the source terminal and the destination terminal;
the response unit is further used for responding to the activated state of a transmission link between the source terminal and the destination terminal;
the obtaining unit is further configured to obtain a transmission rate peak value of the source end and a transmission rate peak value of the destination end to obtain a rate adaptability detection result of the source end and the destination end and a transmission rate of a transmission link between the source end and the destination end, where the transmission rate of the transmission link is adaptively adjusted according to the rate adaptability detection result;
and the warning unit is in communication connection with the acquisition unit and is used for generating port state warning information according to a preset port state warning rule based on the rate adaptability detection result so as to realize the state monitoring of the port.
In another aspect, a computer device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the following steps when executing the computer program:
responding to the connected state of the source terminal and the destination terminal, and acquiring the activation state of a transmission link between the source terminal and the destination terminal;
responding to the activated state of a transmission link between the source end and the destination end, acquiring a transmission rate peak value of the source end and a transmission rate peak value of the destination end to obtain a rate adaptability detection result of the source end and the destination end and a transmission rate of the transmission link between the source end and the destination end, wherein the transmission rate of the transmission link is adaptively adjusted according to the rate adaptability detection result;
and generating port state warning information according to a preset port state warning rule based on the rate adaptability detection result so as to realize the state monitoring of the port.
In yet another aspect, a computer-readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, performs the steps of:
responding to the connected state of the source terminal and the destination terminal, and acquiring the activation state of a transmission link between the source terminal and the destination terminal;
responding to the activated state of a transmission link between the source end and the destination end, acquiring a transmission rate peak value of the source end and a transmission rate peak value of the destination end to obtain a rate adaptability detection result of the source end and the destination end and a transmission rate of the transmission link between the source end and the destination end, wherein the transmission rate of the transmission link is adaptively adjusted according to the rate adaptability detection result;
and generating port state warning information according to a preset port state warning rule based on the rate adaptability detection result so as to realize the state monitoring of the port.
The method comprises the steps of responding to the connected state of the source terminal and the destination terminal, and acquiring the activation state of a transmission link between the source terminal and the destination terminal; responding to the activated state of a transmission link between the source end and the destination end, acquiring a transmission rate peak value of the source end and a transmission rate peak value of the destination end to obtain a rate adaptability detection result of the source end and the destination end and a transmission rate of the transmission link between the source end and the destination end, wherein the transmission rate of the transmission link is adaptively adjusted according to the rate adaptability detection result; and generating port state warning information according to a preset port state warning rule based on the rate adaptability detection result so as to realize the state monitoring of the port. The port state monitoring method not only can realize automatic adaptive adjustment of the transmission rate of the transmission link between the ports so as to prevent the ports from being generated due to the fact that the transmission rate is not adaptive and/or prevent the transmission link from being damaged; and the technical personnel can visually, conveniently and rapidly acquire the state information of the port through the port state warning information so as to solve the problems in time by the technical personnel.
Drawings
FIG. 1 is a flow diagram illustrating a method for monitoring port status in one embodiment;
FIG. 2 is a flow diagram illustrating a method for port status monitoring in one embodiment;
FIG. 3 is a schematic diagram of a server in one embodiment;
FIG. 4 is a schematic diagram of a server in one embodiment;
FIG. 5 is a block diagram of a port status monitor device according to an embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The port state monitoring method provided by the application comprises the following steps:
PC ie (fully: per I peripheral component I nterconnect express; chinese: high speed serial computer expansion bus standard) external card is switched on after being accessed into the server system, and a controller (such as a complex programmable logic device or a microcontroller unit) on the external card backboard or a mainboard controller (such as a substrate management controller) acquires the connection state and the activation state of a port; the port includes a source port and a destination port.
When the system is turned on, the source (e.g., CPU, switch chip/card, TR I-MODE chip/card) will detect the destination (e.g., PCI e AI C add-in card), and communicate with the destination in a handshake manner to coordinate the transmission rate of the transmission link between the destination and the source.
Specifically, if the external card is not accessed, when the source terminal and the destination terminal perform handshake communication, and the source terminal does not receive a response from the destination terminal for a long time, the handshake timeout between the source terminal and the destination terminal is indicated, and no port state warning information is generated no matter whether the cable has a problem or not; if the external card is accessed into the source terminal, but when a transmission link between the destination terminal and the source terminal has a problem (a cable is not connected in the middle or the transmission link fails), when the source terminal and the destination terminal perform handshake communication, the destination terminal cannot return a handshake response to the source terminal due to the transmission link failure, so that the handshake communication between the source terminal and the destination terminal fails, port state warning information is generated according to a preset port state warning rule and is displayed on a slot position lamp number corresponding to the slot position; if the external card is accessed to the source end, and the transmission link between the source end and the destination end is in a normal communication state, the source end and the destination end successfully handshake, and determine the transmission rate of the transmission link between the source end and the destination end based on the transmission rate peak value of the source end and the destination end, and simultaneously generate port state warning information based on the difference of the transmission rates between the source end and the destination end according to the preset port state warning rule and display the port state warning information on the slot position lamp number corresponding to the slot position.
In one embodiment, if the transmission rate of the source end is Gen4 and the transmission rate of the destination end is Gen4, the transmission rate of the transmission link between the source end and the destination end is Gen4; at the moment, the signal lamp arranged corresponding to the slot position is displayed in green, and the transmission rates of the source end and the destination end are equal; when the transmission rate of the source end is Gen4 and the transmission rate of the destination end is Gen5, the source end informs the destination end of speed reduction, the transmission rate of the transmission link between the source end and the destination end is Gen4, and at the moment, a signal lamp corresponding to the slot position is displayed in yellow to indicate that the destination end is subjected to speed reduction; when the transmission rate of the source end is Gen5 and the transmission rate of the destination end is Gen4, the transmission rate of the source end is reduced to the transmission rate of the destination end and the destination end is informed to operate at the transmission rate of the destination end, and at the moment, a signal lamp corresponding to the slot position is purple, which indicates that the source end is subjected to speed reduction; when the state of the transmission link between the source end and the destination end is normal, but the handshake communication between the destination end and the source end fails, the system or the external card is abnormal and needs to be overhauled, and at the moment, the signal lamp corresponding to the slot position is a red lamp and is accompanied with a certain frequency of flicker.
In one embodiment, there is provided a port status monitoring method, as shown in fig. 1, where the port includes a source port and a destination port, the method includes:
responding to the connected state of the source terminal and the destination terminal, and acquiring the activation state of a transmission link between the source terminal and the destination terminal;
responding to the activated state of a transmission link between the source end and the destination end, acquiring a transmission rate peak value of the source end and a transmission rate peak value of the destination end to obtain a rate adaptability detection result of the source end and the destination end and a transmission rate of the transmission link between the source end and the destination end, wherein the transmission rate of the transmission link is adaptively adjusted according to the rate adaptability detection result;
and generating port state warning information according to a preset port state warning rule based on the rate adaptability detection result so as to realize the state monitoring of the port.
In one embodiment, as shown in fig. 2, acquiring a transmission rate peak of the source peer and a transmission rate peak of the destination peer to obtain a rate adaptation detection result of the source peer and the destination peer includes: acquiring an absolute value of a difference value between the transmission rate peak value of the source end and the transmission rate peak value of the destination end; if the absolute value is 0, the rate adaptability detection result of the source terminal and the destination terminal is adaptive; and if the absolute value is not 0, the rate adaptability detection result of the source terminal and the destination terminal is not suitable.
In one embodiment, the adaptively adjusting the transmission rate of the transmission link according to the rate adaptation detection result includes: when the adaptability detection result is adaptive, the transmission rate of the transmission link is the transmission rate of the source end or the transmission rate of the destination end; and when the adaptability detection result is not suitable, the transmission rate of the transmission link is the smaller value of the transmission rate of the source terminal and the transmission rate of the destination terminal.
In one embodiment, acquiring the activation status of the transmission link between the source terminal and the destination terminal includes: the source end sends a handshake request to the destination end, and the destination end returns a handshake response to the source end; if the source end successfully receives the handshake response, the activation state of the transmission link between the source end and the destination end is an activated state; otherwise, the active state of the transmission link between the source end and the destination end is an inactive state.
In one embodiment, when the active state of the transmission link between the source terminal and the destination terminal is an inactive state, the method further includes: judging the connection state of the source terminal and the destination terminal again; and when the connection state of the source end and the destination end is the connected state, judging that a transmission link between the source end and the destination end has a fault, and generating port state warning information according to a preset port state warning rule.
In one embodiment, the generating port status alert information according to the preset port status alert rule includes: generating port state warning types in advance, wherein the port state warning type is at least one; based on each port state warning category, buzzing warning information with different buzzing frequencies is generated, or breathing lamp warning information with different light colors is generated, so that the state of the port is monitored.
In one embodiment, the port status alert category includes: the transmission rate of the source end is greater than that of the destination end, the transmission rate of the source end is less than that of the destination end, the transmission rate of the source end is equal to that of the destination end, and a transmission link fault between the source end and the destination end occurs.
It should be understood that although the various steps in the flow charts of fig. 1-2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In an embodiment, the port status monitoring method is applied to a server, wherein a plurality of source terminals for connecting destination terminals are arranged on the server, and a signal lamp is arranged on a server backboard corresponding to each source terminal. Further, in order to facilitate a technician to quickly confirm a source terminal having a failure, each source terminal may be numbered, and a signal lamp for displaying port status information may be set in a digital form, and the schematic structural diagrams of the server are shown in fig. 3 to 4.
In one embodiment, as shown in fig. 5, there is provided a port status monitoring apparatus including: response unit, acquisition unit and warning unit, wherein:
a response unit for responding to a connected state of the source terminal and the destination terminal;
an acquiring unit, communicatively connected to the responding unit, for acquiring an activation status of a transmission link between the source terminal and the destination terminal;
the response unit is further used for responding to the activated state of a transmission link between the source terminal and the destination terminal;
the obtaining unit is further configured to obtain a transmission rate peak value of the source end and a transmission rate peak value of the destination end to obtain a rate adaptability detection result of the source end and the destination end and a transmission rate of a transmission link between the source end and the destination end, where the transmission rate of the transmission link is adaptively adjusted according to the rate adaptability detection result;
and the warning unit is in communication connection with the acquisition unit and is used for generating port state warning information according to a preset port state warning rule based on the rate adaptability detection result so as to realize the state monitoring of the port.
In one embodiment, the state further comprises a judging unit;
the obtaining unit is further configured to obtain an absolute value of a difference between a transmission rate peak of the source terminal and a transmission rate peak of the destination terminal;
the determining unit is configured to determine that a rate adaptation detection result of the source peer and the destination peer is adapted if the absolute value is 0; and if the absolute value is not 0, the rate adaptability detection result of the source terminal and the destination terminal is not suitable.
In one embodiment, the obtaining unit includes a transmission link transmission rate setting module, configured to set, when the adaptability detection result is adaptive, a transmission rate of the transmission link as a transmission rate of the source end or a transmission rate of the destination end; and when the adaptability detection result is not suitable, the transmission rate of the transmission link is the smaller value of the transmission rate of the source terminal and the transmission rate of the destination terminal.
In one embodiment, the obtaining unit further includes a handshake module, configured to send a handshake request to the destination from the source, where the destination returns a handshake response to the source; if the source end successfully receives the handshake response, the activation state of the transmission link between the source end and the destination end is an activated state; otherwise, the active state of the transmission link between the source and the destination is an inactive state.
In one embodiment, the determining unit is further configured to re-determine a connection status between the source peer and the destination peer; and when the connection state of the source end and the destination end is a connected state, judging that a transmission link between the source end and the destination end has a fault, and generating port state warning information according to a preset port state warning rule.
In one embodiment, the alert unit is further configured to generate a port status alert category in advance, where the port status alert category is at least one; generating buzzing warning information with different buzzing frequencies or generating breathing lamp warning information with different light colors based on the state warning category of each port so as to realize state monitoring of the ports; the port state warning category includes that the transmission rate of the source end is greater than the transmission rate of the destination end, the transmission rate of the source end is less than the transmission rate of the destination end, the transmission rate of the source end is equal to the transmission rate of the destination end, and a transmission link fault between the source end and the destination end.
For specific limitations of the port status monitoring apparatus, reference may be made to the above limitations of the port status monitoring method, which is not described herein again. The modules in the port status monitoring device can be implemented in whole or in part by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of port status monitoring. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
responding to the connected state of the source terminal and the destination terminal, and acquiring the activation state of a transmission link between the source terminal and the destination terminal; responding to the activated state of a transmission link between the source end and the destination end, acquiring a transmission rate peak value of the source end and a transmission rate peak value of the destination end to obtain a rate adaptability detection result of the source end and the destination end and a transmission rate of the transmission link between the source end and the destination end, wherein the transmission rate of the transmission link is adaptively adjusted according to the rate adaptability detection result; and generating port state warning information according to a preset port state warning rule based on the rate adaptability detection result so as to realize the state monitoring of the port.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring an absolute value of a difference value between the transmission rate peak value of the source end and the transmission rate peak value of the destination end; if the absolute value is 0, the rate adaptability detection result of the source terminal and the destination terminal is adaptive; and if the absolute value is not 0, the rate adaptability detection result of the source terminal and the destination terminal is not suitable.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
when the adaptability detection result is adaptive, the transmission rate of the transmission link is the transmission rate of the source end or the transmission rate of the destination end; and when the adaptability detection result is not suitable, the transmission rate of the transmission link is the smaller value of the transmission rate of the source terminal and the transmission rate of the destination terminal.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
the source end sends a handshake request to the destination end, and the destination end returns a handshake response to the source end; if the source end successfully receives the handshake response, the activation state of the transmission link between the source end and the destination end is an activated state; otherwise, the active state of the transmission link between the source and the destination is an inactive state.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
judging the connection state of the source terminal and the destination terminal again; and when the connection state of the source end and the destination end is a connected state, judging that a transmission link between the source end and the destination end has a fault, and generating port state warning information according to a preset port state warning rule.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
generating port state warning types in advance, wherein the port state warning type is at least one; generating buzzing warning information with different buzzing frequencies or generating breathing light warning information with different light colors based on the state warning category of each port so as to realize state monitoring of the ports; wherein the port status alert category comprises: the transmission rate of the source end is greater than that of the destination end, the transmission rate of the source end is less than that of the destination end, the transmission rate of the source end is equal to that of the destination end, and a transmission link fault between the source end and the destination end occurs.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
responding to the connected state of the source terminal and the destination terminal, and acquiring the activation state of a transmission link between the source terminal and the destination terminal; responding to the activated state of a transmission link between the source end and the destination end, acquiring a transmission rate peak value of the source end and a transmission rate peak value of the destination end to obtain a rate adaptability detection result of the source end and the destination end and a transmission rate of the transmission link between the source end and the destination end, wherein the transmission rate of the transmission link is adaptively adjusted according to the rate adaptability detection result; and generating port state warning information according to a preset port state warning rule based on the rate adaptability detection result so as to realize the state monitoring of the port.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring an absolute value of a difference value between the transmission rate peak value of the source end and the transmission rate peak value of the destination end; if the absolute value is 0, the rate adaptability detection result of the source terminal and the destination terminal is adaptive; and if the absolute value is not 0, the rate adaptability detection result of the source terminal and the destination terminal is not suitable.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when the adaptability detection result is adaptive, the transmission rate of the transmission link is the transmission rate of the source end or the transmission rate of the destination end; and when the adaptability detection result is not suitable, the transmission rate of the transmission link is the smaller value of the transmission rate of the source terminal and the transmission rate of the destination terminal.
In one embodiment, the computer program when executed by the processor further performs the steps of:
the source end sends a handshake request to the destination end, and the destination end returns a handshake response to the source end; if the source end successfully receives the handshake response, the activation state of the transmission link between the source end and the destination end is an activated state; otherwise, the active state of the transmission link between the source and the destination is an inactive state.
In one embodiment, the computer program when executed by the processor further performs the steps of:
judging the connection state of the source terminal and the destination terminal again; and when the connection state of the source end and the destination end is a connected state, judging that a transmission link between the source end and the destination end has a fault, and generating port state warning information according to a preset port state warning rule.
In one embodiment, the computer program when executed by the processor further performs the steps of:
generating port state warning types in advance, wherein the port state warning type is at least one; generating buzzing warning information with different buzzing frequencies or generating breathing lamp warning information with different light colors based on the state warning category of each port so as to realize state monitoring of the ports; wherein the port status alert category comprises: the transmission rate of the source end is greater than that of the destination end, the transmission rate of the source end is less than that of the destination end, the transmission rate of the source end is equal to that of the destination end, and a transmission link fault between the source end and the destination end occurs.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Transmission Link (Synch i nk) DRAM (SLDRAM), rambus Direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for monitoring port status, wherein the port includes a source port and a destination port, the method comprising:
responding to the connected state of the source terminal and the destination terminal, and acquiring the activation state of a transmission link between the source terminal and the destination terminal;
responding to the activated state of a transmission link between the source end and the destination end, acquiring a transmission rate peak value of the source end and a transmission rate peak value of the destination end to obtain a rate adaptability detection result of the source end and the destination end and a transmission rate of the transmission link between the source end and the destination end, wherein the transmission rate of the transmission link is adaptively adjusted according to the rate adaptability detection result;
and generating port state warning information according to a preset port state warning rule based on the rate adaptability detection result so as to realize the state monitoring of the port.
2. The port status monitoring method according to claim 1, wherein obtaining the transmission rate peak value of the source peer and the transmission rate peak value of the destination peer to obtain the rate adaptation detection result of the source peer and the destination peer comprises:
acquiring an absolute value of a difference value between the transmission rate peak value of the source end and the transmission rate peak value of the destination end;
if the absolute value is 0, the rate adaptability detection result of the source terminal and the destination terminal is adaptive;
and if the absolute value is not 0, the rate adaptability detection result of the source terminal and the destination terminal is not suitable.
3. The port status monitoring method according to claim 2, wherein the adaptively adjusting the transmission rate of the transmission link according to the rate adaptation detection result comprises:
when the adaptability detection result is adaptive, the transmission rate of the transmission link is the transmission rate of the source end or the transmission rate of the destination end;
and when the adaptability detection result is not adaptive, the transmission rate of the transmission link is the smaller value of the transmission rate of the source end and the transmission rate of the destination end.
4. The port status monitoring method according to any one of claims 1 to 3, wherein acquiring the activation status of the transmission link between the source end and the destination end comprises:
the source end sends a handshake request to the destination end, and the destination end returns a handshake response to the source end;
if the source end successfully receives the handshake response, the activation state of the transmission link between the source end and the destination end is an activated state; otherwise, the active state of the transmission link between the source end and the destination end is an inactive state.
5. The port status monitoring method according to claim 4, wherein when the active status of the transmission link between the source terminal and the destination terminal is inactive, the method further comprises:
judging the connection state of the source terminal and the destination terminal again;
and when the connection state of the source end and the destination end is a connected state, judging that a transmission link between the source end and the destination end has a fault, and generating port state warning information according to a preset port state warning rule.
6. The port status monitoring method according to claim 5, wherein the generating the port status warning information according to the preset port status warning rule comprises:
generating port state warning types in advance, wherein the port state warning type is at least one;
based on each port state warning category, buzzing warning information with different buzzing frequencies is generated, or breathing lamp warning information with different light colors is generated, so that the state of the port is monitored.
7. The port status monitoring method according to claim 6, wherein the port status alert category comprises:
the transmission rate of the source end is greater than that of the destination end, the transmission rate of the source end is less than that of the destination end, the transmission rate of the source end is equal to that of the destination end, and a transmission link fault between the source end and the destination end occurs.
8. A port status monitoring apparatus, wherein the port includes a source port and a destination port, the apparatus comprising:
a response unit for responding to a connected state of the source terminal and the destination terminal;
an obtaining unit, communicatively connected to the response unit, for obtaining an activation state of a transmission link between the source end and the destination end;
the response unit is further used for responding to the activated state of a transmission link between the source terminal and the destination terminal;
the obtaining unit is further configured to obtain a transmission rate peak value of the source end and a transmission rate peak value of the destination end to obtain a rate adaptability detection result of the source end and the destination end and a transmission rate of a transmission link between the source end and the destination end, where the transmission rate of the transmission link is adaptively adjusted according to the rate adaptability detection result;
and the warning unit is in communication connection with the acquisition unit and is used for generating port state warning information according to a preset port state warning rule based on the rate adaptability detection result so as to realize the state monitoring of the port.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer storage medium on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202211210089.5A 2022-09-30 2022-09-30 Port state monitoring method and device, computer equipment and storage medium Pending CN115525510A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211210089.5A CN115525510A (en) 2022-09-30 2022-09-30 Port state monitoring method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211210089.5A CN115525510A (en) 2022-09-30 2022-09-30 Port state monitoring method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115525510A true CN115525510A (en) 2022-12-27

Family

ID=84701807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211210089.5A Pending CN115525510A (en) 2022-09-30 2022-09-30 Port state monitoring method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115525510A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116846517A (en) * 2023-08-31 2023-10-03 之江实验室 Network data transmission method and device, storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116846517A (en) * 2023-08-31 2023-10-03 之江实验室 Network data transmission method and device, storage medium and electronic equipment
CN116846517B (en) * 2023-08-31 2024-01-02 之江实验室 Network data transmission method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN109670319B (en) Server flash safety management method and system thereof
CN108491301B (en) Electronic device, abnormality early warning method based on redis and storage medium
CN106610712B (en) Substrate management controller resetting system and method
CN115525510A (en) Port state monitoring method and device, computer equipment and storage medium
CN115314416B (en) Network card state automatic detection method and device, electronic equipment and storage medium
CN111077763A (en) Vehicle-mounted display device redundancy control method and device
CN108566301B (en) Switch offline configuration method, device, system and computer equipment
CN112651367A (en) Method for intelligently monitoring multi-dimensional aviation display screen
CN111061448A (en) Log information display method and device, electronic equipment and storage medium
CN116680101A (en) Method and device for detecting downtime of operating system, and method and device for eliminating downtime of operating system
CN114138587B (en) Method, device and equipment for verifying reliability of server power firmware upgrade
CN115733737B (en) Method for managing IP drift and storage machine frame
CN111176986B (en) Thread script debugging method and device, computer equipment and storage medium
CN115543679B (en) Liquid leakage detection line detection method, system, device, server and electronic equipment
CN116320379A (en) State monitoring method and device for vehicle camera, computer equipment and storage medium
CN113205485A (en) Elevator fault self-diagnosis image display method, device, computer and storage medium
CN115221528A (en) Credibility measuring method, credibility measuring device, image forming apparatus, and storage medium
CN115509978A (en) Method, device, equipment and storage medium for determining physical position of external plug-in equipment
CN112631667B (en) Server upgrading system
CN110704218B (en) Data processing method, data processing device, computer equipment and storage medium
CN110879757B (en) Restarting method and device for abnormal operation of client and computer equipment
CN111398701B (en) Equipment test method, device, computer equipment and storage medium
CN114116373A (en) Network request monitoring method and device, electronic equipment and storage medium
US10635840B2 (en) Banner notification in locked host monitor
CN112650557A (en) Command execution 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