Redis slow log storage method and device, Redis slow log display method and device, equipment and medium

A storage device and slow log technology, applied in the storage field of Redis slow log, can solve the problems of inconvenient system tuning and fault investigation, limited memory space of slow log, unable to save Redis slow log completely, etc. The effect of excellent and fault investigation convenience

Pending Publication Date: 2020-06-09
GUANGZHOU HUYA TECH CO LTD
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In the process of realizing the present invention, the inventor finds that the prior art has the following defects: when the Redis slow log is stored in memory, the memory space allocated for the slow log is limited, and the Redis slow log cannot be preserved completely, nor can it be stored in memory. View slow logs offline, which brings inconvenience to view slow logs for system tuning and fault investigation

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Redis slow log storage method and device, Redis slow log display method and device, equipment and medium
  • Redis slow log storage method and device, Redis slow log display method and device, equipment and medium
  • Redis slow log storage method and device, Redis slow log display method and device, equipment and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0037] figure 1 It is a flow chart of a method for storing Redis slow logs provided by Embodiment 1 of the present invention. This embodiment is applicable to situations where Redis slow logs need to be stored persistently so that operation and maintenance personnel can perform system tuning and fault investigation. The method can be executed by a storage device of the Redis slow log, the device can be implemented by software and / or hardware, and generally can be integrated in the client.

[0038] Correspondingly, such as figure 1 As shown, the embodiment of the present invention specifically includes the following steps:

[0039] Step 110, obtain at least one slow log from the Redis storage device.

[0040] Among them, the Redis storage device can be a database storage system based on key-value key-value pairs, which can store strings, hash tables, lists, sets, and sorted sets. )Wait. Slow logs can help developers and O&M personnel locate slow operations in the system. T...

Embodiment 2

[0051] Figure 2a It is a flowchart of a method for storing Redis slow logs provided by Embodiment 2 of the present invention. On the basis of the above embodiments, this embodiment further specifies the steps of obtaining slow logs and performing format conversion on slow logs .

[0052] Correspondingly, such as Figure 2a As shown, the embodiment of the present invention specifically includes the following steps:

[0053] S210. Obtain all currently stored slow logs from the Redis storage device every preset waiting period.

[0054] Wherein, the preset waiting time may be predetermined. In a specific example, it may be stipulated that a cycle is performed every five minutes. This embodiment does not limit the specific value of the preset waiting time.

[0055] In the embodiment of the present invention, all the slow logs stored in the Redis storage device are obtained every preset waiting period, so as to further filter the slow logs.

[0056] S220. Taking the current sys...

Embodiment 3

[0074] image 3 It is a flow chart of a Redis slow log display method provided by Embodiment 3 of the present invention. This embodiment is applicable to the situation where the Redis slow log needs to be graphically displayed so that the operation and maintenance personnel can perform system tuning and fault investigation. The method can be executed by a Redis slow log display device, which can be implemented by software and / or hardware, and can generally be integrated in a server.

[0075] Correspondingly, such as image 3 As shown, the embodiment of the present invention specifically includes the following steps:

[0076] S310. Obtain the target slow log uploaded by the client through the server interface, the target slow log is obtained by the client after format conversion of the slow log obtained from the Redis storage device, and the target slow log includes at least one key value log data of the form.

[0077] In the embodiment of the present invention, the client o...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a Redis slow log storage method and device, a Redis slow log display method and device, equipment and a medium. The Redis slow log storage method comprises the steps of obtaining at least one slow log from Redis storage equipment; according to the structure of the log data in the slow logs, conducting the format conversion on the slow logs to obtain thetarget slow logs, wherein the target slow logs comprise at least one piece of log data in a key value pair form; and calling a server interface, and uploading each target slow log to a log server for storage, the stored target slow logs being used for displaying according to a slow log query request of a user. By using the technical scheme provided by the invention, the Redis slow log information can be subjected to persistent storage and graphical display, so that convenience is provided for system tuning and fault investigation.

Description

technical field [0001] Embodiments of the present invention relate to data processing technologies, and in particular to a method, device, device and medium for storing and displaying Redis slow logs. Background technique [0002] The slow log storage mechanism is a mechanism used by Redis to record requests that take too long to execute, which can help O&M personnel track and analyze problems. [0003] In the prior art, in order to improve the reading and writing efficiency of the slow log and not affect the performance of Redis, the slow log is generally stored in the memory. [0004] In the process of realizing the present invention, the inventor finds that the prior art has the following defects: when the Redis slow log is stored in memory, the memory space allocated for the slow log is limited, and the Redis slow log cannot be preserved completely, nor can it be stored in memory. Viewing slow logs offline brings inconvenience to viewing slow logs for system tuning and ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/18G06F16/172G06F16/14G06F11/34
CPCG06F16/1815G06F16/172G06F16/156G06F11/3476
Inventor 张振威
Owner GUANGZHOU HUYA TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products