backgroundMySQL generated a large number of slow queries at 16:23:49 on the 26th. During this period, the binlog file was refreshed very quickly (checking the slow log shows that MySQL DML concurrency is relatively high). I want to know how many minutes it takes to write a binlog file? analyze • The last modification intervals of the three binlog files are 2 minutes and 1 minute respectively method 1. Use the stat command
1. Access time: This time will be updated after reading the contents of this file once. For example, use more, cat and other commands on this file. Neither the ls nor the stat command will modify the access time of the file If the file has not been modified since it was created, the modification time = creation time; if the status of the file has not changed since it was created, the status change time = creation time; if the file has not been read since it was created, the access time = creation time. For used files, these are unlikely -------------------------------------------------------------------------------- 2. Use debugfs Get the root directory where binlog files are stored grep 'datas' /etc/fstab /dev/mapper/centos-datas /datas ext4 defaults 1 2 Get the binlog file inode number ls -i mysql-bin.016127 135529232 mysql-bin.016127 Get the file creation time
•crtime is the file creation time Notice The xfs file system does not support using debugfs to view the creation time of files grep root /etc/fstab /dev/mapper/centos-root / xfs defaults 1 1 ls -i /test1 357556 /test1 debugfs -R 'stat <357556>' /dev/mapper/centos-root debugfs 1.42.9 (28-Dec-2013) /dev/mapper/centos-root: Bad magic number in super-block while opening filesystem stat: Filesystem not open Summarize The above is the command for checking the creation time of binlog files under Linux introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Analysis of MySQL concurrency issues and solutions
>>: JS object copying (deep copy and shallow copy)
1. Upload rz to the server and decompress it rz [...
Table of contents 3 ways to deploy projects with ...
Preface Backup is the basis of disaster recovery....
Table of contents Linux environment variables and...
A: Usually stored in the client. jwt, or JSON Web...
Simple use of Vue bus Scenario description: Compo...
Since I installed the official version of IE8.0, ...
Preface In Java programming, most applications ar...
This is the installation tutorial of mysql5.7.18....
Written in front Nginx is not just a reverse prox...
Table of contents 1. Introduction 2. Rendering 3....
The most common way is to set a primary key or un...
As shown in the figure: But when viewed under IE6...
Table of contents Structural inheritance (impleme...
1. How to install? 1. [Run] -> [cmd] to open t...