CN112437025B - Method and device for realizing cache region snapshot - Google Patents

Method and device for realizing cache region snapshot Download PDF

Info

Publication number
CN112437025B
CN112437025B CN202011295886.9A CN202011295886A CN112437025B CN 112437025 B CN112437025 B CN 112437025B CN 202011295886 A CN202011295886 A CN 202011295886A CN 112437025 B CN112437025 B CN 112437025B
Authority
CN
China
Prior art keywords
snapshot
data
internal memory
ethernet switch
synchronization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011295886.9A
Other languages
Chinese (zh)
Other versions
CN112437025A (en
Inventor
麻孝强
郭儒风
赵仕中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Centec Communications Co Ltd
Original Assignee
Suzhou Centec Communications Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Centec Communications Co Ltd filed Critical Suzhou Centec Communications Co Ltd
Priority to CN202011295886.9A priority Critical patent/CN112437025B/en
Publication of CN112437025A publication Critical patent/CN112437025A/en
Application granted granted Critical
Publication of CN112437025B publication Critical patent/CN112437025B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1673Details of memory controller using buffers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt

Abstract

The invention discloses a method and a device for realizing cache region snapshot, wherein the method comprises the following steps: recording instant data according to the path flow of the network data packet; synchronizing the instant data to an independent internal memory in real time; interrupting real-time synchronization according to the control instruction; and realizing the cache region snapshot by reading the instant data stored in the internal memory. By the method and the device for realizing the cache region snapshot, the problem that the reading of the data records in the cache region cannot be recorded in time in the prior art can be solved.

Description

Method and device for realizing cache region snapshot
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method and an apparatus for implementing a cache snapshot.
Background
An ethernet switch is a switch based on ethernet for transmitting data, and is an important device in a local area network. The current Ethernet switch is high in speed, high in throughput and slightly delayed, and can cause inaccuracy of data recording in a Buffer of the Ethernet switch, so that the effect of timely recording cannot be achieved, and monitoring and judgment on the real-time network throughput and the working and running conditions of the Ethernet switch are influenced.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is how to solve the problem that the reading of data records in a cache area cannot be recorded in time in the prior art.
In order to solve the above problems, the technical solution provided by the present invention is as follows:
a method for implementing cache region snapshot includes: recording instant data according to the path flow of the network data packet; synchronizing the instant data to an independent internal memory in real time; interrupting real-time synchronization according to the control instruction; and realizing the cache region snapshot by reading the instant data stored in the internal memory.
Preferably, in the method for implementing the cache region snapshot, the interrupting the real-time synchronization according to the control instruction includes: and issuing a snapshot instruction through Ethernet switch software, and interrupting the data synchronization of the internal memory when the instruction is successfully issued.
Preferably, in the method for implementing the cache region snapshot, the interrupting the real-time synchronization according to the control instruction includes: and triggering the internal memory data synchronization interruption when the internal preset threshold value of the Ethernet switch is reached.
Preferably, in the method for implementing the cache region snapshot, the instant data includes queue statistics and port statistics, and is used for reflecting statistics of packet receiving conditions of the ethernet switch.
Preferably, the method for implementing the cache region snapshot is applied to an ethernet switch.
In order to solve the above technical problem, the present invention further discloses a device for implementing a cache snapshot, wherein the device comprises: the recording unit is used for recording the instant data according to the path flow of the network data packet; the synchronization unit is used for synchronizing the instant data to an independent internal memory in real time; interrupting real-time synchronization according to the control instruction; and the reading unit is used for reading the instant data stored in the internal memory to realize the cache region snapshot.
Preferably, in the above apparatus for implementing a cache region snapshot, the synchronization unit interrupts data synchronization with respect to the internal memory when a snapshot instruction issued by the ethernet switch software is successfully issued.
Preferably, in the above apparatus for implementing a snapshot of a cache area, when the synchronization unit reaches a threshold preset in an ethernet switch, the processing unit triggers a data synchronization interrupt to the internal memory.
Preferably, in the apparatus for implementing a cache region snapshot, the instant data includes queue statistics and port statistics, and is used for reflecting statistics of packet receiving conditions of the ethernet switch.
Preferably, the apparatus for implementing cache snapshot is applied to an ethernet switch.
Compared with the prior art, the technical scheme of the invention has the following advantages:
the method comprises the steps of recording instant data (including data such as queue statistics and port statistics which can be used for reflecting data packet receiving conditions of Ethernet switch statistics) stored in a buffer area in the current Ethernet switch through an independent internal memory, and storing the data into the independent memory after the instant data are counted, wherein the data can be directly read by an upper layer user and can also be triggered through a threshold value. Under the condition, the current throughput and the working operation condition of the switch in the network can be timely reflected, so that an upper layer user can directly obtain the network data packet flow condition in the current link and the load condition of the Ethernet switch, the effect of timely recording can be achieved, the instantaneous state of the Ethernet switch can be reflected more timely and accurately, and the realization of network visualization is facilitated.
Drawings
Fig. 1 is a schematic flowchart of a method for implementing a cache snapshot according to embodiment 1 of the present invention;
fig. 2 is a schematic diagram of a switch Buffer synchronizing instant data to an independent memory in real time in embodiment 1 of the present invention;
FIG. 3 is a schematic diagram illustrating interruption synchronization of instant data according to a software issued instruction in embodiment 1 of the present invention;
fig. 4 is a schematic diagram of synchronizing instant data through a threshold interrupt in embodiment 1 of the present invention.
Detailed Description
In the prior art, the current ethernet switch is fast in speed, high in throughput and slightly delayed, which can cause inaccuracy of data recording in the Buffer of the ethernet switch, so that the effect of timely recording cannot be achieved, and monitoring and judgment on the real-time network throughput and the working and operating conditions of the ethernet switch are affected.
The embodiment of the invention records the instant data (including data such as queue statistics, port statistics and the like which can be used for reflecting the data receiving situation of the Ethernet switch statistics) stored in the buffer area in the current Ethernet switch through an independent internal memory, and stores the data into the independent memory after the instant data is counted, so that the data can be directly read by an upper-layer user and can also be triggered by a threshold value. Under the condition, the current throughput and the working operation condition of the switch in the network can be timely reflected, so that an upper layer user can directly obtain the network data packet flow condition in the current link and the load condition of the Ethernet switch, the effect of timely recording can be achieved, the instantaneous state of the Ethernet switch can be reflected more timely and accurately, and the realization of network visualization is facilitated.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
Example 1
As shown in fig. 1, an implementation method of a cache snapshot in this embodiment includes:
step S101, recording instant data according to a path flow of a network data packet;
in specific implementation, the instant data includes data such as queue statistics and port statistics, and is used for reflecting statistics of packet receiving conditions of the ethernet switch. When a network data packet enters the Buffer of the Ethernet switch, the data packet is recorded in the switch according to the path flow of the data packet in the switch, and the information of the instant data statistics, the working state and the network throughput of the Ethernet switch can be reflected through the records.
Step S102, synchronizing the instant data to an independent internal memory in real time;
the internal memory does not affect the statistics of Buffer in the cache area of the switch, so that the statistics of the Ethernet switch on the next network data packet is not affected, and the independent statistics of distinguishing the instant data is carried out.
As shown in fig. 2, the switch Buffer synchronizes instant data to the independent memory in real time.
Step S103, interrupting real-time synchronization according to the control instruction;
in specific implementation, the data synchronization in the independent memory can be interrupted at the moment when the command is successfully issued according to the snapshot command issued by the user through software. As shown in fig. 3, after the software issues the snapshot instruction, the data synchronization of the Buffer to the independent memory is instantaneously completed, so that the instantaneous switch Buffer data is stored in the independent memory. Due to the fact that independent statistics for distinguishing the instant data is conducted through the independent internal memory, Buffer statistics in the original switch cannot be affected, the instant flow and the data using condition of the switch can be reflected, a user can clearly know the instant data condition of the switch, and the snapshot function is completed.
In specific implementation, a preset threshold may be configured inside the switch, and when the threshold value is reached, the interruption of data synchronization is triggered, and the snapshot effect may also be completed. As shown in fig. 4, a threshold set inside the switch may be used, and when the port statistics or the queue statistics reach the threshold, the snapshot function may be triggered, so that the user takes out the snapshot statistics in the independent memory.
Step S104, implementing a cache snapshot by reading the instant data stored in the internal memory.
According to the invention, the upper-layer user can intuitively know the current use condition of the network link according to the real-time response to the data flow of the switch, the use of the independent memory does not influence the original statistics, the network visualization precision is improved, and the adoption of instant data is realized.
Example 2
The embodiment also discloses an implementation apparatus of the cache region snapshot, which includes: the recording unit is used for recording the instant data according to the path flow of the network data packet; the synchronization unit is used for synchronizing the instant data to an independent internal memory in real time; and interrupting real-time synchronization according to the control instruction; and the reading unit is used for reading the instant data stored in the internal memory to realize the cache region snapshot.
In a specific implementation, the synchronization unit interrupts data synchronization with respect to the internal memory when the instruction is successfully issued according to a snapshot instruction issued by the ethernet switch software.
In a specific implementation, when the synchronization unit reaches a threshold preset in an ethernet switch, the processing unit triggers an interrupt to synchronize the data in the internal memory.
In a specific implementation, the instant data includes queue statistics and port statistics, and is used for reflecting statistics of packet receiving conditions of the ethernet switch.
In specific implementation, the implementation apparatus of the cache region snapshot is applied to an ethernet switch.
It can be understood by those skilled in the art that the implementation apparatus of a cache region snapshot in this embodiment and the implementation apparatus of a cache region snapshot in embodiment 1 are based on the same inventive concept. Those skilled in the art can understand that the corresponding implementation of this embodiment may refer to the corresponding content of embodiment 1, and is not described herein again.
The foregoing is a detailed description of implementations of the invention, but those skilled in the art will recognize that the foregoing embodiments are exemplary and are presented for the purpose of clarity and understanding, and are not intended to limit the scope of the invention, which is intended to include all permutations, enhancements, equivalents, combinations, and improvements thereto, as would be apparent to those skilled in the art after reading the numerical description and studying the drawings.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: ROM, RAM, magnetic or optical disks, and the like.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (8)

1. A method for implementing cache region snapshot is characterized by comprising the following steps:
recording instant data according to a path flow of a network data packet, wherein the instant data comprises queue statistics and port statistics and is used for reflecting statistics of packet receiving conditions of an Ethernet switch;
synchronizing the instant data to an independent internal memory in real time;
interrupting real-time synchronization according to the control instruction;
and realizing the cache region snapshot by reading the instant data stored in the internal memory.
2. The method for implementing cache snapshot of claim 1, wherein said interrupting real-time synchronization according to the control instruction comprises:
and according to the snapshot instruction issued by the Ethernet switch software, interrupting the data synchronization of the internal memory when the instruction is issued successfully.
3. The method for implementing cache snapshot of claim 1, wherein said interrupting real-time synchronization according to the control instruction comprises:
and triggering the internal memory data synchronization interruption when the internal preset threshold value of the Ethernet switch is reached.
4. The method of claim 1, wherein the method is applied to an ethernet switch.
5. An apparatus for implementing cache snapshot, comprising:
the recording unit is used for recording instant data according to a path flow of a network data packet, wherein the instant data comprises queue statistics and port statistics and is used for reflecting statistics of packet receiving conditions of the Ethernet switch;
the synchronization unit is used for synchronizing the instant data to an independent internal memory in real time; and interrupting real-time synchronization according to the control instruction;
and the reading unit is used for reading the instant data stored in the internal memory to realize the cache region snapshot.
6. The apparatus for implementing a snapshot in a cache region according to claim 5, wherein the synchronization unit interrupts data synchronization with respect to the internal memory when a snapshot instruction issued by the ethernet switch software succeeds in issuing the snapshot instruction.
7. The apparatus for implementing cache snapshot according to claim 5, wherein the synchronization unit triggers an interruption of the synchronization of the internal memory data when a preset threshold value inside an ethernet switch is reached.
8. The apparatus for implementing cache snapshot of claim 5 applied to an Ethernet switch.
CN202011295886.9A 2020-11-18 2020-11-18 Method and device for realizing cache region snapshot Active CN112437025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011295886.9A CN112437025B (en) 2020-11-18 2020-11-18 Method and device for realizing cache region snapshot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011295886.9A CN112437025B (en) 2020-11-18 2020-11-18 Method and device for realizing cache region snapshot

Publications (2)

Publication Number Publication Date
CN112437025A CN112437025A (en) 2021-03-02
CN112437025B true CN112437025B (en) 2022-08-26

Family

ID=74694180

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011295886.9A Active CN112437025B (en) 2020-11-18 2020-11-18 Method and device for realizing cache region snapshot

Country Status (1)

Country Link
CN (1) CN112437025B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580910A (en) * 2012-08-07 2014-02-12 美国博通公司 Buffer statistics tracking
CN103678171A (en) * 2013-12-10 2014-03-26 北京京诚瑞达电气工程技术有限公司 Real-time record method and device of data curves of frequency converter
CN109240947A (en) * 2018-08-13 2019-01-18 武汉普利商用机器有限公司 Intelligent card data method of reseptance and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140086258A1 (en) * 2012-09-27 2014-03-27 Broadcom Corporation Buffer Statistics Tracking

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580910A (en) * 2012-08-07 2014-02-12 美国博通公司 Buffer statistics tracking
CN103678171A (en) * 2013-12-10 2014-03-26 北京京诚瑞达电气工程技术有限公司 Real-time record method and device of data curves of frequency converter
CN109240947A (en) * 2018-08-13 2019-01-18 武汉普利商用机器有限公司 Intelligent card data method of reseptance and device

Also Published As

Publication number Publication date
CN112437025A (en) 2021-03-02

Similar Documents

Publication Publication Date Title
CN112491652B (en) Network flow sample processing method and device for testing
CN106777126B (en) Data online migration method supporting heterogeneous time sequence database
CN102981944B (en) A kind of log storing method based on file system
CN105740326A (en) Thread state monitoring method and device for browser
CN102369514B (en) Method and system for establishing detection points
CN106919471A (en) For the method and system that snapshot is set up
CN108255890A (en) The treating method and apparatus of the page
CN108337281A (en) Calculate the method and system of page browsing duration
CN105955876A (en) Data monitoring processing method and apparatus
CN112437025B (en) Method and device for realizing cache region snapshot
CN106921665A (en) A kind of message processing method and the network equipment
CN111880993A (en) Cluster operation and maintenance state diagnosis method, operation and maintenance monitoring system, terminal and storage medium
WO2020238860A1 (en) Distributed file batch processing method and apparatus, and readable storage medium
US20030050725A1 (en) Method for reliable high-performance recording of process data with numerically controlled industrial processing machines
CN109412939B (en) Communication gateway for recording industrial network communication period process data and working method
CN102004678A (en) Operation system performance analysis method and device
JP3389920B2 (en) Disk array device and interrupt execution method for disk array device
KR101834814B1 (en) Method for saving fault wave data
EP4160421A1 (en) Method and apparatus for obtaining browser running data, and storage medium
CN108491483B (en) Method and device for remotely monitoring running state of program
KR970003139B1 (en) Full electronic switching system
WO2012109915A1 (en) Telephone traffic data storage method and system
CN106326049B (en) A kind of Fault Locating Method and terminal
CN114443585A (en) Log collection method, device, equipment and medium
CN111737097B (en) Performance test method and related device of stream processing system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 215000 unit 13 / 16, 4th floor, building B, No.5 Xinghan street, Suzhou Industrial Park, Jiangsu Province

Applicant after: Suzhou Shengke Communication Co.,Ltd.

Address before: Unit 13 / 16, floor 4, building B, No. 5, Xinghan street, Suzhou Industrial Park, Suzhou, Jiangsu Province, 215000

Applicant before: CENTEC NETWORKS (SUZHOU) Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant