External plug-in card port rate monitoring method and system
Through the external card port rate monitoring system, a layered processing method is adopted to collect, clean and verify the external card port rate, which solves the problem of insufficient external card port rate monitoring and realizes unified monitoring and reliability assurance of external card rate.
Patent Information
- Application Number
- CN202511222964.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2025-10-03
AI Technical Summary
In the prior art, the monitoring of the external card port rate is insufficient, resulting in abnormal data transmission, which may lead to data loss, hardware damage or system downtime.
A plug-in card port rate monitoring system is provided, which includes a hardware acquisition module, a data processing module and a data display module. The system realizes unified monitoring of the plug-in card rate through layered processing. The hardware acquisition module collects the port rate, the data processing module performs cleaning and verification, and the data display module outputs visual information.
It realizes unified monitoring of the port speed of external card, improves the reliability of monitoring, can detect abnormalities in time and display them visually, and ensures the stability of data transmission.
Smart Images

Figure CN120743693A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of external card monitoring, and in particular to a method and system for monitoring the port rate of an external card. Background Art
[0002] External cards are common components in storage systems. Data transmission anomalies encountered by these cards can lead to data loss, hardware damage, or system downtime. Related technologies typically monitor only the operating status of the external card itself, but ignore any anomalies in the port speed, resulting in inadequate monitoring of the external card. Summary of the Invention
[0003] The present invention provides a method and system for monitoring the rate of an external card port, which can realize unified monitoring of the rate of the external card port and effectively ensure the reliability of the monitoring.
[0004] To solve the above technical problems, the present invention provides a method for monitoring the rate of an external card port, which is applied to an external card port rate monitoring system. The external card port rate monitoring system includes a hardware acquisition module, a data processing module, and a data display module. The hardware acquisition module is connected to the external card and the data processing module, and the data processing module is connected to the data display module. The method includes: The hardware acquisition module collects the port rate of at least two external cards and transmits the port rate of each external card to the data processing module; wherein the external card transmits data with the external device through the external card port; The data processing module cleans the port rate of each external card and verifies the port rate of each external card according to the type of the external card to obtain alarm information, and transmits the cleaned port rate and alarm information to the data display module; The data display module outputs the port rate and alarm information of each external card to the visual interface.
[0005] The present invention also provides an external card port rate monitoring system, comprising a hardware acquisition module, a data processing module and a data display module, wherein the hardware acquisition module is connected to the external card and the data processing module, and the data processing module is connected to the data display module; A hardware acquisition module is used to collect the port rates of at least two external cards and transmit the port rates of each external card to the data processing module; The data processing module is used to clean the port rate of each external card, verify the port rate of each external card according to the type of the external card, obtain alarm information, and transmit the cleaned port rate and alarm information to the data display module; The data display module is used to output the port rate and alarm information of each external card to the visual interface.
[0006] The beneficial effects of the present invention are as follows: the external card port rate monitoring system provided by the present invention can include a hardware acquisition module, a data processing module and a data display module, wherein the hardware acquisition module can uniformly acquire the external card port rates of at least two external cards to perform port rate monitoring at the hardware level, and can transmit the port rate of each external card to the data processing module. The data processing module can clean the port rate of each external card to correct data acquisition anomalies, and can also perform targeted verification processing on the port rate of each external card according to the type of external card to obtain alarm information, and can transmit the cleaned port rate and alarm information to the data display module. The data display module can output the port rate and alarm information of each external card to a visual interface. In this way, the present invention can perform layered processing of the acquisition, cleaning and verification, and visual display of the external card rate, which can not only realize unified monitoring of the external card rate, but also effectively ensure the reliability of monitoring.
[0007] The present invention also provides an external card port rate monitoring system, which has the above beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0009] Figure 1 A structural block diagram of a system for monitoring the rate of an external card port provided by an embodiment of the present invention; Figure 2 A structural block diagram of another external card port rate monitoring system provided by an embodiment of the present invention; Figure 3 A flow chart of a method for monitoring the rate of an external card port in a system according to an embodiment of the present invention; Figure 4 A schematic diagram of monitoring request interaction provided by an embodiment of the present invention; Figure 5 A schematic diagram of an alarm processing flow provided by an embodiment of the present invention; Figure 6 A schematic diagram of a data reporting process provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0010] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0011] It should be noted that, in the description of the present invention, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. The terms "first," "second," etc., in the present invention are used to distinguish similar objects, and are not used to describe a particular order or precedence.
[0012] In order to enable those skilled in the art to better understand the solutions of the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0013] External cards are common components in storage systems. Common external cards include NVMe expansion cards (Non Volatile Memory Host Controller Interface Specification), FC HBA cards (Fibre Channel Host Bus Adapter), SAS cards (Serial Attached SCSI), and network cards. In related technologies, monitoring of external cards is typically limited to monitoring the operating status of the external card itself, but neglects monitoring of abnormal rates on external card ports. An external card port refers to a communication port through which an external card communicates with an external device, such as an optical port on an FC HBA card or a network port on a network card. Abnormal rates on an external card port can reflect not only abnormalities on the external card port itself, but also abnormalities in the communication between the external card and the external device.
[0014] In view of this, in order to solve the technical problem of how to effectively monitor the rate of external card ports, the present invention can provide a method for monitoring the rate of external card ports, which can perform layered processing on the collection, cleaning and verification, and visual display of the rate of external card, which can not only realize unified monitoring of the rate of external card, but also effectively ensure the reliability of monitoring.
[0015] The following first introduces the structure of the external card port rate monitoring system applicable to this embodiment. Figure 1 , Figure 1The following is a block diagram of a system for monitoring the port rate of an external card provided in an embodiment of the present invention. The system may include a hardware acquisition module, a data processing module, and a data display module. The hardware acquisition module is connected to the external card and the data processing module, which is in turn connected to the data display module. At least two types of external cards may be connected to the hardware acquisition module. The hardware acquisition module is a hardware module responsible for acquiring the port rate of the external card. The data processing module is responsible for cleaning and verifying the port rate of the external card. The data display module is responsible for visually displaying the port rate of the external card and related alarm information. It can be seen that the hardware acquisition module, the data processing module, and the data display module can implement layered processing for acquiring, cleaning, verifying, and visually displaying the port rate of the external card.
[0016] In another embodiment, please refer to Figure 2 , Figure 2 This is a structural block diagram of another external card port rate monitoring system provided in an embodiment of the present invention. The data display module can be set at the user end (the user end is not shown), and the hardware acquisition module, data processing module, and external card are all set in the storage system. The user end can then interact with the hardware acquisition module and data processing module in the storage system to realize the acquisition and monitoring of the external card port rate.
[0017] Based on the above system structure description, the following describes the external card port rate monitoring method provided by this embodiment. Figure 3 , Figure 3 This is a flow chart of a method for monitoring the port rate of an external card in a system according to an embodiment of the present invention. The method may include: S101. A hardware acquisition module acquires the port rates of at least two external cards and transmits the port rates of each external card to a data processing module. The external card transmits data with an external device through the external card port.
[0018] In this embodiment, the hardware acquisition module is responsible for directly interacting with the external card and obtaining the raw external card port rate through a device driver or dedicated protocol. The port rate refers to the real-time transmission rate of the external card port. To achieve effective interaction, the hardware acquisition module must first determine the type of the external card and the ports it contains. Since external cards are generally connected to the storage system processor via a bus structure (such as the PCIe bus (Peripheral Component Interconnect Express), the hardware acquisition module can determine the type of each external card and its port identifier (such as the BDF number, Bus number / Device number / Function number; different external card ports may correspond to different function numbers) through bus enumeration. Subsequently, the hardware acquisition module can generate a corresponding port rate acquisition command based on the external card type and port identifier, and send the port rate acquisition command to the corresponding external card, thereby obtaining the port rate of each port on the external card. The port rate acquisition command can be configured based on the type and manufacturer of each external card.
[0019] The hardware acquisition module can then transmit the collected port rates of the external card to the data processing module. However, given the large number of external cards and their ports, reporting the port rate of each external card individually would significantly increase the complexity of port rate reporting. Therefore, in this embodiment, the hardware acquisition module can be responsible for port rate collection and aggregate the currently collected port rates into rate sets based on the external card and external card port, then store the rate sets in its own hardware registers. This allows the data processing module to access the hardware registers of the hardware acquisition module and obtain the port rates of each external card from them.
[0020] In one embodiment, the hardware acquisition module collects the port rates of at least two external cards, including: Step 11: The hardware acquisition module performs bus enumeration on the external cards to determine the external card type of each external card and the port identifier of each external card port.
[0021] Step 12: Send a port rate collection command to each external card according to the external card type and port identifier to obtain the port rate of each external card port.
[0022] Step 13: Integrate the port rates of each external card into a rate set, and write the rate set into the hardware register of the hardware acquisition module.
[0023] It should be noted that this embodiment does not limit the specific form of the rate set, which can be set according to actual application requirements. It only needs to clarify the correspondence between the port rate and the external card and the external card port, and it can be convenient for the data processing module to perform analysis.
[0024] The hardware acquisition module and the data processing module communicate port rates via hardware registers. This reduces the complexity of port rate reporting and decouples data acquisition from data processing, allowing the hardware acquisition module to focus on data acquisition and the data processing module to focus on data processing. The data processing module does not need to worry about how the underlying layer collects the port rates of each external card; it only needs to send requests to the hardware acquisition module.
[0025] For example, the hardware acquisition module can provide a PCIe register for storing port rates. The offset value of this PCIe register can be set in the extended capability register area, for example, 0x6A. This extended capability register area can be customized by the manufacturer. Furthermore, the data processing module can obtain the port rates of each external card at once by accessing register 0x6A in the hardware acquisition module.
[0026] Furthermore, since the space of the hardware register is limited, each time the hardware acquisition module completes a round of port data acquisition, it can form the latest port rate into the latest rate set, and use the latest rate set to overwrite the historical rate set in the hardware register, thereby utilizing the limited hardware register space to realize the reporting of the latest port rate.
[0027] In one embodiment, writing the rate set into a hardware register of the hardware acquisition module may include: Step 21: The hardware acquisition module uses the current rate set to overwrite the historical rate set in the hardware register.
[0028] Furthermore, considering that the port rate units of different external card ports are different, in order to facilitate users to monitor the port rate of each external card, the hardware acquisition module uses the numerical conversion relationship between the port rate unit of each external card and the bus rate unit (such as the PCIe bus rate unit) to convert each port rate into the bus rate, thereby achieving unit unification.
[0029] In one embodiment, the method may further include: Step 31: The hardware acquisition module converts each port rate into a bus rate by using the numerical conversion relationship between the port rate unit of each external card and the bus rate unit.
[0030] It should be noted that this embodiment does not limit the specific numerical conversion relationship between the port rate unit and the bus rate unit, and can be set according to actual application requirements.
[0031] S102: The data processing module cleans the port rate of each external card, and verifies the port rate of each external card according to the type of the external card to obtain alarm information, and transmits the cleaned port rate and alarm information to the data display module.
[0032] In this embodiment, the data processing module is responsible for receiving the port rate reported by the hardware acquisition module, cleaning the port rate, and verifying and generating alarm information based on the cleaned port rate, thereby reporting the cleaned port rate and alarm information to the data display module.
[0033] Regarding the acquisition of port rates, as described above, the hardware acquisition module can store the port rates of each external card in its own hardware register in the form of a rate set, so the data processing module can read the rate set from the hardware register and parse the rate set to obtain the port rate of the external card.
[0034] In one embodiment, transmitting the port rate of each external card to the data processing module may include: Step 41: The data processing module reads the rate set from the hardware register; Step 42: Analyze the rate set to obtain the port rate of each external card.
[0035] It should be noted that the data processing module can periodically access the hardware register to obtain the latest rate set, and of course can also detect whether the hardware register is updated, and when it is determined that the hardware register is updated, immediately read the latest rate set from the hardware register.
[0036] In one embodiment, the data processing module reads the rate set from the hardware register, which may include: Step 51: The data processing module detects whether the hardware register is updated, and reads the rate set from the hardware register when it is determined that the hardware register is updated.
[0037] Furthermore, for data cleaning, the data processing module can perform deduplication processing on the port rates, for example, by generating a hash value for the acquired port rates and filtering duplicate values based on the hash value. Furthermore, the data processing module can also perform timestamp alignment on the port rates to clarify the acquisition timestamp of the port rates and facilitate the display of the port rates by the data display module.
[0038] Based on this, the data processing module cleans the port rate of each external card, which may include: Step 61: De-duplication processing is performed on the port rates, and timestamp alignment is performed on the port rates.
[0039] Furthermore, for data verification, the data processing module can verify the port rate of each external card port using a corresponding data verification method based on the type of each external card. For example, when the port rate exceeds the physical transmission limit of the external card port, it can be determined that there is an abnormality in the port rate collection. Therefore, this embodiment can preset a corresponding port rate upper limit for each external card port. The port rate upper limit can be based on the port bandwidth of the external card port. In addition, considering that the transmission rate of the external card should not exceed the bus bandwidth of the bus interface where it is located, the above-mentioned port rate upper limit can also be based on the bus bandwidth of the bus where the external card is located. Furthermore, after completing the port rate cleaning, it can be determined whether the port rate is greater than the corresponding preset port rate upper limit. If it is greater, an alarm message indicating an abnormality in port rate collection is generated.
[0040] In one embodiment, checking the port rate of each external card according to the type of the external card to obtain alarm information may include: Step 71: The data processing module queries the preset port rate limit of each external card and determines whether the port rate is greater than the preset port rate limit; the preset port rate limit is set according to the port bandwidth of the external card port and / or the bus bandwidth of the bus where the external card is located; Step 72: If it is greater than, an alarm message indicating abnormal port rate collection is generated.
[0041] For example, a significant increase or decrease in port speed over a short period of time typically indicates abnormal port speed fluctuations. Therefore, the data processing module determines the change in the current port speed compared to the historical port speed and determines whether this change exceeds a preset threshold. If so, an alarm is generated indicating abnormal port speed fluctuations. This preset threshold is specific to the add-in card and varies depending on the card.
[0042] In another embodiment, checking the port rate of each external card according to the type of the external card to obtain the alarm information may include: Step 81: The data processing module determines a change in the current port rate compared to the historical port rate, and determines whether the change is greater than a preset threshold; Step 82: If it is greater than, generate an alarm message indicating abnormal port rate fluctuation.
[0043] For example, if the port rate is missing at multiple consecutive time points, it indicates that there is an abnormality in the port rate sampling. Therefore, the data processing module can determine whether the port rate is missing at least two consecutive time points based on the port rate timestamp. If there is a missing, an alarm message indicating the port rate sampling abnormality is generated.
[0044] In another embodiment, checking the port rate of each external card according to the type of the external card to obtain the alarm information may include: Step 91: The data processing module determines whether the port rate is missing in at least two consecutive time points based on the timestamp of the port rate; Step 92: If yes, generate an alarm message indicating that the port rate sampling is abnormal.
[0045] In addition, the data processing module can also request the hardware acquisition module to report other abnormal information about the external card (such as an external card being offline or a cyclic redundancy check (CRC) error in the data packets transmitted by the external card). The hardware acquisition module collects abnormal information about the external card and transmits it to the data processing module, which then generates an alarm based on the abnormal information.
[0046] In one embodiment, the method may further include: Step 1001: The hardware acquisition module collects abnormal information of the external card and transmits the abnormal information to the data processing module; Step 1002: The data processing module generates alarm information based on the abnormal information.
[0047] Furthermore, in addition to generating the aforementioned alarms, the data sampling module can also perform corresponding exception handling actions based on the type of alarm. Please refer to the table below, which lists the detection conditions, exception handling actions, and alarm levels corresponding to various alarms.
[0048] Table 1 Abnormal alarm types The base value refers to the preset upper limit of the port rate.
[0049] Furthermore, after completing data cleaning and data verification, the data processing module can pass the cleaned port rate and alarm information to the data display module. When the data processing module and the data display module are respectively arranged in the storage system and the user end, the data display module can provide a data cache (Scache), and the data processing module can send the port rate and alarm information to the data cache via the network, so that the data display module can pull the latest port rate and alarm information from the data cache. Furthermore, in order to improve the network transmission rate, the data processing module compresses the cleaned port rate and alarm information and sends the compressed data to the data display module. This embodiment does not limit the specific compression method. For example, the cleaned port rate and alarm information can be compressed into a binary format using the Protocol Buffer method, where the Protocol Buffer is a data compression format.
[0050] In one embodiment, transmitting the cleaned port rate and alarm information to the data display module may include: Step 1101: The data processing module compresses the cleaned port rate and alarm information into a binary format; Step 1102: The data processing module sends the compressed port rate and alarm information to the data buffer of the data display module through the network socket; Step 1103: The data display module reads the port rate and alarm information from the data buffer.
[0051] S103: The data display module outputs the port rate and alarm information of each external card to a visual interface.
[0052] In this embodiment, the data display module is responsible for outputting the port rate and alarm information of each external card to the visual interface.
[0053] For the port rates of add-in cards, the data display module aggregates the port rates at multiple acquisition points, such as hourly, daily, weekly, and monthly port rates, at hourly, daily, weekly, and monthly granularities. The data display module then renders the aggregated port rates into visual charts corresponding to the add-in cards and ports on the add-in cards to which the port rates belong, and outputs the visual charts to the visualization interface. This embodiment is not limited to specific visual charts; examples include speed gauges, circular progress bars, health status matrices, and real-time rate curves.
[0054] For alarm information, the data display module adds alarm information level identification to the alarm information, and supports filtering by priority (high / medium / low) according to different types of external cards, and displays alarm information and alarm information level identification in a hierarchical manner.
[0055] In one embodiment, the data display module outputs the port rate and alarm information to a visualization interface, which may include: Step 1201: The data display module aggregates the port rates at multiple acquisition moments and renders them into a visualization chart corresponding to the external card and the external card port to which the port rates belong, and outputs the visualization chart to a visualization interface; Step 1202: Add an alarm information level identifier to the alarm information, and output the alarm information and the alarm information level identifier to a visualization interface.
[0056] Based on the above embodiments, the external card port rate monitoring system provided by the present invention may include a hardware acquisition module, a data processing module, and a data display module, wherein the hardware acquisition module may uniformly acquire the external card port rates of at least two external cards to perform port rate monitoring at the hardware level, and may transmit the port rate of each external card to the data processing module. The data processing module may clean the port rate of each external card to correct data acquisition anomalies, and may also perform targeted verification processing on the port rate of each external card according to the type of external card to obtain alarm information, and may transmit the cleaned port rate and alarm information to the data display module. The data display module may output the port rate and alarm information of each external card to a visual interface. In this way, the present invention may perform layered processing of the acquisition, cleaning, verification, and visual display of the external card rate, which not only enables unified monitoring of the external card rate, but also effectively ensures the reliability of monitoring.
[0057] Based on the above embodiment, the following is a complete introduction to the above-mentioned external card port rate monitoring method. This system adopts a layered acquisition architecture, designs dedicated collectors for different types of storage external cards, and transmits data through a unified data bus. The overall architecture is divided into three layers: Hardware acquisition layer (SC module): directly interacts with hardware devices and obtains raw external card port transmission rate data through device drivers or dedicated protocols; Data processing layer (PE module): cleans, converts and preliminarily aggregates the original rate data, and sends the processed rate data to the data display layer; Data transmission layer: sends the processed data to the data display module (GUI WEB).
[0058] The specific process is as follows: 1. The GUI WEB settings send a monitoring request for the external card port transmission rate, and the storage system triggers monitoring feedback: Please refer to Figure 4 , Figure 4A schematic diagram of monitoring request interaction provided by an embodiment of the present invention. By accessing the device view interface provided by the GUI web interface and configuring the GUI web interface to send a request to monitor the transmission rate of an external card to the storage system (server), the storage system calls the PE module interface to query the transmission rate information of all external cards and provides the storage system with the current transmission rate data for each external card port. The storage system caches the external card transmission rate information in the external card transmission rate register Scache on the GUI web interface. The web page uses a WebSocket to push data based on the current external card transmission rate register Scache, pulling the latest events from the database every second to achieve zero-latency refresh. This is displayed as an external card port transmission rate information view (ECharts), which includes a real-time monitoring panel, statistical analysis view, and alarm management interface. The external card port transmission rate register Scache continuously stores the external card port transmission rate information. When the transmission rate information of a specific external card port changes, the PE module reports it to the storage system in real time via WebSocket, and the external card port transmission rate register Scache updates the cache, enabling real-time monitoring by upper-layer modules. When the GUI WEB is requested next time, the external card port transmission rate register Scache change information will be returned to the WEB page. The external card port transmission rate information of the PE module interface is obtained through the external card port transmission rate monitoring system provided by the underlying SC module.
[0059] 2. Create a real-time monitoring task for the transmission rate of the SC module external card: In the storage system, the PE module sends an external card transmission rate query command to the SC module, which then adds real-time, cyclic monitoring of the external card port transmission rate. Through the monitoring system, the SC module uses the PCIe external card port rate register (Offset 0x6A) to enumerate the bus and locate the BDF value (Bus / Device / Function) of the target external card port according to the protocol of each external card. Designed for compatibility with multiple external card ports, the SC module uses vendor-specific commands (such as SCSI LogSense) to read the transmission rates of external card ports such as NVMe expansion cards, FC cards, SAS cards, and network cards, and maps them to standard PCIe rate encoding. The SC module also performs logical conversion of the rate data for different card ports. During the external card port rate reading process, the SC module monitoring system directly obtains the real-time operating rate of the physical ports of each external card, classifies and collects data based on the external card type, and groups the data based on the number of physical ports on the external card. When generating / data / HBA_speed, the PE module extracts the add-in card port transmission rate information from the SC module's hardware registers and writes it to HBA_speed. It also performs data deduplication and verification, and timestamp calibration. For example, it generates an MD5 hash value for the acquired data, filters duplicate events, and uses the NTP protocol to calibrate each node's time to ensure an error of less than 1 millisecond. The PE module also performs array analysis on the acquired add-in card transmission rate data, creating a binary array list in HBA_speed for adjustment and management within the GUI web interface.
[0060] 3. Implementation of monitoring efficiency optimization strategy: Dynamically adjust the sampling frequency according to the system load, preset the default sampling interval for each external card type, and perform sampling according to the basic sampling interval. At the same time, you can also set high load or low load to achieve delay and shorten the sampling interval to prevent monitoring itself from becoming a system bottleneck and provide timely feedback on the transmission rate information of the external card. At the same time, achieve efficient data transmission and processing, use Protocol Buffers to define a compact data structure to convert the external card port rate data object into binary format, reducing network transmission overhead.
[0061] 4. PE exception handling: 1) Data verification rules: A rigorous multi-level defense mechanism for data validation is implemented at the data processing layer. Counter monotonicity checks ensure that new counter values are no less than the previous value (recounting after a device reset is permitted). This ensures data continuity. When a decrease in the current value is detected, the decrease is determined to be greater than 10% of the previous value. A mapping table is established between external card types and theoretical maximum rates to verify that the rate does not exceed the theoretical hardware limit (for example, NVMe cards do not exceed the PCIe bus bandwidth). A threshold check is performed on the measured rate: exceeding 105% of the theoretical limit is considered abnormal. Continuity checks are also performed, using a state machine to track the number of consecutive sampling failures. A configurable threshold (default 3, configurable in the GUI web interface) is set. Three consecutive sampling failures trigger a device abnormality alarm.
[0062] 2) Fail-safe calculations: The encapsulated function (safe_calculate) is used to capture exceptions, such as external card offline and counter reset. At the same time, the external card status is marked and logged in the external card status management when the external card is offline. The baseline is automatically re-established when the counter is reset. Detailed error logs are recorded for unknown abnormal data and a null value is returned. The alarm processing process is as follows: Figure 5 As shown, Figure 5 A schematic diagram of an alarm processing flow provided by an embodiment of the present invention can perform different alarm operations according to different alarm levels.
[0063] 5. Front-end GUI WEB display: 1) Real-time monitoring panel, the bottom SC module external card port transmission rate monitoring system will feed back data to PE, and the PE module will process and analyze the data and feed it back to the GUI WEB. A data matrix of the transmission rate information of the external card port in each slot is added to the GUI WEB interface, and the data of the external card port transmission rate is split. The subsequent data binding process uses WebSocket to establish a real-time data channel, such as Figure 6 As shown, Figure 6 This is a schematic diagram of the data reporting process provided by an embodiment of the present invention, where the data display server is a GUI Web. The card background color is dynamically adjusted based on the status (normal / abnormal). The latest rate data event records are retrieved and refreshed every second, enabling full traceability, complete recording of status change events, and the ability to jump to the device history page by clicking on details. Dynamic updates are also available.
[0064] 2) Multi-dimensional screening of statistical analysis views. This invention adopts a time series database and a rolling window algorithm to achieve efficient data storage and multi-dimensional statistics. It can be linked to charts and displayed as categories such as NVMe expansion cards, FC cards, SAS cards, and network cards. After the user selects the time range (day / week / month), the front end sends an AJAX request to obtain data, and the back end returns the aggregated results. The front end dynamically renders charts through ECharts. Daily statistics aggregate data once every hour to generate a 24-hour rolling report. Weekly / monthly statistics are based on the Tumbling Window algorithm and are displayed based on fixed periodic summary data. Interactive charts support zooming, dragging, and drill-down queries, and access data export. Click the "Export CSV" button to call the back end to generate a temporary file and return a download link. The main forms are: Speed meter: displays the current transmission rate; Circular progress bar: displays bandwidth utilization; Health status matrix: Four-color indicator lights indicate the status of the external card ports; Real-time rate curve: scrolls to display the trend of the most recent time period.
[0065] At the same time, historical trend analysis charts are added, data queries are generated based on time range parameters, aggregated data is obtained through REST API, and multi-dimensional charts are rendered using ECharts to form various charts to achieve chart linkage. The chart types can be: Heat map: load distribution of each slot in the time dimension; Stacked area chart: bandwidth share of different card types; Box plot: rate fluctuation statistics; Scatter matrix: Multi-index correlation analysis.
[0066] 3) The alarm management interface implements a multi-level response mechanism. The alarm list will display unprocessed alarms. Different types of external cards support filtering by priority (high / medium / low). Alarm information is displayed in levels. Emergency alarms are flashing red + sound prompts, important alarms are highlighted orange, and general alarms are marked in yellow. Batch operations can also be performed, and multiple alarms can be confirmed or ignored with one click.
[0067] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0068] Please refer to Figure 1 , Figure 1A block diagram of a system for monitoring the port rate of an external card provided by an embodiment of the present invention. The system may include a hardware acquisition module, a data processing module, and a data display module. The hardware acquisition module is connected to the external card and the data processing module, and the data processing module is connected to the data display module. A hardware acquisition module is used to collect the port rates of at least two external cards and transmit the port rates of each external card to the data processing module; The data processing module is used to clean the port rate of each external card, verify the port rate of each external card according to the type of the external card, obtain alarm information, and transmit the cleaned port rate and alarm information to the data display module; The data display module is used to output the port rate and alarm information of each external card to the visual interface.
[0069] Optionally, the hardware acquisition module is further used to: Perform bus enumeration on the external cards to determine the external card type of each external card and the port identifier of each external card port; Send a port rate acquisition command to each external card according to the external card type and port identifier to obtain the port rate of each external card port; The port rates of each external card are integrated into a rate set, and the rate set is written into the hardware register of the hardware acquisition module.
[0070] Optionally, the data processing module is further configured to: The data processing module reads the rate set from the hardware register; Parse the rate set to obtain the port rate of each external card.
[0071] Optionally, the hardware acquisition module is further used to: The numerical conversion relationship between the port rate unit of each external card and the bus rate unit is used to convert each port rate into the bus rate.
[0072] Optionally, the hardware acquisition module is further used to: Overwrite the historical rate set in the hardware register with the current rate set; The data processing module is also used to: Detect whether the hardware register is updated, and read the rate set from the hardware register when it is determined that the hardware register is updated.
[0073] Optionally, the data processing module is further configured to:
[0074] Deduplication is performed on the port rates and timestamp alignment is performed on the port rates.
[0075] Optionally, the data processing module is further configured to: Querying the preset port rate upper limit of each external card and determining whether the port rate is greater than the preset port rate upper limit; the preset port rate upper limit is set according to the port bandwidth of the external card port and / or the bus bandwidth of the bus where the external card is located; If it is greater than that, an alarm message indicating abnormal port rate collection will be generated; and / or, determining a change in the current port rate compared to a historical port rate, and determining whether the change is greater than a preset threshold; If it is greater than that, an alarm message indicating abnormal port rate fluctuation is generated; and / or, determining, based on the timestamp of the port rate, whether the port rate is missing in at least two consecutive time points; If so, an alarm message indicating abnormal port rate sampling is generated.
[0076] Optionally, the hardware acquisition module is further used to: Collect abnormal information of external cards and transmit the abnormal information to the data processing module; The data processing module is also used to: Generate alarm information based on abnormal information.
[0077] The data processing module is also used to: Compress the cleaned port rate and alarm information into binary format; Send the compressed port rate and alarm information to the data buffer of the data display module through the network socket; The data display module is also used to: Read port rate and alarm information from the data buffer.
[0078] Optionally, the data display module is further configured to: Aggregate the port rates at multiple acquisition moments and render them into a visualization chart corresponding to the external card and the external card port to which the port rate belongs, and output the visualization chart to a visualization interface; Add an alarm information level identifier to the alarm information, and output the alarm information and the alarm information level identifier to the visualization interface.
[0079] For the description of the features in the embodiment corresponding to the external card port rate monitoring system, reference can be made to the relevant description of the embodiment corresponding to the external card port rate monitoring method, which will not be repeated here.
[0080] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above-mentioned embodiments of the external card port rate monitoring method when running.
[0081] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0082] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned embodiments of the method for monitoring the port rate of an external card are implemented.
[0083] An embodiment of the present invention also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in any of the above-mentioned embodiments of the external card port rate monitoring method.
[0084] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0085] The above is a detailed introduction to the external card port rate monitoring method and system provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method and core ideas of the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A method for monitoring the port rate of an external card, characterized in that: The method is applied to an external card port rate monitoring system, the external card port rate monitoring system includes a hardware acquisition module, a data processing module and a data display module, the hardware acquisition module is connected to the external card and the data processing module, and the data processing module is connected to the data display module; the method includes: The hardware acquisition module acquires the port rate of at least two external cards and transmits the port rate of each external card to the data processing module; wherein the external card transmits data with the external device through the external card port; The data processing module cleans the port rate of each external card, and verifies the port rate of each external card according to the type of the external card to obtain alarm information, and transmits the cleaned port rate and alarm information to the data display module; The data display module outputs the port rate and alarm information of each external card to a visual interface.
2. The method for monitoring the rate of an external card port according to claim 1, wherein: The hardware acquisition module acquires the port rates of at least two external cards, including: The hardware acquisition module performs bus enumeration on the external cards to determine the external card type of each external card and the port identifier of each external card port; Sending a port rate acquisition command to each external card according to the external card type and the port identifier to obtain the port rate of each external card port; The port rates of each external card are integrated into a rate set, and the rate set is written into the hardware register of the hardware acquisition module.
3. The method for monitoring the rate of an external card port according to claim 2, wherein: The port rate of each external card is transmitted to the data processing module, including: The data processing module reads the rate set from the hardware register; The rate set is parsed to obtain the port rate of each external card.
4. The method for monitoring the rate of an external card port according to claim 2, wherein: Also includes: The hardware acquisition module converts each port rate into a bus rate by using the numerical conversion relationship between the port rate unit of each external card and the bus rate unit.
5. The method for monitoring the rate of an external card port according to claim 1, wherein: The data processing module cleans the port rate of each external card, including: Deduplication processing is performed on the port rates, and timestamp alignment is performed on the port rates.
6. The method for monitoring the rate of an external card port according to claim 5, wherein: The port rate of each external card is checked and processed according to the external card type to obtain alarm information, including: The data processing module queries the preset port rate upper limit of each external card and determines whether the port rate is greater than the preset port rate upper limit; the preset port rate upper limit is set according to the port bandwidth of the external card port and / or the bus bandwidth of the bus where the external card is located; If it is greater than that, an alarm message indicating abnormal port rate collection will be generated; And / or, the data processing module determines a change value of the current port rate compared to a historical port rate, and determines whether the change value is greater than a preset threshold; If it is greater than that, an alarm message indicating abnormal port rate fluctuation is generated; and / or, the data processing module determines, based on the timestamp of the port rate, whether the port rate is missing in at least two consecutive time points; If so, an alarm message indicating abnormal port rate sampling is generated.
7. The method for monitoring the rate of an external card port according to claim 1, wherein: Also includes: The hardware acquisition module collects abnormal information of the external card and transmits the abnormal information to the data processing module; The data processing module generates alarm information according to the abnormal information.
8. The method for monitoring the rate of an external card port according to claim 1, wherein: The cleaned port rate and alarm information are transmitted to the data display module, including: The data processing module compresses the cleaned port rate and alarm information into a binary format; The data processing module sends the compressed port rate and alarm information to the data cache of the data display module through the network socket; The data display module reads the port rate and the alarm information from the data buffer.
9. The method for monitoring the rate of an external card port according to claim 1, wherein: The data display module outputs the port rate and the alarm information to a visual interface, including: The data display module aggregates the port rates at multiple acquisition moments and renders them into a visual chart corresponding to the external card and the external card port to which the port rates belong, and outputs the visual chart to the visual interface; An alarm information level identifier is added to the alarm information, and the alarm information and the alarm information level identifier are output to the visualization interface.
10. A system for monitoring the rate of an external card port, characterized in that: It includes a hardware acquisition module, a data processing module and a data display module, wherein the hardware acquisition module is connected to an external card and the data processing module, and the data processing module is connected to the data display module; The hardware acquisition module is used to collect the port rates of at least two external cards and transmit the port rates of each external card to the data processing module; The data processing module is used to clean the port rate of each external card, and to verify the port rate of each external card according to the type of the external card to obtain alarm information, and transmit the cleaned port rate and alarm information to the data display module; The data display module is used to output the port rate and alarm information of each external card to a visual interface.
Citation Information
Patent Citations
Method for obtaining PCI-E equipment information of system by out-of-band management
CN104639370A
External plug-in card monitoring system, method and equipment and storage medium
CN115454767A
External plug-in card adaptation method and device, equipment and storage medium
CN117149283A