MySQL/MariaDB: mysqlreport — простая утилита вывода всей статистики

Автор: | 09/30/2014
 

mariadb_logoКроме использования запроса SHOW STATUS, который выводит информацию не упорядочено и вообще нечитаемо — можно воспользоваться утилитой mysqlreport.

Написана на Perl, домашняя страница тут>>>.

Установка:

# yum -y install mysqlreport

Или:

# wget http://hackmysql.com/scripts/mysqlreport

# chmod +x mysqlreport

Запускаем:

# ./mysqlreport | less
MySQL 5.5.39-MariaDB-lo  uptime 0 9:38:39       Sun Sep 28 19:44:26 2014

__ Key _________________________________________________________________
Buffer used   696.00k of  16.00M  %Used:   4.25
  Current       3.60M            %Usage:  22.49
Write hit       6.29%
Read hit       99.98%
...
__ SELECT and Sort _____________________________________________________
Scan            7.69k     0.2/s %SELECT:   6.97
Range          10.14k     0.3/s            9.20
Full join           0       0/s            0.00
Range check         0       0/s            0.00
Full rng join       0       0/s            0.00
Sort scan      13.40k     0.4/s
Sort range     15.55k     0.4/s
Sort mrg pass       0       0/s
...
__ Table Locks _________________________________________________________
Waited             13     0.0/s  %Total:   0.01
Immediate     131.47k     3.8/s

__ Tables ______________________________________________________________
Open               55 of   64    %Cache:  85.94
Opened             47     0.0/s

__ Connections _________________________________________________________
Max used            9 of  151      %Max:   5.96
Total           3.05k     0.1/s
...
__ InnoDB Buffer Pool __________________________________________________
Usage           7.78M of  63.98M  %Used:  12.16
Read hit       99.81%
Pages
  Free          3.60k            %Total:  87.84
  Data            482                     11.77 %Drty:   0.00
  Misc             16                      0.39
  Latched                                  0.00
Reads         250.29k     7.2/s
  From file       480     0.0/s            0.19
  Ahead Rnd         0       0/s
  Ahead Sql                 0/s
Writes          2.09k     0.1/s
Flushes           278     0.0/s
Wait Free           0       0/s