A method and device for realizing remote data acquisition
Through the service board, data is directly pushed to the collector, and a distributed data upload mechanism is adopted to solve the problem of data collection in the frame communication device that is not real-time, and more efficient data collection and flexible data processing are achieved.
Patent Information
- Application Number
- CN202111148641.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-29
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2041-09-29
AI Technical Summary
The large number of service boards in frame communication equipment leads to high pressure on IPC, long superposition calculation time, data collection is not real-time, and packet loss and overlimit data cannot be flexibly analyzed.
The business board directly pushes data to the collector, adopts a distributed data upload mechanism, and calls the data acquisition function in the data acquisition cycle of this board through remote process calling tasks and writes it to the subscription table entry. During the remote acquisition cycle, the data is encapsulated and reported to the collector.
It improves the real-time and flexibility of data acquisition, reduces acquisition time, and reduces CPU burden. Users can flexibly process data based on business board identification and indication index.
Smart Images

Figure CN113961367B_ABST
Abstract
Description
Technical Field
[0001] This application relates to communication technologies, and particularly to a method and device for realizing remote data collection. Background Art
[0002] Telemetry is a remote data collection technology for monitoring device performance and faults. By adopting the "push mode", rich monitoring data can be obtained in a timely manner, enabling quick location of network faults, thereby solving the above-mentioned network operation and maintenance problems. According to different data reporting methods, there are multiple implementation methods for Telemetry. For the Telemetry technology using RPC (Remote Procedure Call), the device can automatically read statistical information and push it to the collector through the RPC protocol, realizing a more real-time and efficient data collection function.
[0003] In a frame communication device, the main control board notifies each service board to collect data. When the sampling period arrives, the main control board obtains the collected data from each service board, aggregates it, and sends it to the collector through an RPC protocol message. For example, when it is necessary to collect packet loss data and overlimit data of a frame device, the main control board notifies each service board to start RPC collection. Each service board traverses each service port of its own board, calls the data statistics interface function to obtain the packet loss quantity and overlimit times of each port and its queue on its own board, and then sends the obtained packet loss quantity and overlimit times of each port and its queue to other service boards through IPC (Inter-Process Communication). Each service board then performs superposition calculation on all single-board data and sends it to the main control board. The main control board sends the superimposed data to the collector through an RPC protocol message. The disadvantage of this method is that the larger the number of service boards in the frame device, the greater the pressure on IPC inside the frame device, the longer the superposition calculation time, and the real-time update efficiency of important information such as packet loss and overlimit is not timely, so the real situation cannot be reflected in real time. The user cannot distinguish the packet loss and overlimit data of each service board from the superimposed packet loss and overlimit data obtained from the collector, and cannot statistically analyze the packet loss and overlimit data based on customer requirements. The existing centralized RPC statistics in frame communication devices have a long data collection time, and the collector cannot distinguish the collected data and cannot flexibly perform statistical calculations according to requirements. Summary of the Invention
[0004] The purpose of this application is to provide a method and device for realizing remote data collection, in which the service board directly pushes the collected data to the collector to improve the real-time performance of data collection.
[0005] To achieve the above object, the present application provides a method for realizing remote data acquisition, which includes: creating a remote procedure call task for the service board of the frame communication device; when the data acquisition cycle of the board arrives, the remote procedure call task calls the data acquisition function corresponding to the subscription entry of the board to obtain the data to be written; when the data acquisition function obtains the data, the remote procedure call task writes the data obtained by the data acquisition function into the subscription entry of the board and sets the written flag; when the remote acquisition cycle arrives, the remote procedure call task calls the data reporting function corresponding to the subscription entry of the board, and the data reporting function verifies that the subscription entry of the board has been written based on the written flag of the subscription entry of the board. The data reporting function encapsulates the board identifier, the written data of each entry record of the board subscription entry, and the indication index of the written data of each entry record in the remote procedure call protocol message, and sends the remote procedure call protocol message to the collector.
[0006] To achieve the above object, the present application further provides a device for realizing remote data acquisition. The device is applied to the service board of the frame communication device. The service board includes multiple ports, a switching unit, a processor, and a memory; the underlying driver data acquisition module of the switching unit is used to perform the following operations; creating a remote procedure call task; when the data acquisition cycle of the board arrives, the remote procedure call task calls the data acquisition function corresponding to the subscription entry of the board to obtain the data to be written; when the data acquisition function obtains the data, the remote procedure call task writes the data obtained by the data acquisition function into the subscription entry of the board and sets the written flag; when the remote acquisition cycle arrives, the remote procedure call task calls the data reporting function corresponding to the subscription entry of the board, and the data reporting function verifies that the subscription entry of the board has been written based on the written flag of the subscription entry of the board. The data reporting function encapsulates the board identifier, the written data of each entry record of the board subscription entry, and the indication index of the written data of each entry record in the remote procedure call protocol message, and sends the remote procedure call protocol message to the collector.
[0007] The beneficial effect of the present application is that the service board directly pushes the collected data to the collector, improving the real-time performance of data acquisition, realizing distributed acquisition in the frame communication device, and reducing the acquisition time. And multiple groups of data can be sent in one go through the remote procedure call protocol message. Users can more freely process the collected data according to the board identifier and indication index of the remote procedure call protocol message, improving the processing flexibility of the user for the collected data of the frame communication device. Description of the Drawings
[0008] Figure 1 It is a flowchart of an embodiment of a method for realizing remote data acquisition provided by the present application;
[0009] Figure 2Flowchart of an embodiment for the service board of the present application to collect packet loss data
[0010] Figure 3 Schematic diagram of an embodiment of a device for realizing remote data collection provided by the present application Detailed implementation mode
[0011] Multiple examples shown in multiple attached drawings will be used for detailed description. In the following detailed description, multiple specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components, and circuits are not described in detail in the examples to avoid making these examples difficult to understand
[0012] Among the terms used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above", "within", and "below" include the number itself; the terms "greater than" and "less than" do not include the number itself. The term "based on" means at least based on a part of it
[0013] Figure 1 Embodiment of a method for realizing remote data collection provided by the present application. This embodiment is applied to the service board of a frame communication device and includes the following steps
[0014] Step 101, create a remote procedure call task for the service board
[0015] Step 102, when the remote procedure call task reaches the local board data acquisition cycle, call the data acquisition function corresponding to the local board subscription entry to obtain the data to be written
[0016] Step 103, when the remote procedure call task obtains the data through the data acquisition function, write the data obtained by the data acquisition function into the local board subscription entry and set the written flag
[0017] Step 104, when the remote procedure call task reaches the remote collection cycle, call the data reporting function corresponding to the local board subscription entry
[0018] Step 105, the remote procedure call task data calls the reporting function to verify that the local board subscription entry has been written based on the written flag of the local board subscription entry
[0019] Step 106, the remote procedure call task data calls the data reporting function to encapsulate the board identifier, the written data of each entry record in the local board subscription entry, and the indication index of the written data of each entry record in the remote procedure call protocol message
[0020] Step 107, send the remote procedure call protocol message to the collector
[0021] The beneficial effects of this application are as follows: The service board directly pushes the data to be collected to the collector, improving the real-time performance of data collection, achieving distributed collection in the frame communication device, and reducing the collection time. Moreover, multiple groups of data can be uploaded at once through the remote procedure call protocol message. Users can identify the collected data according to the service board identifier and indication index in the remote procedure call protocol message, and can process the collected data more freely, improving the flexibility of users to process the collected data of the frame communication device.
[0022] Figure 1 In the embodiment, the remote procedure call task of the service board can call the device status information of the service board (such as CPU and memory status); call the physical port status information (such as optical module status and port bandwidth utilization rate); port packet / queue statistical data (such as interface packet loss and error packet statistics, queue packet loss statistics, queue cache resource occupancy status); table entry / resource data of the switching chip (such as the usage of forwarding table entries, ACL flow table resources, and virtual interface resources). The service board configures the collector, configures the collection period, and configures the subscription entries. The underlying driver data acquisition module of the service board executes the remote procedure call task, calls the corresponding data collection parameters, writes the data into the corresponding subscription entries first, and then sends the written subscription entries to the collector through the remote procedure call protocol message when the collection period arrives.
[0023] Each service board of the frame device separately uploads the collected data to the collector through the distributed data upload mechanism, without centrally collecting the collected data through IPC communication within the frame communication device, reducing the CPU burden of each service board and improving the efficiency of data collection. Customers can also perform data statistics on a certain service board, several service boards, or the entire frame according to the collected data separately uploaded by each service board, and the statistical method is more flexible.
[0024] Figure 2 It is a flowchart of an embodiment for the service board of this application to collect port packet loss data;
[0025] Step 201, traverse each service module of the board;
[0026] The service board receives the remote collection period, indication index, operation actions for adding subscription entries, configured port packet loss number subscription entries, port overlimit subscription entries, port queue packet loss number subscription entries, and port queue overlimit subscription entries configured by the main control board, triggering the remote procedure call process.
[0027] The underlying driver data acquisition module of the service board starts a remote procedure call task, sets a timer according to the remote collection period. When the timer expires, the remote procedure call task of the service board calls the data reporting function of the subscribed table entry written, sends a remote procedure call protocol message to the collector, and pushes the collected data to the collector.
[0028] Therefore, before the timer expires, the data to be collected needs to be written into the above four subscribed table entries first. Therefore, the data acquisition period of this board is a time interval different from the remote collection period. When the remote procedure call task reaches the data acquisition period of this board, it starts to traverse each service module (MOD) on this board.
[0029] Step 202, traverse each port on this board;
[0030] The remote procedure call task traverses the physical ports on each switching chip on this board.
[0031] Step 203, obtain the virtual output queue identifier corresponding to the service module identifier and the port identifier;
[0032] In a frame communication device, the identifier MOD ID of each service module on the service board and the identifier Port ID of a physical port correspond to a VOQ (Virtual Output Queue) index. By traversing each service module and each physical port, the VOQ index on the service board can be obtained according to the identifier MOD ID of the service module and the physical port Port ID obtained by traversing.
[0033] Step 204, poll whether there are packet loss numbers and overlimit numbers in the multiple queues corresponding to the virtual output queue identifier; if not, execute Step 205; if so, execute Step 206;
[0034] For the multiple virtual queues (for example, 8 virtual queues) of each physical port pointed to by each VOQ index, poll the multiple virtual queues pointed to by the VOQ index to obtain whether there are packet loss numbers or overlimit numbers (the number of times exceeding the virtual queue bandwidth) in each virtual queue.
[0035] Step 205, do not set the subscribed table entry;
[0036] When there are no packet loss numbers or overlimit numbers in the multiple virtual queues pointed to by the VOQ index polled by the remote procedure call task, there is no data that needs to be written into the above four subscribed table entries, so the above four subscribed table entries are not set.
[0037] In this application, when the data to be collected is not written to each subscription entry, the write status of each subscription entry maintains its initial value. In this way, the remote procedure call task can confirm whether the data to be collected has been written to the subscription entry by verifying whether the write status of each subscription entry is set.
[0038] If the remote procedure call task determines through verification that any subscription entry has not been written, then there is no need to call the data upload parameter of that subscription entry, avoiding sending empty collected data to the collector, and avoiding the bandwidth occupied by useless remote procedure call protocol packets and the processing resources occupied by the collector.
[0039] Step 206: Write the data to the corresponding subscription entry;
[0040] When the remote procedure call task polls that one or more of the multiple virtual queues pointed to by the VOQ index have packet loss counts or overlimit counts, write the port identifier, queue identifier, and packet loss count to the port queue packet loss count subscription entry and set it; write the port identifier, queue identifier, and overlimit count to the port queue overlimit subscription entry and set it.
[0041] The remote procedure call task counts the packet loss counts of the multiple virtual queues pointed to by the VOQ index, calculates the packet loss count of the local board port corresponding to the VOQ index, and writes the port identifier and packet loss count to the port packet loss count subscription entry and sets it.
[0042] The remote procedure call task counts the packet loss counts of the multiple virtual queues pointed to by the VOQ index, calculates the packet loss count of the local board port corresponding to the VOQ index, and writes the port identifier and overlimit count to the port overlimit subscription entry and sets it.
[0043] Based on Figure 2 In the illustrated embodiment, the remote procedure call task has completed writing the collected data to the port packet loss count subscription entry, the port overlimit subscription entry, the port queue packet loss count subscription entry, and the port queue overlimit subscription entry.
[0044] When the timer of the remote collection period arrives and the packet loss count subscription entry of the remote procedure call task verification port has been set, the data reporting function corresponding to the packet loss count subscription entry of the call port is called, and the board identification of the service board, the port identification, the packet loss count, and its indication index recorded in each entry of the packet loss count subscription entry of the port are encapsulated in the remote procedure call protocol message. For example, the three entries of the packet loss count subscription entry of the port respectively record the packet loss counts of three ports. The board identification of the service board, the port identification, the packet loss count, and the indication index 1 recorded in entry 1, the port identification, the packet loss count, and the indication index 2 recorded in entry 2, and the port identification, the packet loss count, and the indication index 3 recorded in entry 3 are encapsulated in the remote procedure call protocol message. In this way, not only can multiple groups of data be sent at one time, but users can select the packet loss counts of the ports to be statistically analyzed according to statistical requirements, making subsequent data statistics more flexible.
[0045] The packet loss count subscription entry of the remote procedure call task verification port has been set. The data reporting function of the packet loss count subscription entry of the call port is called to encapsulate the board identification of the service board, the port identification, the packet loss count, and its indication index recorded in each entry of the packet loss count subscription entry of the port in the remote procedure call protocol message. For example, the two entries of the packet loss count subscription entry of the port respectively record the packet loss counts of two ports. The board identification of the service board, the port identification, the packet loss count, and the indication index 1 recorded in entry 1, and the port identification, the packet loss count, and the indication index 2 recorded in entry 2 are encapsulated in the remote procedure call protocol message.
[0046] The packet loss count subscription entry of the remote procedure call task verification queue has been set. The data reporting function corresponding to the packet loss count subscription entry of the call queue is called to encapsulate the board identification of the service board, the port identification, the queue identification, the packet loss count, and its indication index recorded in each entry in the remote procedure call protocol message. For example, the two entries of the packet loss count subscription entry of the port respectively record the packet loss counts of the virtual queues queue1 and queue8 of port1. The board identification of the service board, the port1 identification recorded in entry 1, the virtual queue identification queue1, the packet loss count indication index 1, the port1 identification recorded in entry 2, the virtual queue identification queue8, and the packet loss count indication index 2 are encapsulated in the remote procedure call protocol message.
[0047] The remote procedure call task verification queue overrun subscription entry has been set. Call the data reporting function corresponding to the queue overrun subscription entry, and encapsulate the service board identifier, the port identifier, queue identifier, overrun number and its indication index recorded in each entry in the remote procedure call protocol message. For example, two entries of the port overrun subscription entry record the overrun numbers of virtual queues queue1 and queue8 of port1. Encapsulate the service board identifier, the port1 identifier recorded in entry 1, the virtual queue identifier queue1, and the packet loss number indication index 1, and the port1 identifier, virtual queue identifier queue8, and packet loss number indication index 2 recorded in entry 2 in the remote procedure call protocol message.
[0048] This application uses the service board distributed reporting method to send the collected data to the collector. Each service board processes independently without affecting the CPU occupancy rate of the processes on the main control board; it reduces the performance bottleneck. Users can also flexibly select the statistical object and statistical direction from the collected data reported by each service board, which also improves the flexibility of data statistics for users.
[0049] Figure 3 This is a schematic diagram of the device embodiment for remote data collection provided by this application. The device 30 is applied to the service board of a frame communication device. The service board includes multiple ports, a switching unit, a processor, and a memory; the underlying driver data acquisition module of the switching unit that can act as a switching chip is used to perform the following operations;
[0050] Create a remote procedure call task; when the data acquisition cycle of the local board arrives for the remote procedure call task, call the data acquisition function corresponding to the local board subscription entry to obtain the data to be written; when the data acquisition function of the remote procedure call task obtains the data, write the data obtained by the data acquisition function into the local board subscription entry and set the written flag; when the remote collection cycle arrives for the remote procedure call task, call the data reporting function corresponding to the local board subscription entry, and the data reporting function verifies that the local board subscription entry has been written based on the written flag of the local board subscription entry. The data reporting function encapsulates the local board identifier, the written data recorded in each entry of the local board subscription entry, and the indication index of the written data of each entry in the remote procedure call protocol message, and sends the remote procedure call protocol message to the collector based on the collector network address.
[0051] When the remote procedure call task executed by the underlying driver data acquisition module does not obtain the data in the data acquisition function, it does not modify the unwritten flag of the local board subscription entry; when the remote collection cycle arrives for the remote procedure call task executed by the underlying driver data acquisition module, call the data reporting function corresponding to the local board subscription entry, and the data reporting function verifies that the local board subscription entry has not been written based on the unwritten flag of the local board subscription entry, and then waits for the next remote collection cycle.
[0052] The processor executes processor-executable instructions in the memory to perform the following operations: receiving a remote collection period configured by the main control board; receiving an indication index configured by the main control board; receiving an operation action for adding a subscription table entry configured by the main control board; receiving a local board subscription table entry configured by the main control board; and sending the remote collection period, indication index, operation action for adding a subscription table entry, and local board subscription table entry of the newly created remote procedure call task for underlying driver data synchronization.
[0053] The local board subscription table entry is a port packet loss number subscription table entry, a port overlimit subscription table entry, a port queue packet loss number subscription table entry, and a port queue overlimit subscription table entry.
[0054] The port packet loss number subscription table entry, the port overlimit subscription table entry, the port queue packet loss number subscription table entry, and the port queue overlimit subscription table entry correspond to packet loss data acquisition parameters; the remote procedure call task calls the packet loss data acquisition parameters to obtain the data to be written to perform the following operations: traversing each local board service module and each local board port; identifying a virtual output queue index based on the identifier of each local board service module and the ID of each local board port; polling whether there are packet loss numbers and overlimit numbers in the multiple queues pointed to by each identified virtual output queue index; if so, based on the packet loss numbers and overlimit numbers of the multiple queues pointed to by each identified virtual output queue index, counting the packet loss numbers and overlimit numbers of the local board ports corresponding to each identified virtual output queue index; writing the port identifier and packet loss number of the local board port corresponding to each identified virtual output queue index into the port packet loss number subscription table entry; writing the port identifier and overlimit number of the local board port corresponding to each identified virtual output queue index into the port overlimit subscription table entry; writing the port identifier, queue identifier, and packet loss number of the multiple queues pointed to by each identified virtual output queue index into the port queue packet loss number subscription table entry; and writing the port identifier, queue identifier, and overlimit number of the multiple queues pointed to by each identified virtual output queue index into the port queue overlimit subscription table entry.
[0055] The remote procedure call task invokes the data reporting function corresponding to the packet loss count subscription entry of the port, and encapsulates the board identification of the service board, the port identification, the packet loss count, and its indication index recorded in each entry of the port packet loss count subscription entry in the remote procedure call protocol message; the remote procedure call task invokes the data reporting function corresponding to the port overlimit subscription entry, and encapsulates the board identification of the service board, the port identification, the overlimit count, and its indication index recorded in each entry of the port overlimit subscription entry in the remote procedure call protocol message; the remote procedure call task invokes the data reporting function corresponding to the queue packet loss count subscription entry, and encapsulates the board identification of the service board, the port identification, the queue identification, the packet loss count, and its indication index recorded in each entry of the port packet loss count subscription entry in the remote procedure call protocol message; the remote procedure call task invokes the data reporting function corresponding to the queue overlimit subscription entry, and encapsulates the board identification of the service board, the port identification, the queue identification, the overlimit count, and its indication index recorded in each entry of the port overlimit subscription entry in the remote procedure call protocol message.
[0056] The above are only the preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for realizing remote data collection, characterized in that, The method includes: Creating a remote procedure call task for the service board of the frame communication device; When the data acquisition cycle of the board arrives, the remote procedure call task calls the data acquisition function corresponding to the board subscription entry to obtain the data to be written; When the data acquisition function obtains the data, the remote procedure call task writes the data obtained by the data acquisition function into the board subscription entry and sets the written flag; When the remote acquisition cycle arrives, the remote procedure call task calls the data reporting function corresponding to the board subscription entry, and the data reporting function verifies that the board subscription entry has been written based on the written flag of the board subscription entry. The data reporting function encapsulates the board identifier, the written data of each entry record of the board subscription entry, and the indication index of the written data of each entry record in the remote procedure call protocol message, and sends the remote procedure call protocol message to the collector.
2. The method according to claim 1, wherein The method further includes: When the data acquisition function fails to obtain the data, the remote procedure call task does not modify the unwritten flag of the board subscription entry; When the remote acquisition cycle arrives, the remote procedure call task calls the data reporting function corresponding to the board subscription entry, and the data reporting function verifies that the board subscription entry has not been written based on the unwritten flag of the board subscription entry, and then waits for the next remote acquisition cycle.
3. The method according to claim 2, wherein Creating a remote procedure call task for the service board includes: Receiving the remote acquisition cycle configured by the main control board; Receiving the indication index configured by the main control board; Receiving the operation action of adding a subscription entry configured by the main control board; Receiving the board subscription entry configured by the main control board.
4. The method according to claim 3, characterized in that The board subscription entry is a port packet loss number subscription entry, a port overlimit subscription entry, a port queue packet loss number subscription entry, and a port queue overlimit subscription entry.
5. The method according to claim 4, wherein The port packet loss number subscription entry, the port overlimit subscription entry, the port queue packet loss number subscription entry, and the port queue overlimit subscription entry correspond to packet loss data acquisition parameters; The remote procedure call task calls the packet loss data acquisition parameters to obtain the data to be written, including: Traversing each board service module and each board port; Identifying a virtual output queue index based on the identifier of each board service module and the ID of each board port; Polling whether there are packet loss numbers and overlimit numbers in the multiple queues pointed to by each identified virtual output queue index; If so, based on the packet loss numbers and overlimit numbers of the multiple queues pointed to by each identified virtual output queue index, counting the packet loss numbers and overlimit numbers of the board ports corresponding to each identified virtual output queue index; Writing the port identifier and the packet loss number of the board port corresponding to each identified virtual output queue index into the port packet loss number subscription entry; Writing the port identifier and the overlimit number of the board port corresponding to each identified virtual output queue index into the port overlimit subscription entry; Writing the port identifier, the queue identifier, and the packet loss number of the multiple queues pointed to by each identified virtual output queue index into the port queue packet loss number subscription entry; Write the port identifier, queue identifier, and overlimit number of the multiple queues pointed to by each recognized virtual output queue index into the port queue overlimit subscription entry.
6. The method according to claim 5, wherein The data reporting function encapsulates the board identifier, the written data of each entry record in the board subscription entry, and the indication index of the written data of each entry record in the remote procedure call protocol message, including: The data reporting function corresponding to the port packet loss number subscription entry encapsulates the board identifier of the service board, the port identifier and packet loss number of each entry record in the port packet loss number subscription entry, and its indication index in the remote procedure call protocol message; The data reporting function corresponding to the port overlimit subscription entry encapsulates the board identifier of the service board, the port identifier and overlimit number of each entry record in the port overlimit subscription entry, and its indication index in the remote procedure call protocol message; The data reporting function corresponding to the queue packet loss number subscription entry encapsulates the board identifier of the service board, the port identifier, queue identifier and packet loss number of each entry record in the port packet loss number subscription entry, and its indication index in the remote procedure call protocol message; The data reporting function corresponding to the queue overlimit subscription entry encapsulates the board identifier of the service board, the port identifier, queue identifier and overlimit number of each entry record in the port overlimit subscription entry, and its indication index in the remote procedure call protocol message.
7. A device for realizing remote data acquisition, characterized in that, The device application is a service board of a frame communication device. The service board includes multiple ports, a switching unit, a processor, and a memory; the underlying driver data acquisition module of the switching unit is used to perform the following operations; Create a remote procedure call task; When the data acquisition cycle of the board arrives, the remote procedure call task calls the data acquisition function corresponding to the board subscription entry to acquire the data to be written; When the data acquisition function acquires the data, the remote procedure call task writes the data acquired by the data acquisition function into the board subscription entry and sets the written flag; When the remote collection cycle arrives, the remote procedure call task calls the data reporting function corresponding to the board subscription entry, and the data reporting function verifies that the board subscription entry has been written based on the written flag of the board subscription entry. The data reporting function encapsulates the board identifier, the written data of each entry record in the board subscription entry, and the indication index of the written data of each entry record in the remote procedure call protocol message, and sends the remote procedure call protocol message to the collector.
8. The device according to claim 7, characterized in that, When the data acquisition function does not acquire the data, the remote procedure call task executed by the underlying driver data acquisition module does not modify the unwritten flag of the board subscription entry; When the remote collection cycle arrives, the remote procedure call task executed by the underlying driver data acquisition module calls the data reporting function corresponding to the board subscription entry, and the data reporting function verifies that the board subscription entry has not been written based on the unwritten flag of the board subscription entry, and then waits for the next remote collection cycle.
9. The device according to claim 8, characterized in that, The processor executes processor-executable instructions in the memory to perform the following operations; Receive the remote collection period configured by the main control board; Receive the indication index configured by the main control board; Receive the operation action of adding a subscription entry configured by the main control board; Receive the local board subscription entry configured by the main control board; Create a remote procedure call task for the underlying driver data synchronization with the remote collection period, the indication index, the operation action of adding a subscription entry configured by the main control board, and the local board subscription entry.
10. The device according to claim 9, characterized in that, The local board subscription entry is a port packet loss number subscription entry, a port overlimit subscription entry, a port queue packet loss number subscription entry, and a port queue overlimit subscription entry.
11. The device according to claim 10, characterized in that, The port packet loss number subscription entry, the port overlimit subscription entry, the port queue packet loss number subscription entry, and the port queue overlimit subscription entry correspond to packet loss data acquisition parameters; The remote procedure call task calls the packet loss data acquisition parameters to obtain the data to be written to perform the following operations: Traverse each local board service module and each local board port; Identify a virtual output queue index based on the identifier of each local board service module and the ID of each local board port; Poll whether there are packet loss numbers and overlimit numbers in the multiple queues pointed to by each identified virtual output queue index; If so, based on the packet loss numbers and overlimit numbers of the multiple queues pointed to by each identified virtual output queue index, count the packet loss numbers and overlimit numbers of the local board ports corresponding to each identified virtual output queue index; Write the port identifier and the packet loss number of the local board port corresponding to each identified virtual output queue index into the port packet loss number subscription entry; Write the port identifier and the overlimit number of the local board port corresponding to each identified virtual output queue index into the port overlimit subscription entry; Write the port identifier, the queue identifier, and the packet loss number of the multiple queues pointed to by each identified virtual output queue index into the port queue packet loss number subscription entry; Write the port identifier, the queue identifier, and the overlimit number of the multiple queues pointed to by each identified virtual output queue index into the port queue overlimit subscription entry.
12. The device according to claim 11, characterized in that, The processor executes the processor-executable instructions in the memory to execute the data reporting function to encapsulate the local board identifier, the written data of each entry record of the local board subscription entry, and the indication index of the written data of each entry record in a remote procedure call protocol message, including: The remote procedure call task calls the data reporting function corresponding to the port packet loss number subscription entry, and encapsulates the local board identifier of the service board, the port identifier and the packet loss number of each entry record of the port packet loss number subscription entry, and its indication index in the remote procedure call protocol message; The remote procedure call task calls the data reporting function corresponding to the port overlimit subscription entry, and encapsulates the local board identifier of the service board, the port identifier and the overlimit number of each entry record of the port overlimit subscription entry, and its indication index in the remote procedure call protocol message; The remote procedure call task invokes the data reporting function corresponding to the queue packet loss number subscription entry, and encapsulates the board identifier of the service board, the port identifier, queue identifier, packet loss number and its indication index recorded in each entry of the port packet loss number subscription entry in the remote procedure call protocol message; The remote procedure call task invokes the data reporting function corresponding to the queue overlimit subscription entry, and encapsulates the board identifier of the service board, the port identifier, queue identifier, overlimit number and its indication index recorded in each entry of the port overlimit subscription entry in the remote procedure call protocol message.
Citation Information
Patent Citations
Telemetry data acquisition method and device
CN111049698A
Service board configuration method and device
CN111522772A