A method, system for monitoring the rate of an add-in card port
Patent Information
- Application Number
- CN202511222964.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2045-08-29
AI Technical Summary
[0002]外插卡为存储系统中的常见部件,而外插卡遭遇数据传输异常可能导致数据丢失、硬件损坏或系统宕机
[0006] The beneficial effects of this invention are as follows: The external card port rate monitoring system provided by this invention can include a hardware acquisition module, a data processing module, and a data display module. The hardware acquisition module can uniformly acquire the port rates of at least two types of external cards to monitor port rates at the hardware level, and can transmit the port rates of each external card to the data processing module. The data processing module can clean the port rates of each external card to correct data acquisition anomalies, and can also perform targeted verification processing on the port rates of each external card according to the external card type to obtain alarm information, and can transmit the cleaned port rates and alarm information to the data display module. The data display module can output the port rates and alarm information of each external card to a visualization interface. Thus, this invention can perform layered processing of external card rate acquisition, cleaning and verification, and visualization, which not only enables unified monitoring of external card rates but also effectively ensures the reliability of monitoring.
Smart Images

Figure CN120743693B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of external card monitoring technology, and in particular to a method and system for monitoring the port rate of an external card. Background Technology
[0002] External cards are common components in storage systems, and data transmission anomalies in external cards can lead to data loss, hardware damage, or system crashes. Current technologies typically only monitor the external card's own operational status, neglecting anomalies in the external card's port speed, resulting in inadequate monitoring of external cards. Summary of the Invention
[0003] This invention provides a method and system for monitoring the port rate of external cards, which can realize unified monitoring of the port rate of external cards and effectively ensure the reliability of monitoring.
[0004] To address the aforementioned technical problems, this invention provides a method for monitoring the port speed of an external SIM card, applied to an external SIM card port speed monitoring system. The external SIM card port speed 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 SIM 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 rates of at least two types of external cards and transmits the port rates of each external card to the data processing module; wherein, the external cards transmit data with external devices through their external card ports. The data processing module cleans the port rates of each external card and verifies the port rates of each external card according to the card type to obtain alarm information. The cleaned port rates and alarm information are then transmitted to the data display module. The data display module outputs the port rates and alarm information of each external card to the visualization interface.
[0005] The present invention also provides an external card port rate monitoring system, including 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; The hardware acquisition module is used to acquire the port rates of at least two types of 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 rates of each external card, verify the port rates of each external card according to the type of external card to obtain alarm information, and transmit the cleaned port rates and alarm information to the data display module. The data display module is used to output the port rates and alarm information of each external card to the visualization interface.
[0006] The beneficial effects of this invention are as follows: The external card port rate monitoring system provided by this invention can include a hardware acquisition module, a data processing module, and a data display module. The hardware acquisition module can uniformly acquire the port rates of at least two types of external cards to monitor port rates at the hardware level, and can transmit the port rates of each external card to the data processing module. The data processing module can clean the port rates of each external card to correct data acquisition anomalies, and can also perform targeted verification processing on the port rates of each external card according to the external card type to obtain alarm information, and can transmit the cleaned port rates and alarm information to the data display module. The data display module can output the port rates and alarm information of each external card to a visualization interface. Thus, this invention can perform layered processing of external card rate acquisition, cleaning and verification, and visualization, which not only enables unified monitoring of external card rates but also effectively ensures the reliability of monitoring.
[0007] The present invention also provides an external card port rate monitoring system, which has the above-mentioned beneficial effects. Attached Figure Description
[0008] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a structural block diagram of an external card port rate monitoring system provided in an embodiment of the present invention; Figure 2 This is a structural block diagram of another external card port rate monitoring system provided in an embodiment of the present invention; Figure 3 This is a flowchart of an external card port rate monitoring method according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the monitoring request interaction provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of an alarm processing flow provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of a data reporting process provided in an embodiment of the present invention. Detailed Implementation
[0010] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0011] It should be noted that, in the description of this invention, 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. The terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0012] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0013] External expansion cards are common components in storage systems. Common external expansion 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 expansion cards is usually limited to monitoring the card's own operational status, neglecting the monitoring of abnormal port speeds. External expansion card ports refer to the communication ports through which the card communicates with external devices, such as the optical port of an FC HBA card or the network port of a network card. Abnormal external expansion card port speeds can reflect not only abnormalities in the external expansion card port itself but also communication abnormalities between the external expansion card and external devices.
[0014] In view of this, the present invention provides a method for monitoring the port rate of external cards, which can perform layered processing of external card rate acquisition, cleaning and verification, and visualization. This method can not only achieve unified monitoring of external card rates, but also effectively ensure the reliability of monitoring.
[0015] The structure of the external card port rate monitoring system applicable to this embodiment is described below. Please refer to... Figure 1 , Figure 1This invention provides a structural block diagram of an external card port rate monitoring system. 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. 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 external card port rate. The data processing module is responsible for cleaning and verifying the external card port rate. The data display module is responsible for visually displaying the external card port rate and related alarm information. Therefore, the hardware acquisition module, data processing module, and data display module can achieve layered processing of external card port rate acquisition, cleaning and verification, and visual display.
[0016] In another implementation, please refer to Figure 2 , Figure 2 The diagram below shows another structural block diagram of an 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), while the hardware acquisition module, data processing module, and external card are all set in the storage system. Thus, the user end can 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 architecture description, the external card port rate monitoring method provided in this embodiment will be introduced below. Please refer to... Figure 3 , Figure 3 This is a flowchart of an external card port rate monitoring method according to an embodiment of the present invention. The method may include: S101, the hardware acquisition module acquires the port rates of at least two types of external cards and transmits the port rates of each external card to the data processing module; wherein, the external cards transmit data with external devices through the external card ports.
[0018] In this embodiment, the hardware acquisition module is responsible for directly interacting with the external card and obtaining the raw port rates of the external card through device drivers or dedicated protocols. The port rate refers to the real-time transmission rate of the external card port. To achieve the desired interaction, the hardware acquisition module first needs to determine the type of the external card and which ports it contains. Since external cards are generally connected to the storage system processor via a bus structure (such as PCIe bus, Peripheral Component Interconnectexpress, a high-speed serial computer expansion bus standard), the hardware acquisition module can determine the type of each external card and its port identifier (such as 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 corresponding port rate acquisition commands based on the external card type and port identifiers, and send these commands to the corresponding external card to obtain the port rates of each port on the external card. The port rate acquisition commands can be configured according to the type and manufacturer of each external card.
[0019] Subsequently, the hardware acquisition module can transmit the acquired external card port rates to the data processing module. However, considering the large number of external cards and 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 acquiring the port rates and integrating the currently acquired port rates into a rate set according to the external card and its port, and then storing the rate set in its own hardware register. In this way, the data processing module can access the hardware register of the hardware acquisition module and obtain the port rate of each external card from it.
[0020] In one implementation, the hardware acquisition module acquires the port rates of at least two types of external cards, including: Step 11: The hardware acquisition module performs bus enumeration on the external cards to determine the external card type and port identifier of each external card port.
[0021] Step 12: 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.
[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 the actual application requirements. It is only necessary to clarify the correspondence between the port rate and the external card and the external card port, and at the same time facilitate the data processing module to parse it.
[0024] The hardware acquisition module and the data processing module communicate via hardware registers to transmit port rates. This reduces the complexity of port rate reporting and decouples data acquisition and processing, allowing the hardware acquisition module to focus on acquisition and the data processing module to focus on processing. The data processing module does not need to know how the underlying system acquires 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 expansion capability register area, for example, the offset value can be 0x6A. This expansion capability register area can be customized by the manufacturer. Then, the data processing module can obtain the port rates of each external card at once by accessing the 0x6A register in the hardware acquisition module.
[0026] Furthermore, since the space of the hardware registers is limited, the hardware acquisition module can assemble the latest port rates into a new rate set after each round of port data acquisition, and use the new rate set to overwrite the historical rate set in the hardware register, thereby realizing the reporting of the latest port rates using the limited hardware register space.
[0027] In one implementation, writing the rate set into the 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 a bus rate, thereby achieving unit unification.
[0029] In one embodiment, the method may further include: Step 31: The hardware acquisition module uses the numerical conversion relationship between the port rate unit and the bus rate unit of each external card to convert each port rate into a bus rate.
[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 rates of each external card and verifies the port rates of each external card according to the type of external card to obtain alarm information, and transmits the cleaned port rates 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, verifying the cleaned port rate and generating alarm information, and then reporting the cleaned port rate and alarm information to the data display module.
[0033] As mentioned above, the hardware acquisition module can store the port rates of each external card in its own hardware register as a rate set. Therefore, the data processing module can read the rate set from the hardware register and parse the port rate of the external card from the set.
[0034] In one implementation, transmitting the port rates of each external card to the data processing module may include: Step 41: The data processing module reads the rate set from the hardware registers; 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 it can also detect whether the hardware register has been updated, and immediately read the latest rate set from the hardware register when it is determined that the hardware register has been updated.
[0036] In one implementation, the data processing module may read a rate set from a hardware register, which may include: Step 51: The data processing module detects whether the hardware registers have been updated, and when it is determined that the hardware registers have been updated, it reads the rate set from the hardware registers.
[0037] Furthermore, for data cleaning, the data processing module can perform deduplication on port rates, for example, by generating a hash value for the acquired port rates and filtering for duplicate values based on the hash value. Additionally, the data processing module can perform timestamp alignment on the port rates to clearly define the acquisition timestamp and facilitate the display module's presentation of the port rates.
[0038] Based on this, the data processing module performs a cleaning process on the port speeds of each external card, which may include: Step 61: Deduplicate the port speeds and align the port speeds with timestamps.
[0039] Furthermore, for data verification, the data processing module can verify the port rate of each external card port using corresponding data verification methods 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 the port rate acquisition is abnormal. Therefore, in this embodiment, a corresponding port rate upper limit can be preset for each external card port. The port rate upper limit can be set according to 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 its bus interface, the above-mentioned port rate upper limit can also be based on the bus bandwidth of the bus where the external card is located. Subsequently, 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 abnormal port rate acquisition is generated.
[0040] In one implementation, verifying the port rate of each external card according to its type to obtain alarm information may include: Step 71: The data processing module queries the preset port speed limit of each external card and determines whether the port speed is greater than the preset port speed limit; the preset port speed limit is set according to the port bandwidth of the external card port and / or the bus bandwidth of the external card. Step 72: If the value is greater than the specified value, generate an alarm message indicating an abnormality in the port rate acquisition.
[0041] For example, a significant increase or decrease in port speed within a short period usually indicates abnormal fluctuations in port speed. Therefore, the data processing module can determine the change in the current port speed compared to historical port speeds and check if the change exceeds a preset threshold. If it does, an alarm message indicating abnormal port speed fluctuations is generated. This preset threshold is specifically set for external cards, and different external cards have different preset thresholds.
[0042] In another implementation, the alarm information is obtained by verifying the port rate of each external card according to the external card type, which may include: Step 81: The data processing module determines the change in the current port rate compared to the historical port rate, and judges whether the change is greater than a preset threshold. Step 82: If the value is greater than the specified value, generate an alarm message indicating abnormal port rate fluctuation.
[0043] For example, if port rates are missing at multiple consecutive time points, it indicates an anomaly in 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 timestamps. If a missing port rate is found, an alarm message indicating an anomaly in port rate sampling is generated.
[0044] In another implementation, the alarm information is obtained by verifying the port rate of each external card according to the external card type, which 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 so, generate an alarm message indicating an abnormal port rate sampling.
[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 the external card being offline, or the data packets transmitted by the external card having a cyclic redundancy check error (CRC error)). The hardware acquisition module can collect the abnormal information of the external card and transmit the abnormal information to the data processing module; the data processing module then generates alarm information based on the abnormal information.
[0046] In one embodiment, the method may further include: Step 1001: The hardware acquisition module collects the 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 anomaly information.
[0047] Furthermore, in addition to generating the aforementioned alarm information, the data processing module can also execute corresponding exception handling actions based on the type of alarm information. Please refer to the table below, which shows the detection conditions, exception handling actions, and alarm levels corresponding to various alarm information.
[0048] Table 1 Types of Abnormal Alarms
[0049] The baseline value refers to the preset port speed limit.
[0050] Furthermore, after completing data cleaning and verification, the data processing module can transmit the cleaned port rates and alarm information to the data display module. When the data processing module and data display module are located in the storage system and user terminal respectively, the data display module can provide a data cache. The data processing module can send port rates and alarm information to this data cache via the network, allowing the data display module to retrieve the latest port rates and alarm information from the cache. Further, to improve network transmission speed, the data processing module compresses the cleaned port rates and alarm information and sends the compressed data to the data display module. This embodiment does not limit the specific compression method; for example, Protocol Buffers can be used to compress the cleaned port rates and alarm information into binary format, where Protocol Buffers is a data compression format.
[0051] In one implementation, 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 rates and alarm information into 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 via a network socket; Step 1103: The data display module reads the port rate and alarm information from the data cache.
[0052] S103 The data display module outputs the port rates and alarm information of each external card to the visualization interface.
[0053] In this embodiment, the data display module is responsible for outputting the port rates and alarm information of each external card to the visualization interface.
[0054] For the port rate of the external card, the data display module aggregates the port rates from multiple data collection points, such as by hourly, daily, weekly, or monthly granularity. Subsequently, the data display module renders the aggregated port rates into a visual chart corresponding to the external card and its port, and outputs the chart to the visualization interface. This embodiment is not limited to a specific visual chart; for example, it can be a speed dashboard, a circular progress bar, a health status matrix, or a real-time rate curve.
[0055] For alarm information, the data display module adds alarm information level identifiers 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 identifiers in a hierarchical manner.
[0056] In one implementation, the data display module outputs 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 times and renders them into a visual chart corresponding to the external card and the port of the external card, and outputs the visual chart to the visualization interface; Step 1202: Add alarm information level identifiers to alarm information and output the alarm information and alarm information level identifiers to the visualization interface.
[0057] Based on the above embodiments, 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. The hardware acquisition module can uniformly acquire the port rates of at least two types of external cards to monitor port rates at the hardware level, and can transmit the port rates of each external card to the data processing module. The data processing module can clean the port rates of each external card to correct data acquisition anomalies, and can also perform targeted verification processing on the port rates of each external card according to the external card type to obtain alarm information, and can transmit the cleaned port rates and alarm information to the data display module. The data display module can output the port rates and alarm information of each external card to a visualization interface. In this way, the present invention can perform layered processing of external card rate acquisition, cleaning and verification, and visualization, which not only enables unified monitoring of external card rates but also effectively ensures the reliability of monitoring.
[0058] Based on the above embodiments, the following provides a complete description of the external card port rate monitoring method. This system adopts a layered acquisition architecture, designing dedicated acquisition devices for different types of external storage cards, and transmitting data through a unified data bus. The overall architecture consists of three layers: Hardware acquisition layer (SC module): interacts directly with hardware devices and obtains raw external card port transmission rate data through device drivers or dedicated protocols; Data processing layer (PE module): Cleans, transforms and initially aggregates the raw 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).
[0059] The specific process is as follows: 1. The GUI web configuration sends a monitoring request for the external card port transmission rate, and the storage system triggers monitoring feedback: Please refer to Figure 4 , Figure 4This is a schematic diagram illustrating the monitoring request interaction provided in this embodiment of the invention. By accessing the device view interface provided by the GUI WEB client, and setting up a request to monitor the external card transmission rate to the storage system (server) via the GUI WEB client, the storage system calls the PE module interface to query the transmission rate information of all external cards and returns the current transmission rate data of each external card port to the storage system. The storage system caches the external card transmission rate information in the external card transmission rate register Scache on the GUI WEB client. The WEB page WebSocket pushes the information based on the current external card transmission rate register Scache data, pulling the latest events from the database every second to achieve zero-latency refresh, and displays it as an external card port transmission rate information view (ECharts), including a real-time monitoring panel, a statistical analysis view, and an alarm management interface. The external card port transmission rate register Scache continuously retains the external card port transmission rate information. When the transmission rate information of a certain 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 the upper-layer module. When the GUI web page makes the next request, the change information of the external card port transmission rate register Scache 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.
[0060] 2. Creation of task for real-time monitoring of transmission rate of SC module external card: In the storage system, the PE module sends external card transfer rate query commands to the SC module, which then adds real-time cyclic monitoring of the external card port transfer rates. 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 each external card protocol. Designed for compatibility with multiple external card port types, it reads the port transfer rates of NVMe expansion cards, FC cards, SAS cards, network cards, etc., using different vendor-specific commands (such as SCSI LogSense), and maps them to standard PCIe rate encoding. Simultaneously, the SC module performs logical conversion on the port rate data for different cards. During the external card port rate reading process, the SC module monitoring system directly acquires the real-time operating rate of the physical ports of each type of external card, classifies and collects data according to the external card type, and groups the data according to the number of physical ports on the external card. When generating ` / data / HBA_speed`, the PE module retrieves the external card port transmission rate information from the SC module's hardware registers and writes it to `HBA_speed`. Simultaneously, it performs data deduplication and verification, and timestamp calibration. For example, it generates MD5 hash values for the acquired data, filters duplicate events, and uses the NTP protocol to calibrate the time of each node, ensuring an error of less than 1 millisecond. Furthermore, the PE module performs array analysis on the acquired external card transmission rate data, forming a binary array list in `HBA_speed` for adjustment and management by the GUI web interface.
[0061] 3. Implementation of monitoring efficiency optimization strategies: The sampling frequency is dynamically adjusted according to the system load. A default sampling interval is preset for each type of external card. Sampling is performed according to the basic sampling interval. High or low load settings can also be set to delay and shorten the sampling interval, so as to avoid the monitoring itself becoming a system bottleneck. It can provide timely feedback on the transmission rate information of external cards. At the same time, it can achieve efficient data transmission and processing. Protocol Buffers are used to define a compact data structure to convert the external card port rate data object into binary format, reducing network transmission overhead.
[0062] 4. PE anomaly handling: 1) Data validation rules: A rigorous multi-level defense mechanism is implemented at the data processing layer for data verification: A counter monotonicity check is performed to ensure the new counter value is not less than the previous value (allowing for recounting after device reset), ensuring data continuity. When a decrease in the current value is detected, it is determined whether the decrease exceeds 10% of the previous value. A mapping table between external card types and theoretical maximum speeds is established to verify that the speed value does not exceed the theoretical hardware limit (e.g., NVMe cards do not exceed the PCIe bus bandwidth). A threshold check is performed on the measured speed: exceeding the theoretical limit by 105% is considered abnormal. Simultaneously, a continuity check is performed, using a state machine to track the number of consecutive sampling failures. A configurable threshold is set (default 3 times, configurable in the GUI WEB interface). Three consecutive sampling failures trigger a device anomaly alarm.
[0063] 2) Fail-safe calculation: Anomaly capture is implemented through a wrapper function (safe_calculate), capturing specific anomalies such as external card offline and counter reset. Simultaneously, in the external card status management, the external card status is marked and logged when the external card is offline. When the counter is reset, the baseline is automatically re-established. For unknown abnormal data, detailed error logs are recorded and a null value is returned. The alarm handling process is as follows: Figure 5 As shown, Figure 5 This is a schematic diagram of an alarm processing flow provided by an embodiment of the present invention, which can perform different alarm operations according to different alarm levels.
[0064] 5. Front-end GUI web display: 1) Real-time monitoring panel: The underlying SC module's external card port transmission rate monitoring system feeds data back to the PE module. The PE module processes and analyzes the data before feeding it back to the GUI WEB. A data matrix of transmission rate information for each slot's external card port is added to the GUI WEB interface. The external card port transmission rate data is split, and 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 a data reporting process provided in an embodiment of the present invention, wherein the data display server refers to a GUI Web. The card background color is dynamically adjusted according to the status (normal / abnormal), and the latest rate data event records are obtained every second for scrolling refresh, achieving end-to-end traceability, complete recording of status change events, and clicking on details to jump to the device history page, dynamically updating the four major components.
[0065] 2) Multi-dimensional filtering in statistical analysis views: This invention employs a time-series database and a rolling window algorithm to achieve efficient data storage and multi-dimensional statistics. It allows for linked charts, displaying data in categories such as NVMe expansion cards, FC cards, SAS cards, and network cards. After the user selects a time range (day / week / month), the front-end sends an AJAX request to retrieve data, and the back-end returns the aggregated results. The front-end dynamically renders the charts using ECharts. Daily statistics aggregate data hourly to generate a 24-hour rolling report. Weekly / monthly statistics are based on the Tumbling Window algorithm, summarizing and displaying data at fixed intervals. Interactive charts support zooming, dragging, and drill-down queries, and data export is supported. Clicking the "Export CSV" button calls the back-end to generate a temporary file and returns a download link. The main format is as follows: Speed Dashboard: Displays the current transmission rate; Circular progress bar: Displays bandwidth utilization; Health Status Matrix: Four-color indicator lights represent the status of external card ports; Real-time rate curve: Displays the trend over the most recent time period in a scrolling display.
[0066] Additionally, historical trend analysis charts are included. Data queries are generated based on time range parameters, aggregated data is retrieved via a REST API, and ECharts is used to render multi-dimensional charts to create various chart types, enabling chart linking. Chart types can include: Heatmap: Load distribution of each slot over time; Stacked area diagram: Bandwidth percentage of different card types; Box plot: Statistics on rate fluctuations; Scatter matrix: Correlation analysis of multiple indicators.
[0067] 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) and display alarm information in a hierarchical manner. Emergency alarms are flashed red with sound prompts, important alarms are highlighted in 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.
[0068] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0069] Please refer to Figure 1 , Figure 1This invention provides a structural block diagram of an external card port rate monitoring system. 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. The hardware acquisition module is used to acquire the port rates of at least two types of 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 rates of each external card, verify the port rates of each external card according to the type of external card to obtain alarm information, and transmit the cleaned port rates and alarm information to the data display module. The data display module is used to output the port rates and alarm information of each external card to the visualization interface.
[0070] Optionally, the hardware acquisition module is also used for: Perform bus enumeration on external cards to determine the external card type and port identifier of each external card port; Based on the external card type and port identifier, a port rate acquisition command is sent to each external card 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.
[0071] Optionally, the data processing module is also used for: The data processing module reads the rate set from the hardware registers; The set of parsed rates is used to obtain the port rates of each external card.
[0072] Optionally, the hardware acquisition module is also used for: By utilizing the numerical conversion relationship between the port rate units and bus rate units of each external card, the port rates are converted into bus rates.
[0073] Optionally, the hardware acquisition module is also used for: Overwrite the historical rate set in the hardware registers with the current rate set; The data processing module is also used for: Detect whether the hardware registers have been updated, and if it is determined that the hardware registers have been updated, read the rate set from the hardware registers.
[0074] Optionally, the data processing module is also used for: The port speeds are deduplicated and timestamped.
[0075] Optionally, the data processing module is also used for: Query the preset port speed limit of each external card and determine whether the port speed is greater than the preset port speed limit; the preset port speed limit is set according to the port bandwidth of the external card port and / or the bus bandwidth of the external card. If the value is greater than 1, an alarm message indicating an abnormality in port rate acquisition will be generated. And / or, determine the change in the current port rate compared to the historical port rate, and determine whether the change is greater than a preset threshold; If the value is greater than 1, an alarm message indicating abnormal port rate fluctuation will be generated. And / or, based on the timestamp of the port rate, determine whether the port rate is missing in at least two consecutive time points; If so, an alarm message indicating an abnormal port rate sampling will be generated.
[0076] Optionally, the hardware acquisition module is also used for: Collect abnormal information from external cards and transmit the abnormal information to the data processing module; The data processing module is also used for: Alarm information is generated based on the abnormal information.
[0077] The data processing module is also used for: Compress the cleaned port rates and alarm information into binary format; The compressed port rate and alarm information are sent to the data cache of the data display module via a network socket; The data display module is also used for: Read port rates and alarm information from the data cache.
[0078] Optionally, the data display module is also used for: The port rates at multiple acquisition times are aggregated and rendered into a visual chart corresponding to the external card and port of the external card to which the port rate belongs, and the visual chart is output to the visualization interface. Add alarm information level identifiers to alarm information and output the alarm information and alarm information level identifiers to the visualization interface.
[0079] For a description of the features in the embodiment of the external card port rate monitoring system, please refer to the relevant description of the embodiment of the external card port rate monitoring method, which will not be repeated here.
[0080] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above embodiments of the external card port rate monitoring method when running.
[0081] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0082] Embodiments of the present invention also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above embodiments of the external card port rate monitoring method.
[0083] Embodiments of the present invention also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above embodiments of the external card port rate monitoring method.
[0084] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0085] The present invention has provided a detailed description of an external card port rate monitoring method and system. Specific examples have been used to illustrate the principles and implementation methods of the invention. The descriptions of these embodiments are merely illustrative of the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to the invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the present invention.
Claims
1. A method for monitoring the port speed of an external card, characterized in that, An external card port rate monitoring system is applied, comprising 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 data display module is located at the user end. The hardware acquisition module, data processing module, and external card are all located in a storage system. The hardware acquisition module is a hardware module. The method includes: The hardware acquisition module acquires the port rates of at least two types of external cards and transmits the port rates of each external card to the data processing module; wherein, the external cards transmit data with external devices through their ports; the hardware acquisition module acquires the port rates of the external cards according to a basic sampling interval and adjusts the sampling frequency according to the system load; The data processing module cleans the port rates of each external card and verifies the port rates of each external card according to the type of external card to obtain alarm information, and then transmits the cleaned port rates and alarm information to the data display module. The data display module outputs the port rates and alarm information of each external card to the visualization interface; The hardware acquisition module acquires the port rates of at least two types of external cards, including: The hardware acquisition module performs bus enumeration on the external cards to determine the external card type and port identifier of each external card port; Based on the external card type and the port identifier, a corresponding port rate acquisition command is generated and sent to each external card to obtain the port rate of each external card port; wherein, the port rate acquisition command can be set according to the type and manufacturer of each external card; The currently collected port rates are integrated into a rate set according to the external card and the external card port, and the current rate set is used to overwrite the historical rate set in the PCIe register of the hardware acquisition module; wherein, the offset value of the PCIe register is set in the expansion capability register area, and the expansion capability register area is customized by the manufacturer; Transmitting the port rates of each external card to the data processing module includes: The data processing module detects whether the PCIe register has been updated, and when it determines that the PCIe register has been updated, reads the rate set from the PCIe register; The port rates of each external card are obtained by parsing the rate set. Based on the type of external card, the port speed of each external card is verified to obtain alarm information, including: 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. If the value is greater than 1, an alarm message indicating an abnormality in port rate acquisition will be generated. And / or, the data processing module determines the change in the current port rate compared to the historical port rate, and determines whether the change is greater than a preset threshold; wherein, different external cards correspond to different preset thresholds; If the value is greater than 1, an alarm message indicating abnormal port rate fluctuation will be generated. And / or, 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; If so, generate an alarm message indicating an abnormal port rate sampling. The data processing module performs corresponding exception handling actions based on the type of alarm information. 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 binary format; The data processing module sends the compressed port rate and alarm information to the data cache of the data display module via a network socket; wherein, the data cache retains the port rate; when the port rate changes, the data processing module sends the port rate to the data cache; The data display module reads the port rate and the alarm information from the data cache; the hardware acquisition module uses the numerical conversion relationship between the port rate unit and the bus rate unit of each external card to convert each port rate into a bus rate; wherein, the port rate units of different external card ports are different. The data processing module performs a cleaning process on the port rates of each external card, including: The data processing module generates a hash value for the acquired port rate, filters duplicate values based on the hash value, and aligns the port rate with a timestamp. The hardware acquisition module collects the abnormal information of the external card and transmits the abnormal information to the data processing module; The data processing module generates alarm information based on the anomaly information; The data display module outputs the port rate and the alarm information to a visualization interface, including: The data display module aggregates the port rates at multiple acquisition times and renders them into a visual chart corresponding to the external card and the external card port to which the port rate belongs, and outputs the visual chart to the 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.
2. An external card port rate monitoring system, characterized in that, It includes a hardware acquisition module, a data processing module, and a data display module. The hardware acquisition module is connected to an external card and the data processing module. The data processing module is connected to the data display module. The data display module is located at the user end. The hardware acquisition module, the data processing module, and the external card are all located in the storage system. The hardware acquisition module is a hardware module. The hardware acquisition module is used to acquire the port rates of at least two types of external cards and transmit the port rates of each external card to the data processing module; wherein, the external cards transmit data with external devices through the external card ports; the hardware acquisition module acquires the port rates of the external cards according to a basic sampling interval and adjusts the sampling frequency according to the system load; The data processing module is used to clean the port rates of each external card, and to verify the port rates of each external card according to the type of the external card to obtain alarm information, and then transmit the cleaned port rates 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 visualization interface; The hardware acquisition module is further configured to enumerate the external cards, determine the external card type and port identifier of each external card port; generate corresponding port rate acquisition commands based on the external card type and port identifier, and send the port rate acquisition commands to each external card to obtain the port rate of each external card port; wherein, the port rate acquisition commands can be set according to the type and manufacturer of each external card; integrate the currently acquired port rates into a rate set according to the external card and external card port, and use the current rate set to overwrite the historical rate set in the PCIe register of the hardware acquisition module; wherein, the offset value of the PCIe register is set in the expansion capability register area, and the expansion capability register area is customized by the manufacturer; The data processing module is also used to detect whether the PCIe register has been updated, and when it is determined that the PCIe register has been updated, to read the rate set from the PCIe register; and to parse the rate set to obtain the port rate of each external card. The data processing module is further configured to query the preset port rate upper limit of each external card and determine 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, an alarm message indicating abnormal port rate acquisition is generated; and / or, the data processing module determines the change value of the current port rate compared to the historical port rate and determines whether the change value is greater than a preset threshold; wherein, different external cards correspond to different preset thresholds; if it is greater, an alarm message indicating abnormal port rate fluctuation is generated; and / or, 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; if so, an alarm message indicating abnormal port rate sampling is generated; and executes the corresponding abnormality handling action according to the type of alarm message; The data processing module is further configured to compress the cleaned port rate and alarm information into binary format; and send the compressed port rate and alarm information to the data cache of the data display module via a network socket; The data display module is also used to read the port rate and the alarm information from the data cache; The hardware acquisition module is also used to convert the port rate to the bus rate by utilizing the numerical conversion relationship between the port rate unit and the bus rate unit of each external card; wherein the port rate units of different external cards are different. The data processing module is also used to generate a hash value for the acquired port rate, filter duplicate values based on the hash value, and align the port rate with a timestamp. The hardware acquisition module is also used to acquire abnormal information of the external card and transmit the abnormal information to the data processing module; The data processing module is also used to generate alarm information based on the abnormal information; The data display module is also used to aggregate port rates at multiple acquisition times and render them into a visual chart corresponding to the external card and port of the external card to which the port rate belongs, and output the visual chart to the visualization interface; add alarm information level identifiers to the alarm information, and output the alarm information and the alarm information level identifiers to the visualization 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