memo.xight.org

日々のメモ

mysqlreport - MySQL のステータスを表示

Sample

$ ./mysqlreport --user dbuser --password dbpasswd
MySQL 4.0.24_Debian-10s  uptime 30 2:35:55      Thu Jul  6 20:08:32 2006

__ Key _________________________________________________________________
Buffer usage  644.00k of  16.00M  %Used:   3.93
Write ratio      0.31
Read ratio       0.00

__ Questions ___________________________________________________________
Total         424.72k    0.16/s
Slow                1    0.00/s  %Total:   0.00  %DMS:   0.00
DMS            79.04k    0.03/s           18.61

__ Table Locks _________________________________________________________
Waited              0    0.00/s  %Total:   0.00
Immediate      85.09k    0.03/s

__ Tables ______________________________________________________________
Open              183 of  256    %Cache:  71.48
Opened            930    0.00/s

__ Connections _________________________________________________________
Max used            6 of  100      %Max:   6.00
Total           4.12k    0.00/s

__ Created Temp ________________________________________________________
Disk table        519    0.00/s
Table             692    0.00/s
File                3    0.00/s

詳細な表示

% ./mysqlreport --user dbuser --password dbpasswd --all
MySQL 4.0.24_Debian-10s  uptime 30 2:40:16      Thu Jul  6 20:12:53 2006

__ Key _________________________________________________________________
Buffer usage  644.00k of  16.00M  %Used:   3.93
Write ratio      0.31
Read ratio       0.00

__ Questions ___________________________________________________________
Total         424.73k    0.16/s
  QC Hits     322.68k    0.12/s  %Total:  75.97
  DMS          79.04k    0.03/s           18.61
  Com_         19.02k    0.01/s            4.48
  COM_QUIT      4.01k    0.00/s            0.95
  -Unknown         23    0.00/s            0.01
Slow                1    0.00/s            0.00  %DMS:   0.00
DMS            79.04k    0.03/s           18.61
  SELECT       71.11k    0.03/s           16.74         89.97
  UPDATE        4.18k    0.00/s            0.98          5.28
  INSERT        2.67k    0.00/s            0.63          3.38
  DELETE        1.08k    0.00/s            0.25          1.37
  REPLACE           0    0.00/s            0.00          0.00
Com_           19.02k    0.01/s            4.48
  change_db    15.55k    0.01/s            3.66
  set_option    1.99k    0.00/s            0.47
  create_tabl     377    0.00/s            0.09

__ SELECT and Sort _____________________________________________________
Scan            2.55k    0.00/s %SELECT:   3.59
Range           1.32k    0.00/s            1.85
Full join          18    0.00/s            0.03
Range check         0    0.00/s            0.00
Full rng join       0    0.00/s            0.00
Sort scan       1.12k    0.00/s
Sort range      6.03k    0.00/s
Sort mrg pass       0    0.00/s

__ Query Cache _________________________________________________________
Memory usage    2.37M of  16.00M  %Used:  14.80
Block Fragmnt  20.60%
Hits          322.68k    0.12/s
Inserts        70.73k    0.03/s
Prunes              1    0.00/s
Insrt:Prune  70.73k:1    0.03/s
Hit:Insert     4.56:1

__ Table Locks _________________________________________________________
Waited              0    0.00/s  %Total:   0.00
Immediate      85.09k    0.03/s

__ Tables ______________________________________________________________
Open              183 of  256    %Cache:  71.48
Opened            930    0.00/s

__ Connections _________________________________________________________
Max used            6 of  100      %Max:   6.00
Total           4.12k    0.00/s

__ Created Temp ________________________________________________________
Disk table        519    0.00/s
Table             692    0.00/s
File                3    0.00/s

Reference

mysqlreport :: Make easy-to-read MySQL status reports
http://hackmysql.com/mysqlreport