• notice
  • Congratulations on the launch of the Sought Tech site

Method for obtaining slow log information in MySQL

Today a case was handled: The database was abnormal and the number of connections increased suddenly.
I wanted to analyze the slow log, but it was several gigabytes at a glance, and it was in a short log format, so it was relatively difficult to find that time point.So I wrote a script to extract point logs by time from the slow log.Script:

https://github.com/wubx/mysql-binlog-statistic/blob/master/bin/cutlogbytime

How to use:

Time needs to write timestamp

In this way, the log file obtained for one day is smaller and easier to analyze.And according to the file of the day, the log at a certain time of the day can be taken.

Tags

Technical otaku

Sought technology together

Related Topic

1 Comments

author

atorvastatin 20mg without preion & lt;a href="https://lipiws.top/"& gt;purchase lipitor generic& lt;/a& gt; order atorvastatin 10mg without preion

Gxvlaa

2024-03-08

Leave a Reply

+