Support / KnowledgeBase

 
Search the KnowledgeBase Search

Using MySQL Report on a (dv) Dedicated-Virtual Server

  • Applies to: All (dv)

  • Difficulty: Medium

  • Time needed: 60 minutes

  • Tools needed: ssh, root

 
  • Applies to: All (dv)
    • Difficulty: Medium
    • Time Needed: 60
    • Tools Required: SSH, root access

Overview

The following guide will show you how to install MySQL Report on your (dv) Dedicated-Virtual Server. This report generates a large, comprehensive report that displays values for practically every MySQL statistic available.  You can use this report to analyze specific areas of your MySQL usage patterns and uncover performance bottlenecks.
 

Requirements

This article has the following dependencies:
  • If you currently do not have your root user enabled or our Developer Tools installed, please visit the Root Access & Developer Tools section of your AccountCenter.
  • Whenever installing third-party software, please consult the official documentation. (mt) Media Temple does not support the installation and configuration of software not installed at time of service activation. Please consult our (dv) Scope of Support page for further explanation.

Instructions

  1. Log into your Dedicated-Virtual Server via SSH as the root user.
  2. Grab the MySQL Report Script:

     wget hackmysql.com/scripts/mysqlreport
  3. Now simply run the script using the following command:

    NOTE:

    Be sure to replace password123 with your MySQL admin password.

     

     perl mysqlreport --user admin --password password123
  4. You should now see results similar to:

    MySQL 5.0.45             uptime 6 1:4:11        Thu Oct 30 15:20:04 2008
    
    __ Key _________________________________________________________________
    Buffer used    33.00k of   8.00M  %Used:   0.40
      Current     943.99k            %Usage:  11.52
    Write hit       0.00%
    Read hit       91.97%
    
    __ Questions ___________________________________________________________
    Total          55.58k     0.1/s
      COM_QUIT     20.01k     0.0/s  %Total:  36.01
      QC Hits      17.82k     0.0/s           32.06
      DMS           9.33k     0.0/s           16.79
      Com_          8.67k     0.0/s           15.60
      -Unknown        254     0.0/s            0.46
    Slow 10 s           0       0/s            0.00  %DMS:   0.00  Log: OFF
    DMS             9.33k     0.0/s           16.79
      SELECT        8.46k     0.0/s           15.22         90.65
      UPDATE          664     0.0/s            1.19          7.11
      DELETE          169     0.0/s            0.30          1.81
      REPLACE          35     0.0/s            0.06          0.38
      INSERT            5     0.0/s            0.01          0.05
    Com_            8.67k     0.0/s           15.60
      set_option    2.82k     0.0/s            5.08
      admin_comma   1.16k     0.0/s            2.09
      show_variab   1.11k     0.0/s            2.00
    
    __ SELECT and Sort _____________________________________________________
    Scan            5.70k     0.0/s %SELECT:  67.35
    Range              23     0.0/s            0.27
    Full join           8     0.0/s            0.09
    Range check         0       0/s            0.00
    Full rng join       0       0/s            0.00
    Sort scan         637     0.0/s
    Sort range          3     0.0/s
    Sort mrg pass       0       0/s
    
    __ Query Cache _________________________________________________________
    Memory usage    6.31M of   8.00M  %Used:  78.90
    Block Fragmnt   0.05%
    Hits           17.82k     0.0/s
    Inserts         6.80k     0.0/s
    Insrt:Prune   6.80k:1     0.0/s
    Hit:Insert     2.62:1
    
    __ Table Locks _________________________________________________________
    Waited              0       0/s  %Total:   0.00
    Immediate      15.71k     0.0/s
    
    __ Tables ______________________________________________________________
    Open               64 of   64    %Cache: 100.00
    Opened          4.31k     0.0/s
    
    __ Connections _________________________________________________________
    Max used            4 of  100      %Max:   4.00
    Total          20.02k     0.0/s
    
    __ Created Temp ________________________________________________________
    Disk table      1.98k     0.0/s
    Table           4.74k     0.0/s    Size:  32.0M
    File                5     0.0/s
    
    __ Threads _____________________________________________________________
    Running             1 of    1
    Cached              0 of    0      %Hit:      0
    Created        20.02k     0.0/s
    Slow                0       0/s
    
    __ Aborted _____________________________________________________________
    Clients             8     0.0/s
    Connects           89     0.0/s
    
    __ Bytes _______________________________________________________________
    Sent           13.35M    25.6/s
    Received        5.45M    10.4/s
    
    __ InnoDB Buffer Pool __________________________________________________
    Usage           2.00M of   2.00M  %Used: 100.00
    Read hit       98.90%
    Pages
      Free              0            %Total:   0.00
      Data            127                     99.22 %Drty:   0.00
      Misc              1                      0.78
      Latched           0                      0.00
    Reads         257.22k     0.5/s
      From file     2.83k     0.0/s            1.10
      Ahead Rnd         0       0/s
      Ahead Sql        12     0.0/s
    Writes            486     0.0/s
    Flushes           146     0.0/s
    Wait Free           0       0/s
    
    __ InnoDB Lock _________________________________________________________
    Waits               0       0/s
    Current             0
    Time acquiring
      Total             0 ms
      Average           0 ms
      Max               0 ms
    
    __ InnoDB Data, Pages, Rows ____________________________________________
    Data
      Reads         2.84k     0.0/s
      Writes          335     0.0/s
      fsync           258     0.0/s
      Pending
        Reads           0
        Writes          0
        fsync           0
    
    Pages
      Created           1     0.0/s
      Read          2.83k     0.0/s
      Written         146     0.0/s
    
    Rows
      Deleted          15     0.0/s
      Inserted         25     0.0/s
      Read          9.92k     0.0/s
      Updated          84     0.0/s 
  5. For more information on how to read these results, please visit The Guide To Understanding mysqlreport.

 

Resources


User Comments

No visitor comments posted. Post a comment
Fields marked with an asterisk(*) are required. Comment on this article
Fill out the form below if you would like to comment on this article.
 
 
 

(code is not case-sensitive)
 
Submit
 
 

Continue