mysqlreport 安装&使用

时间:2024-10-17 23:35:20

安装包:
mysqlreport-3.5.tgz

下载地址:
http://hackmysql.com/scripts/mysqlreport-3.5.tgz

安装办法:
[root@nagios ~]# tar -xvf mysqlreport-3.5.tgz

使用办法:
[root@nagios ~]# cd mysqlreport-3.5
[root@nagios mysqlreport-3.5]# perl mysqlreport --user=root --password=123456 --socket=/tmp/mysql.sock --outfile=/tmp/mysqlreport.txt

mysqlreport --user=root --password=root123 --port=13306 --socket=/tmp/mysql.sock  --no-mycnf --flush-status --outfile=/tmp/mysql.report.txt

MySQL 5.7.26-log uptime 14 0:5:37 Thu Nov 28 13:59:02 2019

__ Key _________________________________________________________________
Buffer used 5.00k of 8.00M %Used: 0.06
Current 1.46M %Usage: 18.29
Write hit 0.00%
Read hit 97.74%

__ Questions ___________________________________________________________
Total 6.97M 5.8/s
DMS 4.64M 3.8/s %Total: 66.47
Com_ 2.17M 1.8/s 31.14
COM_QUIT 243.97k 0.2/s 3.50
-Unknown 77.05k 0.1/s 1.10
Slow 2 s 11.35k 0.0/s 0.16 %DMS: 0.24 Log:
DMS 4.64M 3.8/s 66.47
SELECT 3.65M 3.0/s 52.40 78.84
INSERT 838.86k 0.7/s 12.03 18.10
UPDATE 141.91k 0.1/s 2.03 3.06
DELETE 160 0.0/s 0.00 0.00
REPLACE 0 0/s 0.00 0.00
Com_ 2.17M 1.8/s 31.14
set_option 1.32M 1.1/s 18.89
commit 589.77k 0.5/s 8.46
show_status 242.21k 0.2/s 3.47

__ SELECT and Sort _____________________________________________________
Scan 1.56M 1.3/s %SELECT: 42.80
Range 122.15k 0.1/s 3.34
Full join 21.09k 0.0/s 0.58
Range check 0 0/s 0.00
Full rng join 0 0/s 0.00
Sort scan 950.84k 0.8/s
Sort range 443.80k 0.4/s
Sort mrg pass 1.15k 0.0/s

__ Query Cache _________________________________________________________
Memory usage 16.35k of 1.00M %Used: 1.60
Block Fragmnt 100.00%
Hits 0 0/s
Inserts 1 0.0/s
Insrt:Prune 1:1 0/s
Hit:Insert 0.00:1

__ Table Locks _________________________________________________________
Waited 0 0/s %Total: 0.00
Immediate 181.94k 0.2/s

__ Tables ______________________________________________________________
Open 1632 of 2000 %Cache: 81.60
Opened 3.47k 0.0/s

__ Connections _________________________________________________________
Max used 105 of 500 %Max: 21.00
Total 244.01k 0.2/s

__ Created Temp ________________________________________________________
Disk table 21.16k 0.0/s
Table 545.44k 0.5/s Size: 64.0M
File 1.82k 0.0/s

__ Threads _____________________________________________________________
Running 1 of 15
Cached 7 of 13 %Hit: 99.78
Created 536 0.0/s
Slow 0 0/s

__ Aborted _____________________________________________________________
Clients 85 0.0/s
Connects 2 0.0/s

__ Bytes _______________________________________________________________
Sent 16.04G 13.3k/s
Received 1.61G 1.3k/s

__ InnoDB Buffer Pool __________________________________________________
Usage 4.87G of 5.00G %Used: 97.50
Read hit 100.00%
Pages
Free 8.19k %Total: 2.50
Data 316.55k 96.61 %Drty: 0.00
Misc 2920 0.89
Latched 0.00
Reads 19.20G 15.9k/s
From file 179.07k 0.1/s 0.00
Ahead Rnd 0 0/s
Ahead Sql 0/s
Writes 98.79M 81.6/s
Flushes 1.49M 1.2/s
Wait Free 0 0/s

__ InnoDB Lock _________________________________________________________
Waits 2 0.0/s
Current 0
Time acquiring
Total 42 ms
Average 21 ms
Max 40 ms

__ InnoDB Data, Pages, Rows ____________________________________________
Data
Reads 381.11k 0.3/s
Writes 2.22M 1.8/s
fsync 1.03M 0.8/s
Pending
Reads 0
Writes 0
fsync 0

Pages
Created 55.96k 0.0/s
Read 380.90k 0.3/s
Written 1.49M 1.2/s

Rows
Deleted 12.14k 0.0/s
Inserted 79.81M 66.0/s
Read 59.38G 49.1k/s
Updated 141.49k 0.1/s