Come ottenere una relazione dettagliata di MySQL

da Sukrit Dhandhania su 27 aprile 2009

Linux

Se utilizzate o amministrate un assistente di MySQL probabilmente conoscete che cosa un dolore esso può a volte ottenere ad una relazione adeguata che potete decifrare e capire facilmente. mysqlreport è uno scritto scritto in Perl che rende il lavoro mólto più facile per voi. Lo scritto prende l'uscita dell'ordine MOSTRI LA CONDIZIONE' in MySQL e nelle esposizioni esso in un modo ordinatamente formattato che lo rende mólto più facile sugli occhi e di conseguenza più facile calcolare fuori che cosa sta accendendo.

Diamo un'occhiata più vicina esso installandola. Utilizzerò una macchina di Linux per questa esercitazione. Sto supponendo che avete MySQL in servizio e che fate installare il Perl. Ottenga l'ultimo rilascio di mysqlreport dal Trasferimento dal sistema centrale verso i satelliti sezione sul Web site del progetto. Copy esso ad un certo posto in PERCORSO del vostro calcolatore, come /usr/bin/. Renda lo scritto eseguibile con il seguente ordine:

chmod 755 /usr/bin/mysqlreport del #

L'installazione ora è completa. Continuiamo ad uso. Daremo un'occhiata ad un certo uso di base qui. Per una lista dettagliata di che cosa potete fare con mysqlreport faccia funzionare il seguente ordine:

mysqlreport del # --aiuto

Per ottenere un rapporto del vostro assistente di MySQL faccia funzionare il seguente ordine, sostituente il hostname, il username e la parola d'accesso con le credenziali di correzione per il vostro assistente:


mysqlreport del # --dbserver ospite --dbuser dell'utente --parola d'accesso
Parola d'accesso per il dbuser dell'utente della base di dati:
MySQL 5.0.37-standard-l 50 17:19 uptime: 6 Thu il 23 apr. 12: 45: 58 2009

_ _ _________________________________________________________________ chiave
L'amplificatore ha usato 71.21M di 512.00M %Used: 13.91
Corrente 102.20M %Usage: 19.96
Scriva il colpo 99.45%
Colpo colto 99.78%

_ _ ___________________________________________________________ di domande
Totale 2.66G 607.8/s
Com_ 6.88G 1.6k/s %Total: 258.37
- Sconosciuto 5.67G 1.3k/s 212.99
DMS 1.42G 323.4/s 53.20
Colpi di QC 28.37M 6.5/s 1.06
COM_QUIT 9.56M 2.2/s 0.36
Ritardi 4 s 12.43k 0.0/s DMS di 0.00%: 0.00 Ceppo: SU
DMS 1.42G 323.4/s 53.20
PRESCELTO 1.39G 317.9/s 52.30 98.31
AGGIORNAMENTO 14.81M 3.4/s 0.56 1.04
INSERTO 7.65M 1.7/s 0.29 0.54
CANCELLAZIONE 1.41M 0.3/s 0.05 0.10
SOSTITUISCA 29.24k 0.0/s 0.00 0.00
Com_ 6.88G 1.6k/s 258.37
set_option 2.18G 497.6/s 81.87
stmt_execut 1.37G 313.6/s 51.60
stmt_prepar 1.09G 248.7/s 40.92

_ _ SELEZIONI e fascicoli il _____________________________________________________
Esplorazione 29.92M 6.8/s %SELECT: 2.15
Gamma 3.34M 0.8/s 0.24
Pieno unisca 22.95k 0.0/s 0.00
Controllo della gamma 0 0/s 0.00
Il rng completo unisce 105.53k 0.0/s 0.01
Esplorazione di specie 20.06M 4.6/s
Gamma di specie 25.60M 5.8/s
Passaggio del mrg di specie 23 0.0/s

_ _ _________________________________________________________ del nascondiglio di domanda
Uso di memoria 60.15M di 128.00M %Used: 46.99
Blocco Fragmnt 19.67%
Colpi 28.37M 6.5/s
Inserts 14.41M 3.3/s
Insrt:Prune 20.34:1 3.1/s
Hit:Insert 1.97:1

__ Table Locks _________________________________________________________
Waited 38.89k 0.0/s %Total: 0.00
Immediate 2.82G 643.8/s

__ Tables ______________________________________________________________
Open 1317 of 1536 %Cache: 85.74
Opened 36.20k 0.0/s

__ Connections _________________________________________________________
Max used 235 of 250 %Max: 94.00
Total 9.60M 2.2/s

__ Created Temp ________________________________________________________
Disk table 1.19M 0.3/s
Table 41.34M 9.4/s Size: 32.0M
File 51 0.0/s

__ Threads _____________________________________________________________
Running 2 of 152
Cached 26 of 64 %Hit: 99.93
Created 6.52k 0.0/s
Slow 0 0/s

__ Aborted _____________________________________________________________
Clients 75.29k 0.0/s
Connects 475 0.0/s

__ Bytes _______________________________________________________________
Sent 3.67G 837.6/s
Received 1.13G 258.4/s

__ InnoDB Buffer Pool __________________________________________________
Usage 1.46G of 1.46G %Used: 100.00
Read hit 97.49%
Pages
Free 0 %Total: 0.00
Data 95.00k 98.96 %Drty: 0.07
Misc 999 1.04
Latched 1 0.00
Reads 2.02G 462.0/s
From file 50.74M 11.6/s 2.51
Ahead Rnd 2211210 0.5/s
Ahead Sql 1773580 0.4/s
Writes 130.18M 29.7/s
Flushes 13.17M 3.0/s
Wait Free 0 0/s

__ InnoDB Lock _________________________________________________________
Waits 503 0.0/s
Current 0
Time acquiring
Total 845761 ms
Average 1681 ms
Max 5182 ms

__ InnoDB Data, Pages, Rows ____________________________________________
Data
Reads 76.58M 17.5/s
Writes 16.05M 3.7/s
fsync 5.67M 1.3/s
Pending
Reads 0
Writes 0
fsync 0

Pages
Created 302.89k 0.1/s
Read 189.02M 43.1/s
Written 13.17M 3.0/s

Rows
Deleted 861.14k 0.2/s
Inserted 6.58M 1.5/s
Read 2.20G 502.4/s
Updated 19.54M 4.5/s

In case you need help understanding how to read the report generated by mysqlreport the project has a fine guide to help you with that. Feel free to play around with some of the other options shown in the mysqlreport --help command output.

Related Posts:
  • How to remotely access your MySQL in a secure manner
  • How to reset a lost MySQL root password
  • How to monitor MySQL in real-time with mytop
  • How to easily install Apache, MySQL and PHP in OS X
  • Use Auslogics Disk Defrag to defragment your Windows hard drive faster
  • Get Simple Help tutorials just like this one in your email inbox every day - for free! Just enter your email address below:

    You can always opt out of this email subscription at any time.

    { 1 trackback }

    Daily Links | AndySowards.com :: Professional Web Design, Development, Programming, Hacks, Downloads, Math and being a Web 2.0 Hipster?
    04.27.09 at 5:05 pm

    { 0 comments… add one now }

    Leave a Comment

    You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>