A network data port monitoring method, device and medium
By determining whether the network data port is in an initialized state when the BMC restarts and obtaining the data stream after polling a preset number of times, the false alarm problem in network data port monitoring is solved, and more accurate monitoring is achieved.
Patent Information
- Application Number
- CN202111632394.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2041-12-28
AI Technical Summary
During the BMC restart process, false alarms frequently occurred because the network data port initialized faster than the sensors.
By determining whether the network data port is in an initialization state and obtaining the data stream after polling a preset number of times, an alarm is triggered based on the presence or absence of the data stream, and a delay counting method is used to reduce false alarms.
This effectively reduced false alarms caused by network data port restarts and improved monitoring accuracy.
Smart Images

Figure CN114328142B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of BMC monitoring, in particular to a network data port monitoring method and device and medium. BACKGROUND
[0002] With more and more software using peer-to-peer networking (P2P) technology for communication, one or two computers using P2P software can occupy all the bandwidth resources of a local area network. At present, P2P is widely used: download, online video, network television... In short, the shadow of P2P can be seen everywhere. Therefore, in order to ensure the normal and stable operation of enterprise network, the flow of network data port must be monitored and limited.
[0003] When the BMC polls the peripheral equipment, if no data stream of the network data port is collected, an alarm will be sent out. However, during the power-on restart or boot-up restart of the server, the network is in a disconnected state, and with the restart of the BMC, the monitoring of the network data port will also start at this time, but since the sensor for monitoring the network data port initializes very quickly, much faster than the initialization of the network data port, it will cause the sensor to start working while the network data port does not work, resulting in the sensor being unable to detect the data stream, thereby causing false alarm.
[0004] Therefore, how to reduce false alarms when monitoring the network data port is a problem that needs to be solved by those skilled in the art. SUMMARY
[0005] The purpose of the present application is to provide a network data port monitoring method, device and medium, which can reduce false alarms when monitoring the network data port.
[0006] To solve the above technical problems, the present application provides a network data port monitoring method, which comprises:
[0007] determining whether the network data port is in an initialization state;
[0008] if it is in the initialization state, obtaining a data stream after polling a preset number of times;
[0009] confirming whether to alarm according to the presence or absence of the data stream.
[0010] Preferably, before the step of polling a preset number of times, the method further comprises:
[0011] determining whether to start initialization monitoring;
[0012] if yes, entering the step of polling a preset number of times;
[0013] If not, whether to alarm is confirmed according to whether the data stream exists.
[0014] Preferably, the step of judging whether to start the initialization monitoring comprises: judging whether the data stream is acquired; if not, confirming to start the initialization monitoring.
[0015] Preferably, before the step of confirming to start the initialization monitoring, the method further comprises:
[0016] judging whether the on-board network card and the external network card are both in the closed disabled state; if yes, confirming to start the initialization monitoring without acquiring the data stream.
[0017] Preferably, the step of judging whether to start the initialization monitoring further comprises:
[0018] judging whether the BMC is in the initialization state; if yes, confirming to start the initialization monitoring without acquiring the data stream, and the on-board network card and the external network card being both in the closed disabled state.
[0019] Preferably, if the network data port is not in the initialization state, whether to alarm is confirmed according to whether the data stream exists.
[0020] Preferably, the step of confirming whether to alarm according to whether the data stream exists comprises:
[0021] if the data stream is not acquired for three times, confirming to alarm.
[0022] To solve the above technical problems, the application further provides a network data port monitoring device, which comprises:
[0023] a judging module, configured to judge whether the network data port is in the initialization state;
[0024] an acquiring module, configured to acquire the data stream after polling for a preset number of times if the network data port is in the initialization state;
[0025] an alarming module, configured to confirm whether to alarm according to whether the data stream exists.
[0026] To solve the above technical problems, the application further provides another network data port monitoring device, which comprises a memory for storing a computer program.
[0027] a processor, configured to execute the computer program to realize the steps of the network data port monitoring method.
[0028] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the network data port monitoring method described above.
[0029] The network data port monitoring method provided in this application first determines whether the network data port is in an initialization state during the monitoring process to determine whether the network data port needs to restart. If the network data port is in an initialization state, the data stream is acquired after polling a preset number of times, and an alarm is triggered based on the presence or absence of the data stream. Compared to the current technology, where the network data port initialization speed is slower than the sensor, resulting in false alarms due to the BMC not acquiring the data stream, this technical solution first determines whether the network data port is in an initialization state. If so, the data stream is acquired after the BMC polls the surrounding devices a preset number of times, and an alarm is triggered based on the presence or absence of the data stream. This technical solution uses a delayed counting method, which does not immediately check the data stream when the network data port restarts, but only checks the alarm after the BMC polls a certain number of times, thus reducing false alarms.
[0030] Furthermore, the network data port monitoring device and medium provided in this application correspond to the network data port monitoring method described above and have the same effect. Attached Figure Description
[0031] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 A flowchart illustrating a network data port monitoring method provided in this application embodiment;
[0033] Figure 2 A structural diagram of a network data port monitoring device provided in an embodiment of this application;
[0034] Figure 3 This is a structural diagram of another network data port monitoring device provided in an embodiment of this application. Detailed Implementation
[0035] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0036] The core of this application is to provide a network data port monitoring method, device, and medium to reduce false alarms when monitoring network data ports.
[0037] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0038] Figure 1 A flowchart of a network data port monitoring method provided in this application embodiment is shown below. Figure 1 As shown, the method includes:
[0039] S10: Determine whether the network data port is in the initialization state. If it is in the initialization state, proceed to step S11.
[0040] In practical implementation, when the server restarts, the server's BMC, network card, and network data port will all be initialized. It is understandable that the technical problem this application aims to solve is the issue of false alarms caused by server initialization when monitoring the network data port. Therefore, in step S10, it is necessary to first determine whether the network data port is in an initialized state. If it is, proceed to step S11. If it is not in an initialized state, there is no need to proceed to the subsequent steps of this application.
[0041] S11: After polling a preset number of times, obtain the data stream.
[0042] After initialization, the BMC polls surrounding devices. If no data stream is collected from the network data port, an alarm will be issued. In step S11, the network data port data stream is not collected during the initial polling. It will only be collected during the next polling after a preset number of polling cycles.
[0043] S12: Whether to trigger an alarm based on the presence or absence of data stream confirmation.
[0044] Understandably, if no data stream is obtained from the network data port after a preset number of polling cycles, it indicates a problem with data transmission, and an alarm should be triggered. If the data stream is obtained, no alarm is necessary.
[0045] The network data port monitoring method provided in this application first determines whether the network data port is in an initialization state during the monitoring process to determine whether the network data port needs to restart. If the network data port is in an initialization state, the data stream is acquired after polling a preset number of times, and an alarm is triggered based on the presence or absence of the data stream. Compared to the current technology, where the initialization speed of the network data port is slower than that of the sensor, resulting in false alarms due to the BMC not acquiring the data stream, this technical solution first determines whether the network data port is in an initialization state. If so, the data stream is acquired after the BMC polls the surrounding devices a preset number of times, and an alarm is triggered based on the presence or absence of the data stream. This technical solution uses a delayed counting method, which does not immediately determine the data stream when the network data port restarts, but only after the BMC polls a certain number of times, thus reducing the occurrence of false alarms.
[0046] In the above embodiments, it is determined whether the network data port is in an initialization state to decide whether it is necessary to poll a certain number of times before monitoring the data flow. In specific implementations, if the network data port in the initialization state is already transmitting data, proceeding to the polling preset number of times step would result in the loss of data flow monitoring. Therefore, based on the above embodiments, in this embodiment, before the polling preset number of times step, the following step is further included:
[0047] Determine whether to enable initial monitoring;
[0048] If so, proceed to the step of polling the preset number of times;
[0049] If not, an alarm will be triggered based on whether or not the data stream is present.
[0050] The network data port monitoring method provided in this application, when the network data port is in the initialization state, further determines whether it is necessary to wait for the BMC to send a certain number of polls to surrounding devices before acquiring the data stream. If initialization monitoring needs to be enabled, the step of polling a preset number of times is performed. If initialization monitoring does not need to be enabled, the data stream is directly monitored based on whether an alarm is triggered by the presence or absence of the data stream, thus avoiding the loss of data stream monitoring due to waiting for the number of polls.
[0051] The above embodiments determine when to trigger an alarm based on the presence or absence of data stream confirmation by judging whether initialization monitoring is enabled. This embodiment provides a method for determining whether initialization monitoring is enabled. In this embodiment, determining whether initialization monitoring is enabled includes:
[0052] Determine if a data stream has been acquired. If no data stream has been acquired, confirm that initial monitoring has been started.
[0053] In this embodiment, upon determining that the network data port is in the initialization state, the system first checks whether a data stream has been acquired. If no data stream is acquired, it indicates that data transmission has not yet begun, and therefore a certain amount of time needs to be waited. Then, initialization monitoring is confirmed to start, and the system proceeds to polling a preset number of times to wait for the network data port initialization to complete and for data stream transmission to begin. It is understood that the step of determining whether a data stream has been acquired in this embodiment should be performed immediately upon determining that the network data port is in the initialization state. This immediate check determines whether a data stream has been acquired and whether it is necessary to wait for a preset number of polling cycles before monitoring the data stream.
[0054] The network data port monitoring method provided in this application confirms whether to start initial monitoring by determining whether a data stream has been acquired, so as to determine in a timely manner whether it is necessary to wait for a preset number of polling cycles before monitoring the data stream.
[0055] Based on the above embodiments, in this embodiment, before confirming the start of initialization monitoring, the following is also included:
[0056] Determine whether both the onboard network card and the external network card are disabled. If both are disabled, then confirm that initial monitoring is enabled if no data stream is obtained.
[0057] The network data port monitoring method provided in this application further ensures that the initial monitoring is not affected by other factors by determining whether both the onboard network card and the external network card are in a disabled state, and avoids errors in data flow acquisition due to the enabling of the onboard network card and the external network card.
[0058] Based on the above embodiments, in this embodiment, determining whether to enable initialization monitoring further includes:
[0059] Determine if the BMC is in the initialization state. If so, confirm that initialization monitoring is enabled if no data stream is acquired and both the onboard network card and the external network card are disabled.
[0060] The network data port monitoring method provided in this application embodiment, based on the above embodiment, further determines whether the BMC is in an initialization state by determining whether the BMC is in an initialization state, thus ensuring that the monitoring of the data flow is performed when the server restarts.
[0061] In the above embodiment, if it is determined that the network data port is in an initialized state, the process proceeds to step S11. In this embodiment, if the network data port is not in an initialized state, an alarm is triggered based on whether or not a data stream is present.
[0062] The network data port monitoring method provided in this application embodiment indicates that if the network data port is not in an initialized state, it means that the monitoring of the data flow of the network data port is ongoing. Therefore, the alarm is directly confirmed based on the presence or absence of data flow. An alarm is triggered when no data flow is obtained, thereby realizing the monitoring of the data flow.
[0063] In practice, due to network and sensor issues, data may actually be transmitted through the network data port, but the monitoring of the network data port may not capture the data flow, leading to false alarms.
[0064] Based on the above embodiments, in this embodiment, whether to trigger an alarm based on the presence or absence of data stream confirmation includes:
[0065] If no data stream is obtained after three polling attempts, an alarm will be triggered.
[0066] The network data port monitoring method provided in this application will issue an alarm if the BMC fails to obtain the network data port data flow after polling the surrounding devices three times. This avoids false alarms caused by network issues, sensor malfunctions, or other reasons.
[0067] The network data port monitoring method has been described in detail in the above embodiments. This application also provides embodiments corresponding to the network data port monitoring device. It should be noted that this application describes the embodiments of the device from two perspectives: one is based on the functional modules, and the other is based on the hardware.
[0068] Figure 2 A structural diagram of a network data port monitoring device provided in this application embodiment is shown below. Figure 2 As shown, the device includes:
[0069] Module 10 is used to determine whether the network data port is in the initialization state;
[0070] The acquisition module 11 is used to acquire the data stream after polling a preset number of times if the state is initialized.
[0071] Alarm module 12 is used to confirm whether to trigger an alarm based on the presence or absence of data stream.
[0072] Since the embodiments of the apparatus and the embodiments of the method correspond to each other, please refer to the description of the embodiments of the method for the embodiments of the apparatus, which will not be repeated here.
[0073] The network data port monitoring device provided in this application first determines whether the network data port is in an initialization state during the monitoring process to determine whether the network data port should restart. If the network data port is in an initialization state, the data stream is acquired after polling a preset number of times, and the presence or absence of the data stream is used to confirm whether to trigger an alarm. Compared to the current technology, where the initialization speed of the network data port is slower than that of the sensor, resulting in the BMC not acquiring the data stream and causing false alarms, this technical solution first determines whether the network data port is in an initialization state. If so, the data stream is acquired after the BMC polls the surrounding devices a preset number of times, and then the presence or absence of the data stream is used to confirm whether to trigger an alarm. This technical solution uses a delayed counting method, which does not immediately check the data stream when the network data port restarts, but only checks whether to trigger an alarm after the BMC polls a certain number of times, thus reducing the occurrence of false alarms.
[0074] Figure 3 A structural diagram of another network data port monitoring device provided in the embodiments of this application is shown below. Figure 3 As shown, the device includes: a memory 20 for storing computer programs;
[0075] The processor 21 is used to implement the steps of the network data port monitoring method as described in the above embodiment when executing a computer program.
[0076] The network data port monitoring device provided in this embodiment may include, but is not limited to, smartphones, tablets, laptops, or desktop computers.
[0077] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.
[0078] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 21, is capable of implementing the relevant steps of the network data port monitoring device disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary storage or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, a preset number of times.
[0079] In some embodiments, the network data port monitoring device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
[0080] Those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the network data port monitoring device and may include more or fewer components than shown.
[0081] The network data port monitoring device provided in this application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following methods: determine whether the network data port is in an initialization state; if it is in an initialization state, obtain the data stream after polling a preset number of times; and confirm whether to alarm based on the presence or absence of the data stream.
[0082] The network data port monitoring device provided in this application first determines whether the network data port is in an initialization state during the monitoring process to determine whether the network data port should restart. If the network data port is in an initialization state, the data stream is acquired after polling a preset number of times, and the presence or absence of the data stream is used to confirm whether to trigger an alarm. Compared to the current technology, where the initialization speed of the network data port is slower than that of the sensor, resulting in the BMC not acquiring the data stream and causing false alarms, this technical solution first determines whether the network data port is in an initialization state. If so, the data stream is acquired after the BMC polls the surrounding devices a preset number of times, and then the presence or absence of the data stream is used to confirm whether to trigger an alarm. This technical solution uses a delayed counting method, which does not immediately check the data stream when the network data port restarts, but only checks whether to trigger an alarm after the BMC polls a certain number of times, thus reducing the occurrence of false alarms.
[0083] Finally, this application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above method embodiments.
[0084] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0085] The computer-readable storage medium provided in this application embodiment, during the monitoring of the network data port, first determines whether the network data port is in an initialization state to determine whether the network data port should restart. If the network data port is in an initialization state, the data stream is acquired after polling a preset number of times, and an alarm is triggered based on the presence or absence of the data stream. Compared to the current technology, where the initialization speed of the network data port is slower than that of the sensor, resulting in false alarms due to the BMC not acquiring the data stream, this technical solution first determines whether the network data port is in an initialization state. If so, the data stream is acquired after the BMC polls the surrounding devices a preset number of times, and an alarm is triggered based on the presence or absence of the data stream. This technical solution uses a delayed counting method, which does not immediately determine the data stream when the network data port restarts, but only after the BMC polls a certain number of times, thus reducing false alarms.
[0086] The network data port monitoring method, apparatus, and medium provided in this application have been described in detail above. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
[0087] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A method for monitoring a network data port, characterized in that, include: Determine if the network data port is in an initialized state; If it is in the initialization state, the data stream will be obtained after polling a preset number of times; Whether to issue an alarm depends on the presence or absence of the data stream; Before the step of polling a preset number of times, the following is also included: Determine whether to enable initial monitoring; If so, proceed to the step of polling the preset number of times; If not, then confirm whether to trigger an alarm based on the presence or absence of the data stream; The determination of whether to enable initialization monitoring includes: determining whether the data stream has been acquired; if the data stream has not been acquired, then confirming that the initialization monitoring is enabled. Furthermore, prior to the step of confirming the activation of the initial monitoring, the following steps are also included: Determine whether both the onboard network card and the external network card are in a disabled state. If both are, then confirm that the initialization monitoring is enabled if the data stream is not obtained. Furthermore, the determination of whether to enable initialization monitoring also includes: Determine if the BMC is in the initialization state. If so, then if no data stream is acquired and both the onboard network card and the external network card are in a disabled state, confirm that the initialization monitoring is enabled.
2. The network data port monitoring method according to claim 1, characterized in that, If the network data port is not in the initialization state, an alarm should be triggered based on whether the data stream is present or not.
3. The network data port monitoring method according to claim 1, characterized in that, The step of confirming whether to issue an alarm based on the presence or absence of the data stream includes: If the data stream is not obtained after three polling attempts, an alarm is triggered.
4. A network data port monitoring device, characterized in that, include: The judgment module is used to determine whether the network data port is in the initialization state; The acquisition module is used to acquire the data stream after polling a preset number of times if the state is initialized. An alarm module is used to confirm whether to trigger an alarm based on the presence or absence of the data stream; The acquisition module is also used for: Determine whether to enable initial monitoring; If so, proceed to the step of polling the preset number of times; If not, then confirm whether to trigger an alarm based on the presence or absence of the data stream; In addition, it determines whether the data stream has been acquired; if the data stream has not been acquired, it confirms that the initial monitoring has been started. Determine whether both the onboard network card and the external network card are in a disabled state. If both are, then confirm that the initialization monitoring is enabled if the data stream is not obtained. Determine if the BMC is in the initialization state. If so, then if no data stream is acquired and both the onboard network card and the external network card are in a disabled state, confirm that the initialization monitoring is enabled.
5. A network data port monitoring device, characterized in that, Includes memory used to store computer programs; A processor, configured to implement the steps of the network data port monitoring method as described in any one of claims 1 to 3 when executing the computer program.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the network data port monitoring method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Method and system for network fault monitoring with linux
US20030212784A1