Mysqlreport is a State reporting tool developed by www.hackmysql.com based on the Perl language.
It processes the output of show status and show InnoDB status to make the output information more readable. Because it is a script written in Perl, you need to install the Perl environment and then connect to the Mysql database, so you also need to install the database interface DBI and the database driver Dbd-mysql.
Installing PERL-DBI
Yum Install-y perl-dbi
Installing Mysqlreport
wget http://hackmysql.com/scripts/mysqlreport-3.5.tgztar zxvf mysqlreport-3.5.tgzcd Mysqlreport-3.5perl mysqlreport -U Root-password 12345
Install_driver (MySQL) failed:can ' t locate dbd/mysql.pm in @INC (@INC contains:/usr/lib/perl5/site_perl/5.8.8/ i386-linux-thread-multi/usr/lib/perl5/site_perl/5.8.8/usr/lib/perl5/site_perl/usr/lib/perl5/vendor_perl/5.8.8/ i386-linux-thread-multi/usr/lib/perl5/vendor_perl/5.8.8/usr/lib/perl5/vendor_perl/usr/lib/perl5/5.8.8/ i386-linux-thread-multi/usr/lib/perl5/5.8.8.) at (eval 8) Line 3.
Perhaps the Dbd::mysql Perl module hasn ' t been fully installed,
Or perhaps the capitalisation of ' MySQL ' isn ' t right.
Available drivers:dbm, Examplep, File, Proxy, Sponge.
At./mysqlreport Line 249
The above error occurs because Dbd-mysql is not installed, download installation
wget http://www.cpan.org/modules/by-module/DBD/DBD-mysql-4.020.tar.gzcd Dbd-mysql-4.020perl makefile.pl--mysql_ Config=/usr/local/mysql/bin/mysql_configmakemake Install
Add the MySQL library file path.
echo "/usr/local/mysql/lib/mysql" >>/etc/ld.so.confldconfig
Re-use Mysqlreport
Perl mysqlreport-u Root-password 12345
The script has some minor bugs and the following error message appears
Use of uninitialized value in multiplication (*) at Mysqlreport line 829.Use of uninitialized value in Formline at Mysqlre Port line 1227.Use of uninitialized value in Formline at Mysqlreport line 1235.
829 lines are modified to the following ways, no longer prompt for errors
My $is = @_;my $of = @_;return sprintf "%.2f", ($is *)/($of | | = 1);
Analyze 1227 and 1235 row errors again
1227 $stats {' innodb_buffer_pool_pages_latched '}, perc ($stats {' innodb_buffer_pool_pages_latched '}, $stats {' Innodb_ Buffer_pool_pages_total '})
1235 $stats {' Innodb_buffer_pool_read_ahead_seq '}, T ($stats {' Innodb_buffer_pool_read_ahead_seq '})
View the official MySQL brochure
Innodb_buffer_pool_pages_latched
The number of latched pages in InnoDB buffer pool. These is pages currently being read or written or that cannot is flushed or removed for some other reason. Calculation of this variable was expensive, so as of MySQL 5.1.28, it was available only if the Univ_debug system is Defin Ed at server build time.
This parameter is not provided by default after 5.1.28. Unless forced to be specified at compile time.
Innodb_buffer_pool_read_ahead_seq
The number of sequential read-aheads initiated by InnoDB
. This happens is InnoDB
does a sequential full table scan.
InnoDB Plugin
for, this variable is removed in MySQL 5.1.41.
This variable is InnoDB's storage engine plug-in, has been removed after 5.1.41, here my database is 5.5.25, so the above two errors are not very important.
Finally execute mysqlreport-u-password 12345 Look, the following is the display of partial output results
650) this.width=650; "title=" My.png "alt=" wkiom1n5mgdxzjqiaamwdbkujea273.jpg "src=" http://s3.51cto.com/wyfs02/M02/ 28/6c/wkiom1n5mgdxzjqiaamwdbkujea273.jpg "/>
This article from "Lao Xu's Private Dishes" blog, declined to reprint!