├── .gitignore ├── .travis.yml ├── CHANGES ├── COPYING ├── Makefile ├── README.md ├── contrib └── Munin │ └── MySQL │ └── Graph │ ├── CacheEfficiency.pm │ └── Galera.pm ├── lib └── Munin │ └── MySQL │ └── Graph │ ├── InnoDB.pm │ ├── MyISAM.pm │ ├── QueryCache.pm │ ├── README │ ├── ReplicationSlave.pm │ └── Standard.pm ├── mysql ├── mysql.conf └── t ├── config.out ├── generate-test-data ├── innodb-status-5.0.68-percona-highperf-3-log.txt ├── innodb-status-5.1.30-percona-xtradb-1.0.2.txt ├── innodb-status-5.5-multiple-buffer-pools.txt ├── innodb-status-truncated.txt ├── mock ├── Cache │ └── SharedMemoryCache.pm ├── DBI.pm ├── Munin │ └── Plugin.pm └── mysql_51_data.pm ├── parse_innodb_status.t ├── regression.t └── values.out /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | local.mk 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: perl 4 | 5 | perl: 6 | - "dev" 7 | - "5.20" 8 | - "5.18" 9 | - "5.16" 10 | - "5.14" 11 | - "5.12" 12 | - "5.10" 13 | 14 | matrix: 15 | include: 16 | - addons: 17 | mariadb: 5.5 18 | perl: "5.16" 19 | - addons: 20 | mariadb: 10.0 21 | perl: "5.16" 22 | - addons: 23 | mariadb: 10.1 24 | perl: "5.16" 25 | - addons: 26 | mariadb: 5.5 27 | perl: "5.20" 28 | - addons: 29 | mariadb: 10.0 30 | perl: "5.20" 31 | - addons: 32 | mariadb: 10.1 33 | perl: "5.20" 34 | 35 | branches: 36 | only: 37 | - master 38 | 39 | before_install: 40 | - git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers 41 | - source ~/travis-perl-helpers/init 42 | - build-perl 43 | - perl -V 44 | 45 | install: 46 | - cpanm --notest -n DBI DBD::mysql Module::Pluggable Test::Exception Test::Output Test::Regression Path::Class \ 47 | || find ~/.cpanm -name build.log -exec cat "{}" ";" 48 | 49 | -------------------------------------------------------------------------------- /CHANGES: -------------------------------------------------------------------------------- 1 | 2010-02-16: version 0.3.1 2 | 3 | - Changed data source type for Opened_tables to DERIVE (again). 4 | 5 | - Don't overwrite mysql_.conf if it already exists on make install. 6 | 7 | 8 | 2010-02-02: version 0.3 9 | 10 | - Added info to a lot of data sources 11 | 12 | - Changed data source type for Opened_tables to DERIVE 13 | 14 | - Support for monitoring multiple mysql instances 15 | 16 | - Improved compatibility with MySQL 4.1 17 | 18 | - Added graphs: uptime, processlist status 19 | 20 | - Fixed issues with the munin protocol commands autoconf and suggest 21 | 22 | - Fixed the "InnoDB Buffer Pool" graph config. 23 | 24 | - Updated vlabels for consistency 25 | 26 | 27 | 2009-10-30: version 0.2 28 | 29 | - Made the plugin more fit for inclusion by the Munin project. Note 30 | that this breaks backwards compatibility since some data_sources 31 | have changed names. 32 | 33 | - Handle new "BACKGROUND THREAD" section in SHOW ENGINE INNODB STATUS. 34 | 35 | - The plugin did not work when InnoDB is disabled. 36 | 37 | - Prevented that handled DBI errors from leaking to error messages. 38 | 39 | - Added proper vlabels to the Query Cache graphs. 40 | 41 | - Added a base and lower limit to the Query Cache Memory graph. 42 | 43 | - Plugin now supports the autoconf capability 44 | 45 | - Fixed infinite loop caused by truncated InnoDB status. 46 | 47 | 48 | 2009-03-21: version 0.1.2 49 | 50 | - Improved tests 51 | 52 | - More robust InnoDB status parsing. Handle different order of the 53 | sections. Handle 64 bit integers written in hexadecimal notation. 54 | 55 | - Added autoconf capability. 56 | 57 | - More documentation 58 | 59 | - Renamed a graph: mysql_queries -> mysql_commands. This was done so 60 | that you can have the original mysql graphs side-by-side with the 61 | ones provided here. 62 | 63 | - Easier installation 64 | 65 | - Removed the 'check' configuration option -- it didn't really 66 | work very well. 67 | 68 | 69 | 2009-02-21: version 0.1.1 70 | 71 | - Fixed bug that made parsing of SHOW ENGINE INNODB STATUS enter an 72 | infinite loop 73 | 74 | - Removed dependency on Math::BigInt::GMP. Caused segfaults. 75 | 76 | - Changed drawing type LINE to LINE1 for better compability with 77 | older versions of munin/rrdtool 78 | 79 | 80 | 2009-02-13: version 0.1 81 | 82 | - Initial release 83 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | ### Configuration 2 | 3 | CONFIG_DIR:=/etc/munin 4 | PLUGIN_DIR:=/usr/local/share/munin/plugins 5 | MUNIN_NODE:=/etc/init.d/munin-node 6 | PERL_SITELIB_DIR:=$(shell perl '-V:installsitelib'|cut -d"'" -f2) 7 | 8 | # Instance numbers, space separated. Leave empty if you only want to 9 | # monitor one instance. 10 | INSTANCES:="" 11 | 12 | GRAPHS:=$(shell find lib -name '*.pm') 13 | # Uncomment the following line if you also want to install all the 14 | # contributed graphs: 15 | # GRAPHS:=$(shell find lib contrib -name '*.pm') 16 | 17 | ### Don't edit below this line 18 | 19 | -include local.mk 20 | 21 | .PHONY: all test install test_diff_ok 22 | 23 | all: 24 | @echo $(GRAPHS) 25 | 26 | install: 27 | mkdir -p $(PLUGIN_DIR) 28 | install mysql $(PLUGIN_DIR) 29 | 30 | if [ ! -e $(CONFIG_DIR)/plugin-conf.d/mysql.conf ]; then \ 31 | install -m 0644 mysql.conf $(CONFIG_DIR)/plugin-conf.d; \ 32 | fi 33 | if [ $(INSTANCES) = "" ]; then \ 34 | ln -sf $(PLUGIN_DIR)/mysql $(CONFIG_DIR)/plugins/mysql; \ 35 | else \ 36 | INSTANCES=$(INSTANCES); \ 37 | for I in $$INSTANCES; do \ 38 | ln -sf $(PLUGIN_DIR)/mysql $(CONFIG_DIR)/plugins/mysql_$${I}; \ 39 | done; \ 40 | fi 41 | 42 | install -d $(PERL_SITELIB_DIR)/Munin/MySQL/Graph 43 | install $(GRAPHS) $(PERL_SITELIB_DIR)/Munin/MySQL/Graph 44 | 45 | $(MUNIN_NODE) restart 46 | 47 | test: 48 | prove -It/mock t 49 | 50 | test_diff_ok: 51 | TEST_REGRESSION_GEN=1 prove t/regression.t 52 | 53 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Munin - MySQL 2 | ============= 3 | 4 | [![Build Status](https://travis-ci.org/kjellm/munin-mysql.png?branch=master)](https://travis-ci.org/kjellm/munin-mysql) 5 | 6 | Munin plugin for showing graphs of MySQL resource usage. 7 | 8 | 9 | Installation 10 | ------------ 11 | 12 | 1. Download zip file from Github and unzip (https://github.com/kjellm/munin-mysql/archive/master.zip) 13 | 2. Install dependencies 14 | - munin-node 15 | - Perl modules: DBI, DBD::mysql, Module::Pluggable 16 | 3. Edit Makefile 17 | 4. Edit mysql.conf 18 | 5. Run `make install' 19 | 20 | 21 | Further Information 22 | ------------------- 23 | 24 | The plugin documentation is contained in the plugin file as POD. View 25 | it with perldoc. 26 | 27 | There is a blog post with some general information and screenshots at 28 | 29 | 30 | The information on 31 | 32 | should be relevant (As these munin graphs are heavily inspired by 33 | Xaprb's cacti graphs.) 34 | 35 | ### Wiki 36 | 37 | There is a wiki at 38 | 39 | ### Source code 40 | 41 | The source is hosted at github: 42 | 43 | 44 | 45 | Troubleshooting 46 | --------------- 47 | 48 | - If you get warnings saying "Output from SHOW ENGINE INNODB STATUS 49 | was truncated" that means that a very large deadlock are causing the 50 | output to be truncated. The consequence is that data for many of the 51 | InnoDB related data sources will be missing. For solutions to this 52 | problem see 53 | http://www.xaprb.com/blog/2006/08/08/how-to-deliberately-cause-a-deadlock-in-mysql/ 54 | 55 | - You can find some tips for debugging munin plugin problems here: 56 | 57 | 58 | - Bugs should be reported to the issue tracker on github 59 | 60 | 61 | 62 | Author 63 | ------ 64 | 65 | Kjell-Magne Øierud <kjellm AT oierud DOT net> 66 | 67 | Inspired by the cacti graphs made by Xaprb 68 | http://code.google.com/p/mysql-cacti-templates/ as viewed on 69 | http://www.xaprb.com/blog/2008/05/25/screenshots-of-improved-mysql-cacti-templates/. 70 | 71 | This plugin also contains changes from the upstream munin mysql plugin. See [the list of contributors](https://github.com/munin-monitoring/munin/blob/devel/authors). 72 | 73 | -------------------------------------------------------------------------------- /contrib/Munin/MySQL/Graph/CacheEfficiency.pm: -------------------------------------------------------------------------------- 1 | package Munin::MySQL::Graph::CacheEfficiency; 2 | 3 | # Author 4 | # 5 | # This one isnt in mysql-cacti-templates, show the efficiency of some 6 | # mysql caches. They're all momentary snapshots, made by having 7 | # RRDtool calculate the derive of the graphed variables, and then 8 | # dividing up those derives. This prevents the uselessness of the 9 | # variables after a couple of weeks uptime (the calculated hitrate 10 | # would be the average over the uptime of the server, which is hardly 11 | # interesting). 12 | # 13 | # The graph_order is used to work around a bug in munin regarding 14 | # cdef, see 15 | # http://sourceforge.net/mailarchive/message.php?msg_id=26897601 16 | # 17 | # * key_cache : the MyISAM key cache efficiency, straigt from the mysql manual, 18 | # talked down by some but slightly more useful now 19 | # * query_cache : the query cache efficiency 20 | # * binlog_cache: inspired by a post seen on planet mysql: 21 | # http://www.chriscalender.com/?p=154 22 | 23 | sub graphs { return { 24 | caches => { 25 | config => { 26 | global_attrs => { 27 | title => 'Cache efficiency', 28 | vlabel => '%', 29 | order => 'krd=Key_reads krrd=Key_read_requests qh=Qcache_hits cs=Com_select bcdu=Binlog_cache_disk_use bcu=Binlog_cache_use key_cache_eff qcache_eff bl_cache_eff', 30 | }, 31 | data_source_attrs => { 32 | draw => 'LINE1', 33 | type => 'GAUGE', 34 | }, 35 | }, 36 | data_sources => [ 37 | {name => 'Key_reads', graph => 'no', type => 'DERIVE', label => 'Key_reads'}, 38 | {name => 'krd', graph => 'no', label => 'krd'}, 39 | {name => 'Key_read_requests', graph => 'no', type => 'DERIVE', label => 'Key_read_requests'}, 40 | {name => 'krrd', graph => 'no', label => 'krrd'}, 41 | {name => 'key_cache_eff', label => 'Momentary key cache efficiency', 42 | update => 'no', 43 | # this should check for krrd==0 44 | cdef => '1,krd,krrd,/,-,100,*'}, 45 | {name => 'Qcache_hits', graph => 'no', type => 'DERIVE', label => 'Qcache_hits'}, 46 | {name => 'qh', graph => 'no', label => 'qh'}, 47 | {name => 'Com_select', graph => 'no', type => 'DERIVE', label => 'Com_select'}, 48 | {name => 'cs', graph => 'no', label => 'cs'}, 49 | {name => 'qcache_eff', label => 'Momentary query cache efficiency', 50 | update => 'no', 51 | info => '', 52 | cdef => 'Qcache_hits,qh,cs,+,/,100,*' 53 | }, 54 | # MySQL 5.5.9: binlog_stmt_cache_size ipv binlog_cache_size 55 | {name => 'Binlog_cache_disk_use', graph => 'no', type => 'DERIVE', label => 'Binlog_cache_disk_use'}, 56 | {name => 'bcdu', graph => 'no', label => 'bcdu'}, 57 | {name => 'Binlog_cache_use', graph => 'no', type => 'DERIVE', label => 'Binlog_cache_use'}, 58 | {name => 'bcu', graph => 'no', label => 'bcu'}, 59 | {name => 'bl_cache_eff', label => 'Momentary binlog cache efficiency', 60 | update => 'no', 61 | info => 'Tune binlog_cache_size or change replication to ROW or MIXED if problematic', 62 | cdef => '1,bcdu,bcu,/,-,100,*'}, 63 | ], 64 | }, 65 | }} 66 | 67 | 1; 68 | -------------------------------------------------------------------------------- /contrib/Munin/MySQL/Graph/Galera.pm: -------------------------------------------------------------------------------- 1 | package Munin::MySQL::Graph::Galera; 2 | 3 | # Author 4 | # 5 | # This graphs about everything I could find for galera replication, including 6 | # percona's cluster solution PXC. 7 | 8 | use warnings; 9 | use strict; 10 | 11 | use POSIX qw(floor); 12 | 13 | sub graphs { return { 14 | 15 | wsrep_cluster_size => { 16 | config => { 17 | global_attrs => { 18 | title => 'Galera cluster size', 19 | vlabel => 'Hosts', 20 | }, 21 | data_source_attrs => { 22 | draw => 'LINE1', 23 | }, 24 | }, 25 | data_sources => [ 26 | {name => 'wsrep_cluster_size', label => 'Cluster size', 27 | info => 'The number of hosts in the cluster.', 28 | type => 'GAUGE'}, 29 | ], 30 | }, 31 | 32 | #--------------------------------------------------------------------- 33 | 34 | # wsrep_cluster_status is nice to have but a string 35 | 36 | wsrep_local_state => { 37 | config => { 38 | global_attrs => { 39 | title => 'Galera node state', 40 | }, 41 | data_source_attrs => { 42 | draw => 'LINE1', 43 | }, 44 | }, 45 | data_sources => [ 46 | {name => 'wsrep_local_state', label => '1-Joining, 2-Donor, 3-Joined, 4-Synced', 47 | info => 'The state of the node in the cluster.', 48 | type => 'GAUGE'}, 49 | ], 50 | }, 51 | 52 | #--------------------------------------------------------------------- 53 | 54 | wsrep_transactions => { 55 | config => { 56 | global_attrs => { 57 | title => 'Galera transactions', 58 | }, 59 | data_source_attrs => { 60 | draw => 'LINE1', 61 | }, 62 | }, 63 | data_sources => [ 64 | {name => 'wsrep_last_committed', label => 'Committed transactions', 65 | info => '# of committed transactions.', 66 | type => 'COUNTER', 67 | min => 0}, 68 | {name => 'wsrep_local_commits', label => 'Locally Committed transactions', 69 | info => '# of locally committed transactions.', 70 | type => 'COUNTER', 71 | min => 0}, 72 | ], 73 | }, 74 | 75 | #--------------------------------------------------------------------- 76 | 77 | wsrep_writesets => { 78 | config => { 79 | global_attrs => { 80 | title => 'Galera writesets', 81 | }, 82 | data_source_attrs => { 83 | draw => 'LINE1', 84 | }, 85 | }, 86 | data_sources => [ 87 | {name => 'wsrep_replicated', label => 'Writesets sent', 88 | info => '# of writesets sent to other nodes', 89 | type => 'COUNTER', 90 | min => 0}, 91 | {name => 'wsrep_received', label => 'Writesets received', 92 | info => '# of writesets received from other nodes', 93 | cdef => 'wsrep_received,-1,*', 94 | type => 'COUNTER', 95 | min => 0}, 96 | ], 97 | }, 98 | 99 | wsrep_writesetbytes => { 100 | config => { 101 | global_attrs => { 102 | title => 'Galera writesets bytes/sec', 103 | }, 104 | data_source_attrs => { 105 | draw => 'LINE1', 106 | }, 107 | }, 108 | data_sources => [ 109 | {name => 'wsrep_replicated_bytes', label => 'Writesets bytes sent', 110 | info => '# of bytes in writesets sent to other nodes', 111 | type => 'DERIVE', 112 | min => 0}, 113 | {name => 'wsrep_received_bytes', label => 'Writesets bytes received', 114 | info => '# of bytes in writesets received from other nodes', 115 | cdef => 'wsrep_received_bytes,-1,*', 116 | type => 'DERIVE', 117 | min => 0}, 118 | ], 119 | }, 120 | wsrep_avgwritesetbytes => { 121 | config => { 122 | global_attrs => { 123 | title => 'Galera writesets average bytes', 124 | }, 125 | data_source_attrs => { 126 | draw => 'LINE1', 127 | }, 128 | }, 129 | data_sources => [ 130 | {name => 'wsrep_replicated', type => 'DERIVE', 131 | graph => 'no', 132 | min => 0}, 133 | {name => 'wsrep_received', type => 'DERIVE', 134 | graph => 'no', 135 | min => 0}, 136 | {name => 'wsrep_replicated_bytes', type => 'DERIVE', 137 | graph => 'no', 138 | min => 0}, 139 | {name => 'wsrep_received_bytes', type => 'DERIVE', 140 | graph => 'no', 141 | min => 0}, 142 | {name => 'wsrep_avgreplicated', label => 'average size of sent writeset', 143 | cdef => 'wsrep_replicated_bytes,wsrep_replicated,/'}, 144 | {name => 'wsrep_avgreceived', label => 'average size of received writeset', 145 | cdef => 'wsrep_received_bytes,wsrep_received,/'}, 146 | 147 | ], 148 | }, 149 | 150 | wsrep_errors => { 151 | config => { 152 | global_attrs => { 153 | title => 'Galera transaction problems' 154 | }, 155 | data_source_attrs => { 156 | draw => 'LINE1', 157 | }, 158 | }, 159 | data_sources => [ 160 | {name => 'wsrep_local_cert_failures', label => 'Certification failures', 161 | type => 'DERIVE', 162 | min => 0}, 163 | {name => 'wsrep_local_bf_aborts', label => 'Aborted local transactions', 164 | type => 'DERIVE', 165 | min => 0}, 166 | {name => 'wsrep_local_replays', label => 'Replays', 167 | type => 'DERIVE', 168 | min => 0}, 169 | ], 170 | }, 171 | 172 | 173 | wsrep_queue => { 174 | config => { 175 | global_attrs => { 176 | title => 'Galera queues' 177 | }, 178 | data_source_attrs => { 179 | draw => 'LINE1', 180 | }, 181 | }, 182 | data_sources => [ 183 | {name => 'wsrep_local_send_queue', label => 'Send queue length', 184 | type => 'GAUGE'}, 185 | {name => 'wsrep_local_send_queue_avg', label => 'Average send queue length', 186 | type => 'GAUGE'}, 187 | {name => 'wsrep_local_recv_queue', label => 'Receive queue length', 188 | type => 'GAUGE'}, 189 | {name => 'wsrep_local_recv_queue_avg', label => 'Average receive queue length', 190 | type => 'GAUGE'}, 191 | ], 192 | }, 193 | 194 | 195 | wsrep_flow => { 196 | config => { 197 | global_attrs => { 198 | title => 'Galera flow control', 199 | }, 200 | data_source_attrs => { 201 | draw => 'LINE1', 202 | }, 203 | }, 204 | data_sources => [ 205 | {name => 'wsrep_flow_control_paused', label => 'Time flow control was paused', 206 | type => 'GAUGE'}, 207 | {name => 'wsrep_flow_control_sent', label => 'Pause events sent', 208 | type => 'GAUGE'}, 209 | {name => 'wsrep_flow_control_recv', label => 'Pause events received', 210 | type => 'GAUGE'}, 211 | ], 212 | }, 213 | 214 | 215 | wsrep_distance => { 216 | config => { 217 | global_attrs => { 218 | title => 'Galera distance', 219 | }, 220 | data_source_attrs => { 221 | draw => 'LINE1', 222 | }, 223 | }, 224 | data_sources => [ 225 | {name => 'wsrep_cert_deps_distance', label => 'cert_deps_distance', 226 | type => 'GAUGE'}, 227 | {name => 'wsrep_commit_window', label => 'commit_window', 228 | type => 'GAUGE'}, 229 | ], 230 | }, 231 | 232 | 233 | 234 | }} 235 | 236 | 1; 237 | 238 | -------------------------------------------------------------------------------- /lib/Munin/MySQL/Graph/InnoDB.pm: -------------------------------------------------------------------------------- 1 | package Munin::MySQL::Graph::InnoDB; 2 | 3 | use warnings; 4 | use strict; 5 | 6 | sub graphs { return { 7 | innodb_bpool => { 8 | config => { 9 | global_attrs => { 10 | title => 'InnoDB Buffer Pool', 11 | vlabel => 'Pages', 12 | args => "--base 1024", 13 | }, 14 | data_source_attrs => { 15 | draw => 'LINE1', 16 | type => 'GAUGE', 17 | }, 18 | }, 19 | data_sources => [ 20 | {name => 'ib_bpool_size', label => 'Buffer pool size', 21 | draw => 'AREA', 22 | colour => 'ffd660', 23 | info => 'The total number of buffer pool pages'}, 24 | {name => 'ib_bpool_dbpages', label => 'Database pages', 25 | draw => 'AREA', 26 | colour => 'cdcfc4', 27 | info => 'The number of used buffer pool pages'}, 28 | {name => 'ib_bpool_free', label => 'Free pages', 29 | info => 'The number of unused buffer pool pages'}, 30 | {name => 'ib_bpool_modpages', label => 'Modified pages', 31 | info => 'The number of "dirty" database pages'}, 32 | {name => 'ib_bpool_oldpages', label => 'Old pages', 33 | info => 'The number of pages in the old sublist of the buffer pool'}, 34 | ], 35 | }, 36 | 37 | #--------------------------------------------------------------------- 38 | 39 | innodb_bpool_act => { 40 | config => { 41 | global_attrs => { 42 | title => 'InnoDB Buffer Pool Activity', 43 | vlabel => 'Activity per ${graph_period}', 44 | total => 'Total', 45 | }, 46 | data_source_attrs => { 47 | draw => 'LINE1', 48 | }, 49 | }, 50 | data_sources => [ 51 | {name => 'ib_bpool_read', label => 'Pages read', 52 | info => 'Pages read into the buffer pool from disk.'}, 53 | {name => 'ib_bpool_created', label => 'Pages created', 54 | info => 'Pages created in the buffer pool without reading the corresponding disk page.'}, 55 | {name => 'ib_bpool_written', label => 'Pages written', 56 | info => 'Pages written to disk from the buffer pool.'}, 57 | {name => 'ib_bpool_made_young', 58 | label => 'Made young', 59 | info => 'The number of old pages that were moved to the head of the buffer pool'}, 60 | {name => 'ib_bpool_made_not_young', 61 | label => 'Made not young', 62 | info => 'The number of pages that have remained in the old sublist without being made new.'}, 63 | ], 64 | }, 65 | 66 | 67 | #--------------------------------------------------------------------- 68 | 69 | innodb_bpool_internal_breakdown => { 70 | config => { 71 | global_attrs => { 72 | title => 'InnoDB Buffer Pool Internal breakdown', 73 | args => '--base 1024 --lower-limit 0', 74 | vlabel => 'bytes', 75 | }, 76 | data_source_attrs => { 77 | min => '0', 78 | draw => 'AREASTACK', 79 | type => 'GAUGE', 80 | }, 81 | }, 82 | data_sources => [ 83 | {name => 'ib_bpool_internal_adaptive_hash_size_const', label => 'Adaptive Hash const'}, 84 | {name => 'ib_bpool_internal_adaptive_hash_size_var', label => 'Adaptive Hash var'}, 85 | {name => 'ib_bpool_internal_page_hash_size_total', label => 'Page Hash'}, 86 | {name => 'ib_bpool_internal_dictionary_cache_size_const', label => 'Dictionary const'}, 87 | {name => 'ib_bpool_internal_dictionary_cache_size_var', label => 'Dictionary var'}, 88 | {name => 'ib_bpool_internal_file_system_size_const', label => 'Filesystem const'}, 89 | {name => 'ib_bpool_internal_file_system_size_var', label => 'Filesystem var'}, 90 | {name => 'ib_bpool_internal_lock_system_size_const', label => 'Lock system const'}, 91 | {name => 'ib_bpool_internal_lock_system_size_var', label => 'Lock system var'}, 92 | {name => 'ib_bpool_internal_recovery_system_size_const', label => 'Recovery system const'}, 93 | {name => 'ib_bpool_internal_recovery_system_size_var', label => 'Recovery system var'}, 94 | ], 95 | }, 96 | 97 | #--------------------------------------------------------------------- 98 | 99 | innodb_checkpoint_age => { 100 | config => { 101 | global_attrs => { 102 | title => 'InnoDB Checkpoint Age', 103 | vlabel => 'Bytes', 104 | args => "--base 1024 -l 0", 105 | }, 106 | data_source_attrs => { 107 | draw => 'AREA', 108 | type => 'GAUGE', 109 | }, 110 | }, 111 | data_sources => [ 112 | {name => 'innodb_log_size', label => 'InnoDB log size', 113 | colour => 'cdcfc4', 114 | info => 'The size in bytes of InnoDB log space.', 115 | value => sub { 116 | $_[0]->{innodb_log_file_size} * $_[0]->{innodb_log_files_in_group} 117 | }}, 118 | {name => 'ib_log_chkpt_age', label => 'Uncheckpointed bytes', 119 | colour => 'ffd660', 120 | info => 'The age in bytes of InnoDB checkpoint.', 121 | value => sub { 122 | exists $_[0]->{ib_log_chkpt_age} 123 | ? $_[0]->{ib_log_chkpt_age} 124 | : $_[0]->{ib_log_written} - $_[0]->{ib_log_checkpoint} 125 | }}, 126 | ], 127 | }, 128 | 129 | #--------------------------------------------------------------------- 130 | 131 | innodb_history_length => { 132 | config => { 133 | global_attrs => { 134 | title => 'InnoDB History List', 135 | vlabel => 'Transactions', 136 | }, 137 | data_source_attrs => { 138 | draw => 'LINE1', 139 | type => 'GAUGE', 140 | }, 141 | }, 142 | data_sources => [ 143 | {name => 'ib_tnx_hist', label => 'History list length', 144 | info => 'Number of unpurged transactions in undo space.'}, 145 | ], 146 | }, 147 | 148 | #--------------------------------------------------------------------- 149 | 150 | innodb_lsn => { 151 | config => { 152 | global_attrs => { 153 | title => 'InnoDB Log Sequence Number', 154 | }, 155 | data_source_attrs => { 156 | draw => 'LINE1', 157 | }, 158 | }, 159 | data_sources => [ 160 | { name => 'Innodb_lsn_current', 161 | label => 'Current', 162 | info => 'Log sequence number as shown in the LOG section of the SHOW ENGINE INNODB STATUS output.', 163 | value => sub { 164 | $_[0]->{ib_log_written} 165 | } 166 | }, 167 | { name => 'Innodb_lsn_flushed', 168 | label => 'Flushed', 169 | info => 'Flushed up to log sequence number as shown in the LOG section of the SHOW ENGINE INNODB ', 170 | value => sub { 171 | $_[0]->{ib_log_flush} 172 | }, 173 | }, 174 | { name => 'Innodb_lsn_last_checkpoint', 175 | label => 'Last checkpoint', 176 | info => 'Log sequence number last checkpoint as shown in the LOG section of the SHOW ENGINE INNODB STATUS output.', 177 | value => sub { 178 | $_[0]->{ib_log_checkpoint} 179 | }, 180 | }, 181 | ], 182 | }, 183 | 184 | 185 | #--------------------------------------------------------------------- 186 | 187 | innodb_srv_master_thread => { 188 | config => { 189 | global_attrs => { 190 | title => 'InnoDB Master Thread', 191 | }, 192 | data_source_attrs => { 193 | draw => 'AREASTACK', 194 | }, 195 | }, 196 | data_sources => [ 197 | {name => 'Innodb_master_thread_active_loops', label => 'Active Loops'}, 198 | {name => 'Innodb_master_thread_idle_loops', label => 'Idle Loops'}, 199 | {name => 'ib_srv_main_flush_loops', label => 'Flush Loop'}, 200 | {name => 'ib_srv_main_background_loops', label => 'Background Loop'}, 201 | {name => 'ib_srv_main_flushs_writes', label => 'Flushes/Writes', draw => 'LINE1'}, 202 | ], 203 | }, 204 | 205 | #--------------------------------------------------------------------- 206 | 207 | innodb_read_views => { 208 | config => { 209 | global_attrs => { 210 | title => 'InnoDB Read Views', 211 | args => '--lower-limit 0', 212 | }, 213 | data_source_attrs => { 214 | type => 'GAUGE', 215 | }, 216 | }, 217 | data_sources => [ 218 | {name => 'ib_innodb_read_views', label => 'Views'}, 219 | ], 220 | }, 221 | 222 | 223 | #--------------------------------------------------------------------- 224 | 225 | innodb_descriptors => { 226 | config => { 227 | global_attrs => { 228 | title => 'InnoDB Descriptors', 229 | args => '--lower-limit 0', 230 | }, 231 | data_source_attrs => { 232 | type => 'GAUGE', 233 | }, 234 | }, 235 | data_sources => [ 236 | {name => 'ib_innodb_descriptors', label => 'Descriptors'}, 237 | {name => 'ib_innodb_descriptors_max', label => 'Max', draw => 'AREA', colour => 'ffd660'}, 238 | ], 239 | }, 240 | 241 | #--------------------------------------------------------------------- 242 | 243 | innodb_queries => { 244 | config => { 245 | global_attrs => { 246 | title => 'InnoDB Engine Queries and Transactions', 247 | args => '--lower-limit 0', 248 | }, 249 | data_source_attrs => { 250 | type => 'GAUGE', 251 | }, 252 | }, 253 | data_sources => [ 254 | {name => 'ib_innodb_queries', label => 'Active'}, 255 | {name => 'ib_innodb_transactions_active', label => 'Transactions'}, 256 | {name => 'ib_innodb_rw_transactions_active', label => 'RW Transactions'}, 257 | {name => 'ib_innodb_ro_transactions_active', label => 'RO Transactions'}, 258 | {name => 'ib_innodb_query_queue_len', label => 'Queued'}, 259 | ], 260 | }, 261 | 262 | #--------------------------------------------------------------------- 263 | 264 | innodb_insert_buf => { 265 | config => { 266 | global_attrs => { 267 | title => 'InnoDB Insert Buffer', 268 | vlabel => 'Activity per ${graph_period}', 269 | }, 270 | data_source_attrs => { 271 | draw => 'LINE1', 272 | }, 273 | }, 274 | data_sources => [ 275 | {name => 'ib_ibuf_inserts', label => 'Merge Inserts', 276 | info => 'These values shows statistics about how many buffer operations InnoDB has done. The ratio of merges to inserts gives a good idea of how efficient the buffer is.'}, 277 | {name => 'ib_ibuf_delete', label => 'Merge Deletes'}, 278 | {name => 'ib_ibuf_merged_rec', label => 'Merged Records'}, 279 | {name => 'ib_ibuf_merges', label => 'Merges'}, 280 | {name => 'ib_ibuf_discard_inserts', label => 'Discard Inserts'}, 281 | {name => 'ib_ibuf_discard_delete', label => 'Discard Deletes'}, 282 | ], 283 | }, 284 | 285 | #--------------------------------------------------------------------- 286 | 287 | innodb_insert_buf_size => { 288 | config => { 289 | global_attrs => { 290 | title => 'InnoDB Insert Buffer Size', 291 | vlabel => 'Pages', 292 | args => "-l 0", 293 | }, 294 | data_source_attrs => { 295 | draw => 'LINE1', 296 | type => 'GAUGE', 297 | }, 298 | }, 299 | data_sources => [ 300 | {name => 'ib_ibuf_seg_size', label => 'Segment size', 301 | draw => 'AREA', 302 | colour => 'cdcfc4', 303 | info => 'Allocated size of insert buffer segment.'}, 304 | {name => 'ib_ibuf_size', label => 'Unmerged pages', 305 | colour => '0022ff', 306 | info => 'Number of pages containing unmerged records.'}, 307 | {name => 'ib_ibuf_free_len', label => 'Free pages', 308 | info => 'Number of pages which are free.'}, 309 | ], 310 | }, 311 | 312 | #--------------------------------------------------------------------- 313 | 314 | innodb_io => { 315 | config => { 316 | global_attrs => { 317 | title => 'InnoDB IO', 318 | vlabel => 'IO operations per ${graph_period}', 319 | }, 320 | data_source_attrs => { 321 | draw => 'LINE1', 322 | }, 323 | }, 324 | data_sources => [ 325 | {name => 'ib_io_read', label => 'File reads', 326 | info => 'The number of calls to the OS read function.'}, 327 | {name => 'ib_io_write', label => 'File writes', 328 | info => 'The number of calls to the OS write function.'}, 329 | {name => 'ib_io_log', label => 'Log writes', 330 | info => 'The number of calls to the OS write function that is caused by the log subsystem.'}, 331 | {name => 'ib_io_fsync', label => 'File syncs', 332 | info => 'The number of calls to the OS fsync function.'}, 333 | ], 334 | }, 335 | 336 | #--------------------------------------------------------------------- 337 | 338 | innodb_io_pend => { 339 | config => { 340 | global_attrs => { 341 | title => 'InnoDB IO Pending', 342 | vlabel => 'Pending operations', 343 | }, 344 | data_source_attrs => { 345 | draw => 'LINE1', 346 | }, 347 | }, 348 | data_sources => [ 349 | {name => 'ib_iop_log', label => 'AIO Log'}, 350 | {name => 'ib_iop_sync', label => 'AIO Sync'}, 351 | {name => 'ib_iop_flush_bpool', label => 'Buf Pool Flush'}, 352 | {name => 'ib_iop_flush_log', label => 'Log Flushes'}, 353 | {name => 'ib_iop_ibuf_aio', label => 'Insert Buf AIO Read'}, 354 | {name => 'ib_iop_aioread', label => 'Normal AIO Reads'}, 355 | {name => 'ib_iop_aiowrite', label => 'Normal AIO Writes'}, 356 | ], 357 | }, 358 | 359 | #--------------------------------------------------------------------- 360 | 361 | innodb_log => { 362 | config => { 363 | global_attrs => { 364 | title => 'InnoDB Log', 365 | vlabel => 'Log activity per ${graph_period}', 366 | }, 367 | data_source_attrs => { 368 | draw => 'LINE1', 369 | }, 370 | }, 371 | data_sources => [ 372 | {name => 'innodb_log_buffer_size', label => 'Buffer Size', 373 | type => 'GAUGE', 374 | draw => 'AREA', 375 | colour => 'fafd9e', 376 | info => 'The size in bytes of the buffer that InnoDB uses to write to the log files on disk.'}, 377 | {name => 'ib_log_flush', label => 'KB Flushed', 378 | info => 'Number of bytes flushed to the transaction log file.'}, 379 | {name => 'ib_log_written', label => 'KB Written', 380 | info => 'Number of bytes written to the transaction log buffer.'}, 381 | ], 382 | }, 383 | 384 | #--------------------------------------------------------------------- 385 | 386 | innodb_rows => { 387 | config => { 388 | global_attrs => { 389 | title => 'InnoDB Row Operations', 390 | vlabel => 'Operations per ${graph_period}', 391 | total => 'Total', 392 | }, 393 | data_source_attrs => {}, 394 | }, 395 | data_sources => [ 396 | {name => 'Innodb_rows_deleted', label => 'Deletes', 397 | info => 'The number of rows deleted from InnoDB tables.'}, 398 | {name => 'Innodb_rows_inserted', label => 'Inserts', 399 | info => 'The number of rows inserted into InnoDB tables.'}, 400 | {name => 'Innodb_rows_read', label => 'Reads', 401 | info => 'The number of rows read from InnoDB tables.'}, 402 | {name => 'Innodb_rows_updated', label => 'Updates', 403 | info => 'The number of rows updated in InnoDB tables.'}, 404 | ], 405 | }, 406 | 407 | #--------------------------------------------------------------------- 408 | 409 | innodb_semaphores => { 410 | config => { 411 | global_attrs => { 412 | title => 'InnoDB Semaphores', 413 | vlabel => 'Semaphores per ${graph_period}', 414 | }, 415 | data_source_attrs => { 416 | draw => 'LINE1', 417 | }, 418 | }, 419 | data_sources => [ 420 | {name => 'ib_spin_rounds', label => 'Spin Rounds'}, 421 | {name => 'ib_spin_waits', label => 'Spin Waits'}, 422 | {name => 'ib_os_waits', label => 'OS Waits'}, 423 | {name => 'ib_rw_shared_rounds', label => 'RW/S Rounds'}, 424 | {name => 'ib_rw_shared_waits', label => 'RW/S Waits'}, 425 | {name => 'ib_rw_shared_os_waits', label => 'RW/S OS Waits'}, 426 | {name => 'ib_rw_excl_rounds', label => 'RW/X Rounds'}, 427 | {name => 'ib_rw_excl_waits', label => 'RW/X Waits'}, 428 | {name => 'ib_rw_excl_os_waits', label => 'RW/X OS Waits'}, 429 | ], 430 | }, 431 | 432 | #--------------------------------------------------------------------- 433 | 434 | innodb_tnx => { 435 | config => { 436 | global_attrs => { 437 | title => 'InnoDB Transactions', 438 | vlabel => 'Transactions per ${graph_period}', 439 | }, 440 | data_source_attrs => { 441 | draw => 'LINE1', 442 | }, 443 | }, 444 | data_sources => [ 445 | {name => 'ib_tnx', label => 'Transactions created', 446 | info => 'Number of transactions created.'}, 447 | ], 448 | }, 449 | }} 450 | 451 | 1; 452 | 453 | -------------------------------------------------------------------------------- /lib/Munin/MySQL/Graph/MyISAM.pm: -------------------------------------------------------------------------------- 1 | package Munin::MySQL::Graph::MyISAM; 2 | 3 | use warnings; 4 | use strict; 5 | 6 | sub graphs { return { 7 | myisam_indexes => { 8 | config => { 9 | global_attrs => { 10 | title => 'MyISAM Indexes', 11 | vlabel => 'Requests per ${graph_period}', 12 | }, 13 | data_source_attrs => { 14 | draw => 'LINE1', 15 | min => '', 16 | }, 17 | }, 18 | data_sources => [ 19 | {name => 'Key_read_requests', label => 'Key read requests', 20 | info => 'The number of requests to read a key block from the cache.', 21 | draw => 'AREA', 22 | colour => '008800', 23 | min => '0'}, 24 | {name => 'Key_reads', label => 'Key reads', 25 | info => 'The number of physical reads of a key block from disk.', 26 | colour => '00FF00', 27 | min => '0'}, 28 | # plot as negative as long as munin does not support different colours for above and below the line 29 | {name => 'Key_write_requests', label => 'Key write requests', 30 | info => 'The number of requests to write a key block to the cache.', 31 | cdef => 'Key_write_requests,-1,*', 32 | draw => 'AREA', 33 | colour => '880000'}, 34 | {name => 'Key_writes', label => 'Key writes', 35 | info => 'The number of physical writes of a key block to disk.', 36 | cdef => 'Key_writes,-1,*', 37 | colour => 'FF0000'}, 38 | ], 39 | }, 40 | 41 | #--------------------------------------------------------------------- 42 | 43 | myisam_key_cache => { 44 | config => { 45 | global_attrs => { 46 | title => 'MyISAM Key Cache', 47 | vlabel => 'Bytes', 48 | }, 49 | data_source_attrs => { 50 | type => 'GAUGE', 51 | }, 52 | }, 53 | data_sources => [ 54 | {name => 'key_buffer_size', label => 'Key buffer size', 55 | draw => 'AREA', 56 | colour => '99B898'}, 57 | {name => 'Key_buf_unused', label => 'Key buffer bytes unused', 58 | draw => 'AREA', 59 | colour => '2A363B', 60 | value => sub { 61 | $_[0]->{Key_blocks_unused} * $_[0]->{key_cache_block_size} 62 | }}, 63 | {name => 'Key_buf_unflush', label => 'Key buffer bytes unflushed', 64 | draw => 'AREA', 65 | colour => 'FECEA8', 66 | value => sub { 67 | $_[0]->{Key_blocks_not_flushed} * $_[0]->{key_cache_block_size} 68 | }}, 69 | ], 70 | }, 71 | }} 72 | 73 | 1; 74 | 75 | -------------------------------------------------------------------------------- /lib/Munin/MySQL/Graph/QueryCache.pm: -------------------------------------------------------------------------------- 1 | package Munin::MySQL::Graph::QueryCache; 2 | 3 | use warnings; 4 | use strict; 5 | 6 | sub graphs { return { 7 | qcache => { 8 | config => { 9 | global_attrs => { 10 | title => 'Query Cache', 11 | vlabel => 'Commands per ${graph_period}', 12 | }, 13 | data_source_attrs => { 14 | draw => 'LINE1', 15 | }, 16 | }, 17 | data_sources => [ 18 | {name => 'Qcache_queries_in_cache', label => 'Queries in cache (K)', 19 | info => 'The number of queries registered in the query cache.', 20 | cdef => 'Qcache_queries_in_cache,1024,/', 21 | type => 'GAUGE'}, 22 | {name => 'Qcache_hits', label => 'Cache hits', 23 | info => 'The number of query cache hits.'}, 24 | {name => 'Qcache_inserts', label => 'Inserts', 25 | info => 'The number of queries added to the query cache.'}, 26 | {name => 'Qcache_not_cached', label => 'Not cached', 27 | info => 'The number of noncached queries (not cacheable, or not cached due to the query_cache_type setting).'}, 28 | {name => 'Qcache_lowmem_prunes', label => 'Low-memory prunes', 29 | info => 'The number of queries that were deleted from the query cache because of low memory.'}, 30 | {name => 'Qcache_invalidations', label => 'Invalidations', 31 | info => 'The number of query cache invalidations.'}, 32 | ], 33 | }, 34 | 35 | #--------------------------------------------------------------------- 36 | 37 | qcache_mem => { 38 | config => { 39 | global_attrs => { 40 | title => 'Query Cache Memory', 41 | vlabel => 'Bytes', 42 | args => "--base 1024 --lower-limit 0", 43 | }, 44 | data_source_attrs => { 45 | draw => 'AREA', 46 | type => 'GAUGE', 47 | }, 48 | }, 49 | data_sources => [ 50 | {name => 'query_cache_size', label => 'Cache size', 51 | info => 'The amount of memory allocated for caching query results.'}, 52 | {name => 'Qcache_free_memory', label => 'Free mem', 53 | info => 'The amount of free memory for the query cache.'}, 54 | {name => 'Qcache_avg_rslt_size', label => 'Average result size', 55 | info => 'The average result size.'}, 56 | ], 57 | }, 58 | 59 | #--------------------------------------------------------------------- 60 | 61 | qcache_blocks => { 62 | config => { 63 | global_attrs => { 64 | title => 'Query Cache Blocks', 65 | vlabel => 'Blocks', 66 | args => "--base 1024 --lower-limit 0", 67 | }, 68 | data_source_attrs => { 69 | draw => 'AREA', 70 | type => 'GAUGE', 71 | }, 72 | }, 73 | data_sources => [ 74 | {name => 'Qcache_total_blocks', label => 'Total blocks', 75 | info => 'The number of total blocks'}, 76 | {name => 'Qcache_free_blocks', label => 'Free blocks', 77 | info => 'The number of free blocks in memory'}, 78 | ], 79 | }, 80 | 81 | #--------------------------------------------------------------------- 82 | 83 | qcache_hit_rate => { 84 | config => { 85 | global_attrs => { 86 | title => 'Query Cache Hit Rate', 87 | vlabel => '%', 88 | }, 89 | data_source_attrs => { 90 | draw => 'LINE1', 91 | type => 'GAUGE', 92 | }, 93 | }, 94 | data_sources => [ 95 | {name => 'query_cache_hit_rate', label => 'Hit Rate', 96 | info => 'The percentage of queries served by cache instead of being re-executed by the database repeatedly.'}, 97 | ], 98 | }, 99 | }} 100 | 101 | 1; 102 | -------------------------------------------------------------------------------- /lib/Munin/MySQL/Graph/README: -------------------------------------------------------------------------------- 1 | %graphs contains the graph definitions, it is indexed on the graph 2 | name. The information stored for each graph is used for both showing 3 | data source values and for printing the graph configuration. Each 4 | graph follows the followingformat: 5 | 6 | $graph{NAME} => { 7 | config => { 8 | # The global attributes for this graph 9 | global_attrs => {} 10 | # Attributes common to all data sources in this graph 11 | data_source_attrs => {} 12 | }, 13 | data_sources => [ 14 | # NAME - The name of the data source (e.g. variable names 15 | # from SHOW STATUS) 16 | # DATA_SOURCE_ATTRS - key-value pairs with data source 17 | # attributes 18 | {name => 'NAME', (DATA_SOURCE_ATTRS)}, 19 | {...}, 20 | ], 21 | 22 | -------------------------------------------------------------------------------- /lib/Munin/MySQL/Graph/ReplicationSlave.pm: -------------------------------------------------------------------------------- 1 | package Munin::MySQL::Graph::ReplicationSlave; 2 | 3 | use warnings; 4 | use strict; 5 | 6 | sub graphs { return { 7 | replication => { 8 | config => { 9 | global_attrs => { 10 | title => 'Replication', 11 | vlabel => 'Activity', 12 | }, 13 | data_source_attrs => { 14 | draw => 'LINE1', 15 | }, 16 | }, 17 | data_sources => [ 18 | {name => 'slave_running', label => 'Slave Running', 19 | type => 'GAUGE', 20 | draw => 'AREA', 21 | colour=> '00AA00'}, 22 | {name => 'slave_stopped', label => 'Slave Stopped', 23 | type => 'GAUGE', 24 | draw => 'AREA', 25 | colour=> 'DD0000'}, 26 | {name => 'Slave_retried_transactions', label => 'Retried Transactions', 27 | info => 'The total number of times since startup that the replication slave SQL thread has retried transactions.'}, 28 | {name => 'Slave_open_temp_tables', label => 'Open Temp Tables', 29 | info => 'The number of temporary tables that the slave SQL thread currently has open.'}, 30 | {name => 'seconds_behind_master', label => 'Secs Behind Master', 31 | type => 'GAUGE', 32 | info => 'http://dev.mysql.com/doc/refman/5.1/en/show-slave-status.html'}, 33 | ], 34 | }, 35 | }} 36 | 37 | 1; 38 | 39 | -------------------------------------------------------------------------------- /lib/Munin/MySQL/Graph/Standard.pm: -------------------------------------------------------------------------------- 1 | package Munin::MySQL::Graph::Standard; 2 | 3 | use warnings; 4 | use strict; 5 | 6 | use POSIX qw(floor); 7 | 8 | sub graphs { return { 9 | 10 | bin_relay_log => { 11 | config => { 12 | global_attrs => { 13 | title => 'Binary/Relay Logs', 14 | vlabel => 'Log activity', 15 | }, 16 | data_source_attrs => { 17 | draw => 'LINE1', 18 | }, 19 | }, 20 | data_sources => [ 21 | {name => 'Binlog_cache_disk_use', label => 'Binlog Cache Disk Use', 22 | info => 'The number of transactions that used the temporary binary log cache but that exceeded the value of binlog_cache_size and used a temporary file to store statements from the transaction.'}, 23 | {name => 'Binlog_cache_use', label => 'Binlog Cache Use', 24 | info => 'The number of transactions that used the temporary binary log cache.'}, 25 | {name => 'Binlog_stmt_cache_disk_use', label => 'Binlog Statement Cache Disk Use'}, 26 | {name => 'Binlog_stmt_cache_use', label => 'Binlog Statement Cache Use'}, 27 | {name => 'ma_binlog_size', label => 'Binary Log Space (GB)', 28 | info => 'The total combined size of all existing binary logs in GB', 29 | type => 'GAUGE', 30 | cdef => 'ma_binlog_size,1024,/,1024,/,1024,/'}, 31 | {name => 'relay_log_space', label => 'Relay Log Space (GB)', 32 | info => 'The total combined size of all existing relay logs in GB.', 33 | type => 'GAUGE', 34 | cdef => 'relay_log_space,1024,/,1024,/,1024,/'}, 35 | ], 36 | }, 37 | 38 | #--------------------------------------------------------------------- 39 | 40 | binlog_commits => { 41 | config => { 42 | global_attrs => { 43 | title => 'Binary Log Commits', 44 | vlabel => 'Number of commits', 45 | }, 46 | data_source_attrs => { 47 | draw => 'LINE1', 48 | }, 49 | }, 50 | data_sources => [ 51 | {name => 'Binlog_commits', label => 'Binlog commits', 52 | info => 'The number of transactions committed to the binary log'}, 53 | {name => 'Binlog_group_commits', label => 'Binlog group commits', 54 | info => 'The number of group commits done to the binary log'}, 55 | {name => 'Binlog_group_commit_trigger_count', label => 'Triggered by count', 56 | info => 'Group commits triggered by count'}, 57 | {name => 'Binlog_group_commit_trigger_timeout', label => 'Triggered by timeout', 58 | info => 'Group commits triggered by timeout'}, 59 | {name => 'Binlog_group_commit_trigger_lock_wait', label => 'Triggered by lock_wait', 60 | info => 'Group commits triggered by lock_wait'}, 61 | ], 62 | }, 63 | 64 | #--------------------------------------------------------------------- 65 | 66 | commands => { 67 | config => { 68 | global_attrs => { 69 | title => 'Command Counters', 70 | vlabel => 'Commands per ${graph_period}', 71 | total => 'Questions', 72 | }, 73 | data_source_attrs => {}, 74 | }, 75 | data_sources => [ 76 | {name => 'Com_delete', label => 'Delete', colour=>'FF7D00'}, 77 | {name => 'Com_delete_multi', label => 'Delete multi', colour=>'942D0C'}, 78 | {name => 'Com_insert', label => 'Insert', colour=>'FFF200'}, 79 | {name => 'Com_insert_select', label => 'Insert select', colour=>'AAABA1'}, 80 | {name => 'Com_load', label => 'Load Data', colour=>'55009D'}, 81 | {name => 'Com_replace', label => 'Replace', colour=>'2175D9'}, 82 | {name => 'Com_replace_select', label => 'Replace select', colour=>'00B99B'}, 83 | {name => 'Com_select', label => 'Select', colour=>'FF0000'}, 84 | {name => 'Com_update', label => 'Update', colour=>'00CF00'}, 85 | {name => 'Com_update_multi', label => 'Update multi', colour=>'D8ACE0'}, 86 | ], 87 | }, 88 | 89 | #--------------------------------------------------------------------- 90 | 91 | connections => { 92 | config => { 93 | global_attrs => { 94 | title => 'Connections', 95 | vlabel => 'Connections per ${graph_period}', 96 | }, 97 | data_source_attrs => { 98 | draw => 'LINE1', 99 | }, 100 | }, 101 | data_sources => [ 102 | {name => 'max_connections', label => 'Max connections', 103 | type => 'GAUGE', 104 | draw => 'AREA', 105 | colour => 'cdcfc4', 106 | info => 'The number of simultaneous client connections allowed.'}, 107 | {name => 'Max_used_connections', label => 'Max used', 108 | type => 'GAUGE', 109 | draw => 'AREA', 110 | colour => 'ffd660', 111 | info => 'The maximum number of connections that have been in use simultaneously since the server started.'}, 112 | {name => 'Aborted_clients', label => 'Aborted clients', 113 | info => 'The number of connections that were aborted because the client died without closing the connection properly.'}, 114 | {name => 'Aborted_connects', label => 'Aborted connects', 115 | info => 'The number of failed attempts to connect to the MySQL server.'}, 116 | {name => 'Threads_connected', label => 'Threads connected', 117 | type => 'GAUGE', 118 | info => 'The number of open connections.'}, 119 | {name => 'Threads_running', label => 'Threads running', 120 | type => 'GAUGE', 121 | info => 'Number of threads that are actively running, not sleeping.'}, 122 | {name => 'Connections', label => 'New connections', 123 | info => 'The number of connection attempts (successful or not) to the MySQL server.'}, 124 | ], 125 | }, 126 | 127 | #--------------------------------------------------------------------- 128 | 129 | files => { 130 | config => { 131 | global_attrs => { 132 | title => 'Files', 133 | }, 134 | data_source_attrs => { 135 | type => 'GAUGE', 136 | draw => 'LINE1', 137 | }, 138 | }, 139 | data_sources => [ 140 | {name => 'open_files_limit', label => 'File limit', 141 | draw => 'AREA', 142 | colour => 'cdcfc4', 143 | info => 'The number of file descriptors available to mysqld.'}, 144 | {name => 'Open_files', label => 'Open files', 145 | info => 'The number of files that are open.'}, 146 | ], 147 | }, 148 | 149 | 150 | #--------------------------------------------------------------------- 151 | 152 | tables => { 153 | config => { 154 | global_attrs => { 155 | title => 'Tables', 156 | }, 157 | data_source_attrs => { 158 | draw => 'LINE1', 159 | }, 160 | }, 161 | data_sources => [ 162 | {name => 'table_open_cache', label => 'Table cache', 163 | type => 'GAUGE', 164 | draw => 'AREA', 165 | colour => 'cdcfc4', 166 | info => 'The number of open tables for all threads.'}, 167 | {name => 'innodb_open_files', 168 | label => 'Innodb Table Cache Limit', 169 | type => 'GAUGE', 170 | colour => '66ffff'}, 171 | {name => 'Slave_open_temp_tables', 172 | label => 'Open Slave Temp Tables', 173 | type => 'GAUGE', 174 | info => 'The number of temporary tables that the slave SQL thread currently has open.'}, 175 | {name => 'Open_tables', label => 'Open tables', 176 | type => 'GAUGE', 177 | info => 'The number of tables that are open.'}, 178 | {name => 'Opened_tables', label => 'Opened tables', 179 | info => 'The number of tables that have been opened.'}, 180 | {name => 'Opened_views', label => 'Opened Views', 181 | info => 'The number of views that have been opened.'}, 182 | ], 183 | }, 184 | 185 | #--------------------------------------------------------------------- 186 | 187 | tables_definitions=> { 188 | config => { 189 | global_attrs => { 190 | title => 'Tables Definitions', 191 | }, 192 | data_source_attrs => { 193 | draw => 'LINE1', 194 | }, 195 | }, 196 | data_sources => [ 197 | {name => 'table_definition_cache', 198 | label => 'Cache Limit', 199 | type => 'GAUGE', 200 | draw => 'AREA', 201 | colour => 'cdcfc4', 202 | info => 'Number of table definitions that can be cached.'}, 203 | {name => 'Open_table_definitions', 204 | label => 'Open table definitions', 205 | type => 'GAUGE', 206 | info => 'Number of currently cached .frm files.'}, 207 | {name => 'Opened_table_definitions', 208 | label => 'Opened table definitions', 209 | info => 'Number of .frm files that have been cached.'}, 210 | ], 211 | }, 212 | 213 | 214 | #--------------------------------------------------------------------- 215 | 216 | handlers => { 217 | config => { 218 | global_attrs => { 219 | title => 'Handlers', 220 | }, 221 | data_source_attrs => { 222 | draw => 'AREASTACK', 223 | }, 224 | }, 225 | data_sources => [ 226 | {name => 'Handler_write', label => 'Handler write', 227 | colour => '4D4A47', 228 | info => 'The number of requests to insert a row in a table.'}, 229 | {name => 'Handler_update', label => 'Handler update', 230 | colour => 'C79F71', 231 | info => 'The number of requests to update a row in a table.'}, 232 | {name => 'Handler_delete', label => 'Handler delete', 233 | colour => 'BDB8B3', 234 | info => 'The number of requests to delete a row in a table.'}, 235 | {name => 'Handler_read_first', label => 'Handler Read First', 236 | colour => '8C286E', 237 | info => 'The number of times the first entry was read from an index. If this is high, it suggests that the server is doing a lot of full index scans.'}, 238 | {name => 'Handler_read_key', label => 'Handler Read Key', 239 | colour => 'BAB27F', 240 | info => 'The number of requests to read a row based on a key. If this is high, it is a good indication that your queries and tables are properly indexed.'}, 241 | {name => 'Handler_read_next', label => 'Handler Read Next', 242 | colour => 'C02942', 243 | info => 'The number of requests to read the next row in key order. This is incremented if you are querying an index column with a range constraint or if you are doing an index scan.'}, 244 | {name => 'Handler_read_prev', label => 'Handler Read Prev', 245 | colour => 'FA6900', 246 | info => 'The number of requests to read the previous row in key order. This read method is mainly used to optimize ORDER BY ... DESC.'}, 247 | {name => 'Handler_read_rnd', label => 'Handler Read Random', 248 | colour => '5A3D31', 249 | info => 'The number of requests to read a row based on a fixed position. This is high if you are doing a lot of queries that require sorting of the result. You probably have a lot of queries that require MySQL to scan whole tables or you have joins that don\'t use keys properly.'}, 250 | {name => 'Handler_read_rnd_next',label => 'Handler Read Random Next', 251 | colour => '69D2E7', 252 | info => 'RThe number of requests to read the next row in the data file. This is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.'}, 253 | 254 | ], 255 | }, 256 | 257 | 258 | #--------------------------------------------------------------------- 259 | 260 | network_traffic => { 261 | config => { 262 | global_attrs => { 263 | title => 'Network Traffic', 264 | args => "--base 1024", 265 | vlabel => 'Bytes received (-) / sent (+) per ${graph_period}', 266 | }, 267 | data_source_attrs => { 268 | draw => 'LINE1', 269 | }, 270 | }, 271 | data_sources => [ 272 | {name => 'Bytes_received', label => 'Bytes transfered', 273 | graph => 'no', 274 | info => 'The number of bytes received from all clients.'}, 275 | {name => 'Bytes_sent', label => 'Bytes transfered', 276 | negative => 'Bytes_received', 277 | info => 'The number of bytes sent to all clients.'}, 278 | ], 279 | }, 280 | 281 | #--------------------------------------------------------------------- 282 | 283 | processlist => { 284 | config => { 285 | global_attrs => { 286 | title => 'Processlist states', 287 | vlabel => 'State count per ${graph_period}', 288 | }, 289 | data_source_attrs => { 290 | }, 291 | }, 292 | data_sources => [ 293 | {name => 'State_closing_tables', label => 'Closing tables', 294 | info => 'The thread is flushing the changed table data to disk and closing the used tables.', 295 | colour=> 'DE0056'}, 296 | {name => 'State_copying_to_tmp_table', label => 'Copying to tmp table', 297 | info => 'The thread is processing an ALTER TABLE statement. This state occurs after the table with the new structure has been created but before rows are copied into it.', 298 | colour=> '784890'}, 299 | {name => 'State_end', label => 'End', 300 | info => 'This occurs at the end but before the cleanup of ALTER TABLE, CREATE VIEW, DELETE, INSERT, SELECT, or UPDATE statements.', 301 | colour=> 'D1642E'}, 302 | {name => 'State_freeing_items', label => 'Freeing items', 303 | info => 'The thread has executed a command. This state is usually followed by cleaning up.', 304 | colour=> '487860'}, 305 | {name => 'State_init', label => 'Init', 306 | info => 'This occurs before the initialization of ALTER TABLE, DELETE, INSERT, SELECT, or UPDATE statements.', 307 | colour=> '907890'}, 308 | {name => 'State_locked', label => 'Locked', 309 | info => 'The query is locked by another query.', 310 | colour=> 'DE0056'}, 311 | {name => 'State_login', label => 'Login', 312 | info => 'The initial state for a connection thread until the client has been authenticated successfully.', 313 | colour=> '1693A7'}, 314 | {name => 'State_preparing', label => 'Preparing', 315 | info => 'This state occurs during query optimization.', 316 | colour=> '783030'}, 317 | {name => 'State_reading_from_net', label => 'Reading from net', 318 | info => 'The server is reading a packet from the network.', 319 | colour=> 'FF7F00'}, 320 | {name => 'State_sending_data', label => 'Sending data', 321 | info => 'The thread is processing rows for a SELECT statement and also is sending data to the client.', 322 | colour=> '54382A'}, 323 | {name => 'State_sorting_result', label => 'Sorting result', 324 | info => 'For a SELECT statement, this is similar to Creating sort index, but for nontemporary tables.', 325 | colour=> 'B83A04'}, 326 | {name => 'State_statistics', label => 'Statistics', 327 | info => 'The server is calculating statistics to develop a query execution plan. If a thread is in this state for a long time, the server is probably disk-bound performing other work.', 328 | colour=> '6E3803'}, 329 | {name => 'State_system_lock', label => 'System lock', 330 | info => 'Requesting or waiting for a table system lock.', 331 | colour=> 'c564a4'}, 332 | {name => 'State_table_lock', label => 'Table lock', 333 | info => 'About to request an internal table lock after acquiring an external lock. Follows from System lock.', 334 | colour=> '151414'}, 335 | {name => 'State_updating', label => 'Updating', 336 | info => 'The thread is searching for rows to update and is updating them.', 337 | colour=> 'B56414'}, 338 | {name => 'State_writing_to_net', label => 'Writing to net', 339 | info => 'The server is writing a packet to the network.', 340 | colour=> '6E645A'}, 341 | {name => 'State_none', label => 'None', 342 | info => '', 343 | colour=> '521808'}, 344 | {name => 'State_other', label => 'Other', 345 | info => '', 346 | colour=> '194240'}, 347 | ], 348 | }, 349 | 350 | #--------------------------------------------------------------------- 351 | 352 | select_types => { 353 | config => { 354 | global_attrs => { 355 | title => 'Select types', 356 | vlabel => 'Commands per ${graph_period}', 357 | total => 'Total', 358 | }, 359 | data_source_attrs => {}, 360 | }, 361 | data_sources => [ 362 | {name => 'Select_full_join', label => 'Full join', 363 | info => 'The number of joins that perform table scans because they do not use indexes.', 364 | colour=> 'FF0000'}, 365 | {name => 'Select_full_range_join', label => 'Full range', 366 | info => 'The number of joins that used a range search on a reference table.', 367 | colour=> 'FF7D00'}, 368 | {name => 'Select_range', label => 'Range', 369 | info => 'The number of joins that used ranges on the first table.', 370 | colour=> 'FFF200'}, 371 | {name => 'Select_range_check', label => 'Range check', 372 | info => 'The number of joins without keys that check for key usage after each row.', 373 | colour=> '7DFF7D'}, 374 | {name => 'Select_scan', label => 'Scan', 375 | info => 'The number of joins that did a full scan of the first table.', 376 | colour=> '7D7DFF'}, 377 | ], 378 | }, 379 | 380 | #--------------------------------------------------------------------- 381 | 382 | slow => { 383 | config => { 384 | global_attrs => { 385 | title => 'Slow Queries', 386 | vlabel => 'Slow queries per ${graph_period}', 387 | }, 388 | data_source_attrs => { 389 | draw => 'LINE1', 390 | }, 391 | }, 392 | data_sources => [ 393 | {name => 'Slow_queries', label => 'Slow queries', 394 | info => 'The number of queries that have taken more than long_query_time seconds.'}, 395 | ], 396 | }, 397 | 398 | #--------------------------------------------------------------------- 399 | 400 | sorts => { 401 | config => { 402 | global_attrs => { 403 | title => 'Sorts', 404 | vlabel => 'Sorts / ${graph_period}', 405 | }, 406 | data_source_attrs => { 407 | draw => 'LINE1', 408 | }, 409 | }, 410 | data_sources => [ 411 | {name => 'Sort_rows', label => 'Rows sorted (K)', 412 | info => 'The number of sorted rows.', 413 | cdef => 'Sort_rows,1024,/', 414 | draw => 'AREA', 415 | colour=> 'FF7D00'}, 416 | {name => 'Sort_range', label => 'Range', 417 | info => 'The number of sorts that were done using ranges.', 418 | colour=> '007D00'}, 419 | {name => 'Sort_merge_passes', label => 'Merge passes', 420 | info => 'The number of merge passes that the sort algorithm has had to do.', 421 | colour=> '7D0000'}, 422 | {name => 'Sort_scan', label => 'Scan', 423 | info => 'The number of sorts that were done by scanning the table.', 424 | colour=> '0000D0'}, 425 | ], 426 | }, 427 | 428 | #--------------------------------------------------------------------- 429 | 430 | table_locks => { 431 | config => { 432 | global_attrs => { 433 | title => 'Table locks', 434 | vlabel => 'locks per ${graph_period}', 435 | }, 436 | data_source_attrs => { 437 | draw => 'LINE1', 438 | }, 439 | }, 440 | data_sources => [ 441 | {name => 'Table_locks_immediate', label => 'Table locks immed', 442 | info => 'The number of times that a request for a table lock could be granted immediately.'}, 443 | {name => 'Table_locks_waited', label => 'Table locks waited', 444 | info => 'The number of times that a request for a table lock could not be granted immediately and a wait was needed.'}, 445 | ], 446 | }, 447 | 448 | #--------------------------------------------------------------------- 449 | 450 | threads => { 451 | config => { 452 | global_attrs => { 453 | title => 'Threads', 454 | vlabel => 'Threads created', 455 | }, 456 | data_source_attrs => { 457 | }, 458 | }, 459 | data_sources => [ 460 | {name => 'thread_cache_size', label => 'Thread cache size', 461 | draw => 'AREA', 462 | type => 'GAUGE', 463 | info => 'How many threads the server should cache for reuse', 464 | colour=> '99ff99'}, 465 | {name => 'Threads_created', label => 'Threads created', 466 | draw => 'LINE1', 467 | type => 'GAUGE', 468 | info => 'The number of threads created to handle connections', 469 | colour=> '0000ff'}, 470 | {name => 'Threads_connected', label => 'Threads connected', 471 | draw => 'LINE1', 472 | type => 'GAUGE', 473 | info => 'The number of currently open connections', 474 | colour=> '7777ff'}, 475 | {name => 'Threads_running', label => 'Threads running', 476 | draw => 'LINE1', 477 | type => 'GAUGE', 478 | info => 'The number of threads that are not sleeping', 479 | colour=> '7d0000'}, 480 | ], 481 | }, 482 | 483 | #--------------------------------------------------------------------- 484 | 485 | tmp_tables => { 486 | config => { 487 | global_attrs => { 488 | title => 'Temporary objects', 489 | vlabel => 'Objects per ${graph_period}', 490 | }, 491 | data_source_attrs => { 492 | draw => 'LINE1', 493 | }, 494 | }, 495 | data_sources => [ 496 | {name => 'Created_tmp_disk_tables', label => 'Temp disk tables', 497 | info => 'The number of internal on-disk temporary tables created by the server while executing statements.'}, 498 | {name => 'Created_tmp_tables', label => 'Temp tables', 499 | info => 'The number of internal temporary tables created by the server while executing statements.'}, 500 | {name => 'Created_tmp_files', label => 'Temp files', 501 | info => 'How many temporary files mysqld has created.'}, 502 | ], 503 | }, 504 | 505 | #--------------------------------------------------------------------- 506 | 507 | uptime => { 508 | config => { 509 | global_attrs => { 510 | title => 'Uptime', 511 | vlabel => 'Uptime in days', 512 | }, 513 | data_source_attrs => { 514 | draw => 'AREA', 515 | type => 'GAUGE', 516 | }, 517 | }, 518 | data_sources => [ 519 | {name => 'Uptime_days', label => 'Uptime', 520 | info => 'Server uptime in days.', 521 | value => sub { 522 | floor($_[0]->{Uptime} / 86400); # seconds in a day 523 | }, 524 | }, 525 | ], 526 | }, 527 | }} 528 | 529 | 1; 530 | 531 | -------------------------------------------------------------------------------- /mysql: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | =head1 NAME 4 | 5 | mysql - Munin plugin to display misc MySQL server status 6 | 7 | =head1 APPLICABLE SYSTEMS 8 | 9 | Should work on most MySQL platforms. 10 | 11 | =head1 CONFIGURATION 12 | 13 | You need to configure connection parameters to override the 14 | defaults. These are the defaults: 15 | 16 | [mysql] 17 | env.mysqlconnection DBI:mysql:mysql 18 | env.mysqluser root 19 | 20 | Non-default example: 21 | 22 | [mysql] 23 | env.mysqlconnection DBI:mysql:mysql;host=127.0.0.1;port=3306 24 | env.mysqluser root 25 | env.mysqlpassword geheim 26 | env.hostname mysqlserver 27 | 28 | Warning and critical values can be set via the environment in the usual way. 29 | For example: 30 | 31 | [mysql_replication] 32 | env.seconds_behind_master_warning 300 33 | env.seconds_behind_master_critical 600 34 | 35 | =head2 Multiple instances 36 | 37 | This plugin can monitor many instances of MySQL. See 38 | L for a hint on 39 | how this can be configured. 40 | 41 | =head2 Slave lag (mk-heartbeat, pt-heartbeat) 42 | 43 | You can use Percona's pt-hearbeat L, formerly known as 44 | maatkit's mk-heartbeat L to better measure slave lag. Add this to the configuration: 45 | 46 | env.maatkit_heartbeat 1 47 | 48 | or: 49 | 50 | env.pt_heartbeat 1 51 | 52 | If you want to use a table other than maatkit.heartbeat, name it like this: 53 | 54 | env.maatkit_heartbeat_table schema.heartbeattable 55 | 56 | or: 57 | env.pt_heartbeat_table schema.heartbeattable 58 | 59 | =head2 Skipping graphs 60 | 61 | You can skip graphs by using skip_* configuration variables: 62 | 63 | [mysql] 64 | env.skip_binlog_commits 1 65 | env.skip_innodb_bpool_internal_breakdown 1 66 | 67 | =head1 DEPENDENCIES 68 | 69 | =over 70 | 71 | =item DBD::mysql 72 | 73 | =item Module::Pluggable 74 | 75 | =back 76 | 77 | =head1 INTERPRETATION 78 | 79 | =head2 InnoDB 80 | 81 | The statistics from innodb are mainly collected from the command 82 | 83 | SHOW ENGINE INNODB STATUS 84 | 85 | A nice walk through is found at 86 | L 87 | 88 | =head2 The graphs 89 | 90 | FIX point to relevant sections in the MySQL manual and other www 91 | resources for each graph 92 | 93 | =over 94 | 95 | =item mysql_replication 96 | 97 | slave_running and slave_stopped creates an alterning color under the 98 | seconds_behind_master line. It will have the color of slave_running 99 | when the SQL thread runs and the color of slave_stopped otherwise. 100 | 101 | =back 102 | 103 | =head1 LICENSE 104 | 105 | Copyright (C) 2008-2011 Kjell-Magne Øierud 106 | 107 | This program is free software; you can redistribute it and/or modify 108 | it under the terms of the GNU General Public License as published by 109 | the Free Software Foundation; version 2 dated June, 1991. 110 | 111 | This program is distributed in the hope that it will be useful, but 112 | WITHOUT ANY WARRANTY; without even the implied warranty of 113 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 114 | General Public License for more details. 115 | 116 | You should have received a copy of the GNU General Public License along 117 | with this program; if not, write to the Free Software Foundation, Inc., 118 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 119 | 120 | =head1 VERSION 121 | 122 | git-master 123 | 124 | =head1 MAGICK MARKERS 125 | 126 | #%# family=auto 127 | #%# capabilities=autoconf 128 | 129 | =cut 130 | 131 | use warnings; 132 | use strict; 133 | use utf8; 134 | 135 | use DBI; 136 | use File::Basename; 137 | use Math::BigInt; # Used to append "=> lib 'GMP'" here, but GMP caused 138 | # segfault on some occasions. Removed as I don't 139 | # think the tiny performance boost is worth the 140 | # debugging effort. 141 | use Module::Pluggable search_path => ['Munin::MySQL::Graph'], require => 1, inner => 0; 142 | use Munin::Plugin; 143 | 144 | # Check that multigraph is supported 145 | need_multigraph(); 146 | 147 | # 148 | # Global hash holding the data collected from mysql. 149 | # 150 | our $data; # Was 'my'. Changed to 'our' to facilitate testing. 151 | 152 | # 153 | # FIX 154 | # 155 | my $instance; 156 | 157 | 158 | 159 | #--------------------------------------------------------------------- 160 | # C O N F I G 161 | #--------------------------------------------------------------------- 162 | 163 | my %config = ( 164 | 'dsn' => $ENV{'mysqlconnection'} || 'DBI:mysql:mysql', 165 | 'user' => $ENV{'mysqluser'} || 'root', 166 | 'password' => $ENV{'mysqlpassword'} || '', 167 | 'hostname' => $ENV{'hostname'} // '', 168 | 'maatkit_heartbeat' => $ENV{'maatkit_heartbeat'} || ( $ENV{'pt_heartbeat'} ? $ENV{'pt_heartbeat'} : 0 ), 169 | 'maatkit_heartbeat_table' => $ENV{'maatkit_heartbeat_table'} || ( $ENV{'pt_heartbeat_table'} ? $ENV{'pt_heartbeat_table'} : 'maatkit.heartbeat'), 170 | ); 171 | 172 | 173 | #--------------------------------------------------------------------- 174 | # G R A P H D E F I N I T I O N S 175 | #--------------------------------------------------------------------- 176 | 177 | # These are defaults to save typing in the graph definitions 178 | my %defaults = ( 179 | global_attrs => { 180 | args => "--base 1000", 181 | }, 182 | data_source_attrs => { 183 | min => '0', 184 | type => 'DERIVE', 185 | draw => 'AREASTACK', 186 | }, 187 | ); 188 | 189 | # %graphs contains the graph definitions, it is indexed on the graph 190 | # name. The information stored for each graph is used for both showing 191 | # data source values and for printing the graph configuration. Each 192 | # graph follows the followingformat: 193 | # 194 | # $graph{NAME} => { 195 | # config => { 196 | # # The global attributes for this graph 197 | # global_attrs => {} 198 | # # Attributes common to all data sources in this graph 199 | # data_source_attrs => {} 200 | # }, 201 | # data_sources => [ 202 | # # NAME - The name of the data source (e.g. variable names 203 | # # from SHOW STATUS) 204 | # # DATA_SOURCE_ATTRS - key-value pairs with data source 205 | # # attributes 206 | # {name => 'NAME', (DATA_SOURCE_ATTRS)}, 207 | # {...}, 208 | # ], 209 | 210 | my %graphs = (); 211 | 212 | 213 | #--------------------------------------------------------------------- 214 | # M A I N 215 | #--------------------------------------------------------------------- 216 | 217 | 218 | sub main { 219 | my $command = $ARGV[0] || 'show'; 220 | 221 | for my $graph_package (__PACKAGE__->plugins) { 222 | %graphs = (%graphs, %{$graph_package->graphs}); 223 | } 224 | 225 | for my $key (keys %graphs) { 226 | if ( defined $ENV{'skip_'.$key} && $ENV{'skip_'.$key} ) { 227 | delete $graphs{$key}; 228 | } 229 | } 230 | 231 | my %command_map = ( 232 | 'autoconf' => \&autoconf, 233 | 'config' => \&config, 234 | 'show' => \&show, 235 | ); 236 | 237 | die "Unknown command: $command" 238 | unless exists $command_map{$command}; 239 | 240 | build_instance(); 241 | 242 | if ($command eq 'autoconf') { 243 | return $command_map{$command}->(); 244 | } 245 | else { 246 | if ($command eq 'show') { 247 | collect_data(); 248 | } elsif ($config{hostname}) { 249 | # Config mode and hostname is set 250 | print "host_name ", $config{hostname}, "\n"; 251 | } 252 | for my $graph (sort keys %graphs) { 253 | print "multigraph mysql_$graph$instance\n"; 254 | $command_map{$command}->($graph); 255 | } 256 | } 257 | return 0; 258 | } 259 | 260 | 261 | #--------------------------------------------------------------------- 262 | # C O M M A N D H A N D L E R S 263 | #--------------------------------------------------------------------- 264 | 265 | # Each command handler should return an appropriate exit code 266 | 267 | 268 | # http://munin.projects.linpro.no/wiki/ConcisePlugins#autoconf 269 | sub autoconf { 270 | eval { 271 | db_connect(); 272 | }; 273 | if ($@) { 274 | my $err = $@; 275 | $err =~ s{\s at \s \S+ \s line .*}{}xms; 276 | print "no ($err)\n"; 277 | return 0; 278 | } 279 | print "yes\n"; 280 | return 0; 281 | } 282 | 283 | 284 | sub config { 285 | my $graph_name = shift; 286 | 287 | my $graph = $graphs{$graph_name}; 288 | 289 | my %conf = (%{$defaults{global_attrs}}, %{$graph->{config}{global_attrs}}); 290 | $conf{args} .= ' --no-gridfit --slope-mode'; 291 | 292 | while (my ($k, $v) = each %conf) { 293 | print "graph_$k $v\n"; 294 | } 295 | print "graph_category mysql$instance\n"; 296 | 297 | for my $ds (@{$graph->{data_sources}}) { 298 | my %ds_spec = ( 299 | %{$defaults{data_source_attrs}}, 300 | %{$graph->{config}{data_source_attrs}}, 301 | %$ds, 302 | ); 303 | while (my ($k, $v) = each %ds_spec) { 304 | # 'name' is only used internally in this script, not 305 | # understood by munin. 306 | next if ($k eq 'name'); 307 | 308 | # 'value' should not be used in config context. 309 | next if ($k eq 'value'); 310 | 311 | next if ($v eq ''); 312 | 313 | printf("%s.%s %s\n", clean_fieldname($ds->{name}), $k, $v); 314 | } 315 | print_thresholds(clean_fieldname($ds->{name})); 316 | } 317 | } 318 | 319 | sub show { 320 | my $graph_name = shift; 321 | 322 | my $graph = $graphs{$graph_name}; 323 | 324 | die "Can't show data for '$graph_name' because InnoDB is disabled." 325 | if $graph_name =~ /innodb_/ && $data->{_innodb_disabled}; 326 | 327 | for my $ds (@{$graph->{data_sources}}) { 328 | my $value = exists $ds->{value} 329 | ? $ds->{value}($data) 330 | : $data->{$ds->{name}}; 331 | 332 | printf "%s.value %s\n", clean_fieldname($ds->{name}), defined($value) ? $value : 'U'; 333 | 334 | } 335 | } 336 | 337 | 338 | 339 | #--------------------------------------------------------------------- 340 | # U T I L I T Y S U B S 341 | #--------------------------------------------------------------------- 342 | 343 | 344 | sub build_instance { 345 | $instance = basename($0); 346 | if($instance =~ /^mysql_([0-9]+)/) { 347 | $instance = "_$1"; 348 | } 349 | else { 350 | $instance = ""; 351 | } 352 | } 353 | 354 | 355 | sub db_connect { 356 | my $dsn = "$config{dsn};mysql_connect_timeout=5"; 357 | 358 | return DBI->connect($dsn, $config{user}, $config{password}, { 359 | RaiseError => 1, 360 | PrintError => 0, 361 | FetchHashKeyName => 'NAME_lc', 362 | }); 363 | } 364 | 365 | 366 | sub collect_data { 367 | $data = {}; 368 | 369 | my $dbh = db_connect(); 370 | 371 | # Set up defaults in case the server is not a slave 372 | $data->{relay_log_space} = 0; 373 | $data->{slave_running} = 0; 374 | $data->{slave_stopped} = 0; 375 | $data->{seconds_behind_master} = 0; 376 | 377 | # Set up defaults in case binlog is not enabled 378 | $data->{ma_binlog_size} = 0; 379 | 380 | update_variables($dbh); 381 | update_innodb($dbh); 382 | update_master($dbh); 383 | update_slave($dbh); 384 | update_process_list($dbh); 385 | } 386 | 387 | 388 | sub update_variables { 389 | my ($dbh) = @_; 390 | my @queries = ( 391 | 'SHOW /*!40003 GLOBAL*/ VARIABLES', 392 | 'SHOW /*!50002 GLOBAL*/ STATUS', 393 | ); 394 | 395 | my %variable_name_map = ( 396 | table_cache => 'table_open_cache', # table_open_cache was 397 | # previously known as 398 | # table_cache in MySQL 399 | # 5.1.2 and earlier. 400 | ); 401 | 402 | for my $query (@queries) { 403 | $data->{$query} = {}; 404 | 405 | my $sth = $dbh->prepare($query); 406 | $sth->execute(); 407 | while (my $row = $sth->fetch) { 408 | my $var = $variable_name_map{$row->[0]} || $row->[0]; 409 | $data->{$var} = $row->[1]; 410 | } 411 | 412 | # qcache hit rate percentage calculation 413 | if (defined($data->{Qcache_hits})) { 414 | $data->{query_cache_hit_rate} = (($data->{Qcache_hits} / ($data->{Qcache_hits} + $data->{Com_select})) * 100); 415 | $data->{Qcache_invalidations} = ($data->{Qcache_inserts} - $data->{Qcache_queries_in_cache}); 416 | 417 | if($data->{Qcache_queries_in_cache} > 0) { 418 | $data->{Qcache_avg_rslt_size} = (($data->{query_cache_size} - $data->{Qcache_free_memory}) / $data->{Qcache_queries_in_cache} * 1024); 419 | } else { 420 | $data->{Qcache_avg_rslt_size} = 0; 421 | } 422 | } 423 | 424 | $sth->finish(); 425 | } 426 | } 427 | 428 | 429 | sub update_innodb { 430 | my ($dbh) = @_; 431 | 432 | my $sth = $dbh->prepare('SHOW /*!50000 ENGINE*/ INNODB STATUS'); 433 | eval { 434 | $sth->execute(); 435 | }; 436 | my $exit_message = $@; 437 | if ($exit_message) { 438 | if ($exit_message =~ /Unknown (storage|table) engine 'INNODB'|Cannot call SHOW INNODB STATUS because skip-innodb is defined/) { 439 | $data->{_innodb_disabled} = 1; 440 | return; 441 | } 442 | die $exit_message; 443 | } 444 | my $row = $sth->fetchrow_hashref(); 445 | my $status = $row->{'status'}; 446 | $sth->finish(); 447 | 448 | parse_innodb_status($status); 449 | } 450 | 451 | 452 | sub update_master { 453 | my ($dbh) = @_; 454 | 455 | return if $data->{log_bin} eq 'OFF'; 456 | 457 | my $sth = $dbh->prepare('SHOW MASTER LOGS'); 458 | $sth->execute(); 459 | while (my $row = $sth->fetch) { 460 | $data->{ma_binlog_size} += $row->[1]; 461 | } 462 | 463 | $sth->finish(); 464 | } 465 | 466 | 467 | sub update_slave { 468 | my ($dbh) = @_; 469 | 470 | my $sth = $dbh->prepare('SHOW SLAVE STATUS'); 471 | $sth->execute(); 472 | my $row = $sth->fetchrow_hashref(); 473 | return unless $row; 474 | while (my ($k, $v) = each %$row) { 475 | $data->{$k} = $v; 476 | } 477 | $sth->finish(); 478 | 479 | if ($config{maatkit_heartbeat}) { 480 | update_slave_maatkit_heartbeat($dbh); 481 | } 482 | 483 | # undef when slave is stopped, or when MySQL fails to calculate 484 | # the lag (which happens depressingly often). (mk-heartbeat fixes 485 | # this problem.) 486 | $data->{seconds_behind_master} ||= 0; 487 | 488 | # Scale slave_running and slave_stopped relative to the slave lag. 489 | $data->{slave_running} = ($data->{slave_sql_running} eq 'Yes') 490 | ? $data->{seconds_behind_master} : 0; 491 | $data->{slave_stopped} = ($data->{slave_sql_running} eq 'Yes') 492 | ? 0 : $data->{seconds_behind_master}; 493 | } 494 | 495 | # Overwrites seconds_behind_master collected from SHOW SLAVE STATUS 496 | sub update_slave_maatkit_heartbeat { 497 | my ($dbh) = @_; 498 | 499 | # The TIME_TO_SEC(TIMEDIFF in the query is necessary as mysql 500 | # otherwise calculates the wrong difference (simply substracting 501 | # won't work) 502 | my $heartbeat_query = "SELECT TIME_TO_SEC(TIMEDIFF(NOW(), ts)) AS seconds_behind_master 503 | FROM $config{maatkit_heartbeat_table} 504 | LIMIT 1"; 505 | my $sth = $dbh->prepare($heartbeat_query); 506 | $sth->execute(); 507 | my $row = $sth->fetchrow_hashref(); 508 | return unless $row; 509 | while (my ($k, $v) = each %$row) { 510 | $data->{$k} = $v; 511 | } 512 | $sth->finish(); 513 | } 514 | 515 | 516 | sub update_process_list { 517 | my ($dbh) = @_; 518 | 519 | $data->{State_closing_tables} = 0; 520 | $data->{State_copying_to_tmp_table} = 0; 521 | $data->{State_end} = 0; 522 | $data->{State_freeing_items} = 0; 523 | $data->{State_init} = 0; 524 | $data->{State_locked} = 0; 525 | $data->{State_login} = 0; 526 | $data->{State_preparing} = 0; 527 | $data->{State_reading_from_net} = 0; 528 | $data->{State_sending_data} = 0; 529 | $data->{State_sorting_result} = 0; 530 | $data->{State_statistics} = 0; 531 | $data->{State_system_lock} = 0; 532 | $data->{State_table_lock} = 0; 533 | $data->{State_updating} = 0; 534 | $data->{State_writing_to_net} = 0; 535 | $data->{State_none} = 0; 536 | $data->{State_other} = 0; 537 | 538 | my $sth = $dbh->prepare('SHOW PROCESSLIST'); 539 | $sth->execute(); 540 | while (my $row = $sth->fetchrow_hashref()) { 541 | my $state = $row->{state}; 542 | if (! defined $state) { 543 | $state = 'NULL'; 544 | } 545 | elsif ($state eq '') { 546 | $state = 'none'; 547 | } 548 | $state = lc $state; 549 | $state =~ tr/ /_/; 550 | my $state_key = exists($data->{"State_$state"}) ? "State_$state" : 'State_other'; 551 | $data->{$state_key}++; 552 | } 553 | $sth->finish(); 554 | } 555 | 556 | 557 | # 558 | # In 'SHOW ENGINE INNODB STATUS' 64 bit integers are not formated as 559 | # plain integers. They are either: 560 | # 561 | # - split in two and needs to be shifted together, 562 | # - or hexadecimal 563 | # 564 | sub innodb_bigint { 565 | my ($x, $y) = @_; 566 | 567 | return defined $y 568 | ? Math::BigInt->new($x)->blsft(32) + $y 569 | : Math::BigInt->new("0x$x"); 570 | } 571 | 572 | sub innodb_bigint_nohex { 573 | my ($x, $y) = @_; 574 | 575 | return defined $y 576 | ? Math::BigInt->new($x)->blsft(32) + $y 577 | : Math::BigInt->new($x); 578 | } 579 | 580 | 581 | #--------------------------------------------------------------------- 582 | # P A R S E 'SHOW ENGINE INNODB STATUS' O U T P U T 583 | #--------------------------------------------------------------------- 584 | 585 | 586 | # A nice walk through 587 | # http://www.mysqlperformanceblog.com/2006/07/17/show-innodb-status-walk-through/ 588 | 589 | # The parsing is split in one subrutine per section. Each subroutine 590 | # should parse a block with the following structure 591 | # 592 | # block body ... 593 | # more lines .... 594 | # ---------- 595 | 596 | sub parse_innodb_status { 597 | local $_ = shift; 598 | 599 | # Add a dummy section to the end in case the innodb status output 600 | # has been truncated (Happens for status > 64K characters) 601 | $_ .= "\n----------\nDUMMY\n----------\n"; 602 | 603 | my %section_map = ( 604 | 605 | 'BUFFER POOL AND MEMORY' => \&parse_buffer_pool_and_memory, 606 | 'INDIVIDUAL BUFFER POOL INFO' => \&parse_individual_buffer_pool, 607 | 'FILE I/O' => \&parse_file_io, 608 | 'INSERT BUFFER AND ADAPTIVE HASH INDEX' 609 | => \&parse_insert_buffer_and_adaptive_hash_index, 610 | 'LATEST DETECTED DEADLOCK' => \&skip, 611 | 'LATEST FOREIGN KEY ERROR' => \&skip, 612 | 'LOG' => \&parse_log, 613 | 'ROW OPERATIONS' => \&parse_row_operations, 614 | 'SEMAPHORES' => \&parse_semaphores, 615 | 'TRANSACTIONS' => \&parse_transactions, 616 | 'BACKGROUND THREAD' => \&parse_background_thread, 617 | ); 618 | 619 | skip_heading(); 620 | for (;;) { 621 | m/\G(.*)\n/gc; 622 | my $sec = $1; 623 | 624 | last if $sec eq 'END OF INNODB MONITOR OUTPUT'; 625 | if ($sec eq 'DUMMY') { 626 | handle_incomplete_innodb_status(); 627 | last; 628 | } 629 | 630 | die "Unknown section: $1" unless exists $section_map{$sec}; 631 | die "Parse error. Expected a section separator" unless m/\G-+\n/gc; 632 | 633 | $section_map{$sec}->(); 634 | } 635 | } 636 | 637 | 638 | # This regular expression handles the different formating of 64-bit 639 | # integers in different versions of the innodb engine. Either two 640 | # decimal 32-bit integers seperated by a space, or a single 641 | # hexadecimal 64-bit integer. 642 | my $innodb_bigint_rx = qr{([[a-fA-F\d]+)(?: (\d+))?}; 643 | 644 | 645 | # Need the negative lookahead in match dashes because some times the 646 | # TRANSACTION section contains a line of only dashes (see 647 | # http://munin-monitoring.org/ticket/956): 648 | # 649 | # ------- TRX HAS BEEN WAITING 808 SEC FOR THIS LOCK TO BE GRANTED: 650 | # [...] 651 | # ------------------ 652 | # ---TRANSACTION 1 2450838625, ACTIVE 831 sec, OS thread id 27 fetching rows, thread declared inside InnoDB 104 653 | 654 | sub match_new_section { 655 | return m/\G 656 | -+\n # --------------------------- 657 | (?= [A-Z\/ ]+\n # SECTION NAME 658 | [=-]+\n)/gcx; # --------------------------- ('=' on end of output) 659 | } 660 | 661 | 662 | sub skip_line { return m/\G.*\n/gc; } 663 | 664 | 665 | sub skip_heading { 666 | # Heading is 6 lines 667 | for my $foo (1...6) { 668 | skip_line or die('Parse error'); 669 | } 670 | } 671 | 672 | 673 | sub parse_section { 674 | my ($parser) = @_; 675 | 676 | #warn substr($_, pos(), 10); 677 | for (;;) { 678 | return if match_new_section; 679 | next if $parser->(); 680 | skip_line(); 681 | } 682 | } 683 | 684 | 685 | sub skip { parse_section(sub {}); } 686 | 687 | 688 | sub parse_semaphores { 689 | parse_section( 690 | sub { 691 | m/\GMutex spin waits (\d+), rounds (\d+), OS waits (\d+)\n/gc && do { 692 | $data->{ib_spin_waits} = $1; 693 | $data->{ib_spin_rounds} = $2; 694 | $data->{ib_os_waits} = $3; 695 | return 1; 696 | }; 697 | m/\GRW-shared spins (\d+), rounds (\d+), OS waits (\d+)\n/gc && do { 698 | $data->{ib_rw_shared_waits} = $1; 699 | $data->{ib_rw_shared_rounds} = $2; 700 | $data->{ib_rw_shared_os_waits} = $3; 701 | return 1; 702 | }; 703 | m/\GRW-excl spins (\d+), rounds (\d+), OS waits (\d+)\n/gc && do { 704 | $data->{ib_rw_excl_waits} = $1; 705 | $data->{ib_rw_excl_rounds} = $2; 706 | $data->{ib_rw_excl_os_waits} = $3; 707 | return 1; 708 | }; 709 | } 710 | ); 711 | } 712 | 713 | 714 | sub parse_transactions { 715 | parse_section( 716 | sub { 717 | m/\GTrx id counter $innodb_bigint_rx\n/gc && do { 718 | $data->{ib_tnx} = innodb_bigint($1, $2); 719 | return 1; 720 | }; 721 | m/\GPurge done for trx's n:o < $innodb_bigint_rx undo n:o < $innodb_bigint_rx\n/gc && do { 722 | if (defined $3) { 723 | # old format 724 | $data->{ib_tnx_prg} = innodb_bigint($1, $2); 725 | # FIX add to data? innodb_bigint($3, $4); 726 | } 727 | else { 728 | # new format 729 | $data->{ib_tnx_prg} = innodb_bigint($1); 730 | # FIX add to data? innodb_bigint($2); 731 | } 732 | return 1; 733 | }; 734 | m/\GHistory list length (\d+)\n/gc && do { 735 | $data->{ib_tnx_hist} = $1; 736 | return 1; 737 | }; 738 | } 739 | ); 740 | 741 | } 742 | 743 | 744 | sub parse_file_io { 745 | parse_section( 746 | sub { 747 | m/\GPending normal aio reads: (\d+)(?: \[(?:\d+, )*\d+\] )?, aio writes: (\d+)(?: \[(?:\d+, )*\d+\] )?,\n\s*ibuf aio reads: (\d+), log i\/o's: (\d+), sync i\/o's: (\d+)\n/gc && do { 748 | $data->{ib_iop_aioread} = $1; 749 | $data->{ib_iop_aiowrite} = $2; 750 | $data->{ib_iop_ibuf_aio} = $3; 751 | $data->{ib_iop_log} = $4; 752 | $data->{ib_iop_sync} = $5; 753 | return 1; 754 | }; 755 | m/\GPending flushes \(fsync\) log: (\d+); buffer pool: (\d+)\n/gc && do { 756 | $data->{ib_iop_flush_log} = $1; 757 | $data->{ib_iop_flush_bpool} = $2; 758 | return 1; 759 | }; 760 | m/\G(\d+) OS file reads, (\d+) OS file writes, (\d+) OS fsyncs\n/gc && do { 761 | $data->{ib_io_read} = $1; 762 | $data->{ib_io_write} = $2; 763 | $data->{ib_io_fsync} = $3; 764 | return 1; 765 | }; 766 | } 767 | ); 768 | } 769 | 770 | 771 | sub parse_row_operations { 772 | parse_section( 773 | sub { 774 | m/\G(\d+) queries inside InnoDB, (\d+) queries in queue\n/gc && do { 775 | $data->{ib_innodb_queries} = $1; 776 | $data->{ib_innodb_query_queue_len} = $2; 777 | return 1; 778 | }; 779 | m/\G(\d+) read views open inside InnoDB\n/gc && do { 780 | $data->{ib_innodb_read_views} = $1; 781 | return 1; 782 | }; 783 | m/\G(\d+) transactions active inside InnoDB\n/gc && do { 784 | $data->{ib_innodb_transactions_active} = $1; 785 | return 1; 786 | }; 787 | m/\G(\d+) RW transactions active inside InnoDB\n/gc && do { 788 | $data->{ib_innodb_rw_transactions_active} = $1; 789 | return 1; 790 | }; 791 | m/\G(\d+) RO transactions active inside InnoDB\n/gc && do { 792 | $data->{ib_innodb_ro_transactions_active} = $1; 793 | return 1; 794 | }; 795 | m/\G(\d+) out of (\d+) descriptors used\n/gc && do { 796 | $data->{ib_innodb_descriptors} = $1; 797 | $data->{ib_innodb_descriptors_max} = $2; 798 | return 1; 799 | }; 800 | } 801 | ); 802 | } 803 | 804 | 805 | sub parse_insert_buffer_and_adaptive_hash_index { 806 | parse_section( 807 | sub { 808 | # MySQL < 5.5 809 | m/\G(\d+) inserts, (\d+) merged recs, (\d+) merges\n/gc && do { 810 | $data->{ib_ibuf_inserts} = $1; 811 | $data->{ib_ibuf_merged_rec} = $2; 812 | $data->{ib_ibuf_merges} = $3; 813 | return 1; 814 | }; 815 | # MySQL >= 5.5 816 | m/\Gmerged operations:\n insert (\d+), delete mark (\d+), delete (\d+)\ndiscarded operations:\n insert (\d+), delete mark (\d+), delete (\d+)\n/gc && do { 817 | $data->{ib_ibuf_inserts} = $1; 818 | $data->{ib_ibuf_delete_mark} = $2; 819 | $data->{ib_ibuf_delete} = $3; 820 | $data->{ib_ibuf_discard_inserts} = $4; 821 | $data->{ib_ibuf_discard_delete_mark} = $5; 822 | $data->{ib_ibuf_discard_delete} = $6; 823 | $data->{ib_ibuf_merged_rec} = $data->{ib_ibuf_inserts} + $data->{ib_ibuf_discard_inserts}; 824 | return 1; 825 | }; 826 | m/\GIbuf: size (\d+), free list len (\d+), seg size (\d+),(?: (\d+) merges)?\n/gc && do { 827 | $data->{ib_ibuf_size} = $1; 828 | $data->{ib_ibuf_free_len} = $2; 829 | $data->{ib_ibuf_seg_size} = $3; 830 | $data->{ib_ibuf_merges} = $4 if defined $4; # MySQL >= 5.5 831 | return 1; 832 | }; 833 | } 834 | ); 835 | } 836 | 837 | 838 | sub parse_log { 839 | parse_section( 840 | sub { 841 | m/\GLog sequence number $innodb_bigint_rx\n/gc && do { 842 | $data->{ib_log_written} = innodb_bigint_nohex($1, $2); 843 | return 1; 844 | }; 845 | m/\GLog flushed up to\s+$innodb_bigint_rx\n/gc && do { 846 | $data->{ib_log_flush} = innodb_bigint_nohex($1, $2); 847 | return 1; 848 | }; 849 | m/\GLast checkpoint at\s+$innodb_bigint_rx\n/gc && do { 850 | $data->{ib_log_checkpoint} = innodb_bigint_nohex($1, $2); 851 | return 1; 852 | }; 853 | m/\G(\d+) log i\/o's done.*\n/gc && do { 854 | $data->{ib_io_log} = $1; 855 | return 1; 856 | }; 857 | m/\GCheckpoint age\s+(\d+)/gc && do { 858 | $data->{ib_log_checkpt_age} = $1; 859 | return 1; 860 | }; 861 | } 862 | ); 863 | } 864 | 865 | sub parse_background_thread { 866 | parse_section( 867 | sub { 868 | m/\Gsrv_master_thread loops: \d+ 1_second, \d+ sleeps, \d+ 10_second, (\d+) background, (\d+) flush\n/gc && do { 869 | $data->{ib_srv_main_flush_loops} = $1; 870 | $data->{ib_srv_main_background_loops} = $2; 871 | return 1; 872 | }; 873 | m/\Gsrv_master_thread log flush and writes: (\d+)\n/gc && do { 874 | $data->{ib_srv_main_flushs_writes} = $1; 875 | return 1; 876 | }; 877 | } 878 | ); 879 | } 880 | 881 | sub parse_buffer_pool_and_memory { 882 | parse_section( 883 | sub { 884 | m/\GBuffer pool size\s+(\d+)\n/gc && do { 885 | $data->{ib_bpool_size} = $1; 886 | return 1; 887 | }; 888 | m/\GFree buffers\s+(\d+)\n/gc && do { 889 | $data->{ib_bpool_free} = $1; 890 | return 1; 891 | }; 892 | m/\GDatabase pages\s+(\d+)\n/gc && do { 893 | $data->{ib_bpool_dbpages} = $1; 894 | return 1; 895 | }; 896 | m/\GModified db pages\s+(\d+)\n/gc && do { 897 | $data->{ib_bpool_modpages} = $1; 898 | return 1; 899 | }; 900 | m/\GOld database pages\s+(\d+)\n/gc && do { 901 | $data->{ib_bpool_oldpages} = $1; 902 | return 1; 903 | }; 904 | m/\GPages made young (\d+), not young (\d+)\n/gc && do { 905 | $data->{ib_bpool_made_young} = $1; 906 | $data->{ib_bpool_made_not_young} = $2; 907 | return 1; 908 | }; 909 | m/\GPages read (\d+), created (\d+), written (\d+)\n/gc && do { 910 | $data->{ib_bpool_read} = $1; 911 | $data->{ib_bpool_created} = $2; 912 | $data->{ib_bpool_written} = $3; 913 | return 1; 914 | }; 915 | m/\GInternal hash tables \(constant factor \+ variable factor\)\n\s*Adaptive hash index\s*(\d+)\s*\((\d+) \+ (\d+)\) *\n\s+Page hash +(\d+) +\(buffer pool \d+ only\) *\n\s+Dictionary cache\s*(\d+)\s+\((\d+) \+ (\d+)\) *\n\s+File system\s+(\d+)\s+\((\d+) \+ (\d+)\) *\n\s+Lock system\s+(\d+)\s+\((\d+) \+ (\d+)\) *\n\s+Recovery system\s*(\d+)\s+\((\d+) \+ (\d+)\) *\n/gc 916 | && do { 917 | $data->{ib_bpool_internal_adaptive_hash_size_total} = $1; 918 | $data->{ib_bpool_internal_adaptive_hash_size_const} = $2; 919 | $data->{ib_bpool_internal_adaptive_hash_size_var} = $3; 920 | $data->{ib_bpool_internal_page_hash_size_total} = $4; 921 | $data->{ib_bpool_internal_dictionary_cache_size_total} = $5; 922 | $data->{ib_bpool_internal_dictionary_cache_size_const} = $6; 923 | $data->{ib_bpool_internal_dictionary_cache_size_var} = $7; 924 | $data->{ib_bpool_internal_file_system_size_total} = $8; 925 | $data->{ib_bpool_internal_file_system_size_const} = $9; 926 | $data->{ib_bpool_internal_file_system_size_var} = $10; 927 | $data->{ib_bpool_internal_lock_system_size_total} = $11; 928 | $data->{ib_bpool_internal_lock_system_size_const} = $12; 929 | $data->{ib_bpool_internal_lock_system_size_var} = $13; 930 | $data->{ib_bpool_internal_recovery_system_size_total} = $14; 931 | $data->{ib_bpool_internal_recovery_system_size_const} = $15; 932 | $data->{ib_bpool_internal_recovery_system_size_var} = $16; 933 | return 1; 934 | }; 935 | } 936 | ); 937 | } 938 | 939 | sub parse_individual_buffer_pool { 940 | parse_section( 941 | sub { 942 | m/\G---BUFFER POOL (\d+)\n/gc && do { 943 | my $pool = $1; 944 | $data->{ib_bpool_individual_pool_count} = $pool + 1; 945 | m/\GBuffer pool size\s+(\d+)\n/gc && do { 946 | $data->{"ib_bpool_individual_pool_${pool}_size"} = $1; 947 | }; 948 | m/\GBuffer pool size, bytes\s+(\d+)\n/gc && do { 949 | $data->{"ib_bpool_individual_pool_${pool}_size_bytes"} = $1; 950 | }; 951 | m/\GFree buffers\s+(\d+)\nDatabase pages\s+(\d+)\nOld database pages\s+(\d+)\nModified db pages\s+(\d+)\nPending reads\s+(\d+)\nPending writes: LRU\s+(\d+), flush list\s+(\d+), single page\s+(\d+)\n/gc && do { 952 | $data->{"ib_bpool_individual_pool_${pool}_free"} = $1; 953 | $data->{"ib_bpool_individual_pool_${pool}_dbpages"} = $2; 954 | $data->{"ib_bpool_individual_pool_${pool}_oldpages"} = $3; 955 | $data->{"ib_bpool_individual_pool_${pool}_modpages"} = $4; 956 | $data->{"ib_bpool_individual_pool_${pool}_pending_reads"} = $5; 957 | $data->{"ib_bpool_individual_pool_${pool}_pending_writes_lru"} = $6; 958 | $data->{"ib_bpool_individual_pool_${pool}_pending_writes_flush"} = $7; 959 | $data->{"ib_bpool_individual_pool_${pool}_pending_writes_single"} = $8; 960 | }; 961 | skip_line(); 962 | m/\GPages read (\d+), created (\d+), written (\d+)\n/gc && do { 963 | $data->{"ib_bpool_individual_pool_${pool}_read"} = $1; 964 | $data->{"ib_bpool_individual_pool_${pool}_created"} = $2; 965 | $data->{"ib_bpool_individual_pool_${pool}_written"} = $3; 966 | }; 967 | return 1; 968 | }; 969 | } 970 | ); 971 | } 972 | 973 | sub handle_incomplete_innodb_status { 974 | 975 | warn "Output from SHOW ENGINE INNODB STATUS was truncated. " 976 | . "This happens if the output of SEIS exceeds 64KB. " 977 | . "Several of the InnoDB graphs might be affected by this." 978 | . "You can use innotop to fix this issue by pressing 'D' " 979 | . "to enter deadlock mode and then 'w' to wipe the deadlocks."; 980 | 981 | # FIX Is it possible to find some of the missing values from SHOW 982 | # STATUS? 983 | } 984 | 985 | 986 | exit main() unless caller; 987 | 988 | 989 | 1; 990 | 991 | -------------------------------------------------------------------------------- /mysql.conf: -------------------------------------------------------------------------------- 1 | [mysql] 2 | 3 | # For valid values see the documentation for perl DBI (run 'perldoc 4 | # DBI' or browse 5 | # .) 6 | # 7 | # Add host and possibly port number for non local connections. 8 | # 9 | # env.mysqlconnection DBI:mysql:mysql;host=foo.example.com;port=5566 10 | # 11 | env.mysqlconnection DBI:mysql:mysql 12 | 13 | # The username that munin should use to connect. The user 14 | # will typically need the SUPER privilege. 15 | # 16 | env.mysqluser root 17 | 18 | # To connect with a password, uncomment and edit the next line. For a 19 | # passwordless login (not recommended), leave it as it is. 20 | # 21 | # env.mysqlpassword geheim 22 | 23 | -------------------------------------------------------------------------------- /t/config.out: -------------------------------------------------------------------------------- 1 | Aborted_clients.draw LINE1 2 | Aborted_clients.info The number of connections that were aborted because the client died without closing the connection properly. 3 | Aborted_clients.label Aborted clients 4 | Aborted_clients.min 0 5 | Aborted_clients.type DERIVE 6 | Aborted_connects.draw LINE1 7 | Aborted_connects.info The number of failed attempts to connect to the MySQL server. 8 | Aborted_connects.label Aborted connects 9 | Aborted_connects.min 0 10 | Aborted_connects.type DERIVE 11 | Binlog_cache_disk_use.draw LINE1 12 | Binlog_cache_disk_use.info The number of transactions that used the temporary binary log cache but that exceeded the value of binlog_cache_size and used a temporary file to store statements from the transaction. 13 | Binlog_cache_disk_use.label Binlog Cache Disk Use 14 | Binlog_cache_disk_use.min 0 15 | Binlog_cache_disk_use.type DERIVE 16 | Binlog_cache_use.draw LINE1 17 | Binlog_cache_use.info The number of transactions that used the temporary binary log cache. 18 | Binlog_cache_use.label Binlog Cache Use 19 | Binlog_cache_use.min 0 20 | Binlog_cache_use.type DERIVE 21 | Binlog_commits.draw LINE1 22 | Binlog_commits.info The number of transactions committed to the binary log 23 | Binlog_commits.label Binlog commits 24 | Binlog_commits.min 0 25 | Binlog_commits.type DERIVE 26 | Binlog_group_commit_trigger_count.draw LINE1 27 | Binlog_group_commit_trigger_count.info Group commits triggered by count 28 | Binlog_group_commit_trigger_count.label Triggered by count 29 | Binlog_group_commit_trigger_count.min 0 30 | Binlog_group_commit_trigger_count.type DERIVE 31 | Binlog_group_commit_trigger_lock_wait.draw LINE1 32 | Binlog_group_commit_trigger_lock_wait.info Group commits triggered by lock_wait 33 | Binlog_group_commit_trigger_lock_wait.label Triggered by lock_wait 34 | Binlog_group_commit_trigger_lock_wait.min 0 35 | Binlog_group_commit_trigger_lock_wait.type DERIVE 36 | Binlog_group_commit_trigger_timeout.draw LINE1 37 | Binlog_group_commit_trigger_timeout.info Group commits triggered by timeout 38 | Binlog_group_commit_trigger_timeout.label Triggered by timeout 39 | Binlog_group_commit_trigger_timeout.min 0 40 | Binlog_group_commit_trigger_timeout.type DERIVE 41 | Binlog_group_commits.draw LINE1 42 | Binlog_group_commits.info The number of group commits done to the binary log 43 | Binlog_group_commits.label Binlog group commits 44 | Binlog_group_commits.min 0 45 | Binlog_group_commits.type DERIVE 46 | Binlog_stmt_cache_disk_use.draw LINE1 47 | Binlog_stmt_cache_disk_use.label Binlog Statement Cache Disk Use 48 | Binlog_stmt_cache_disk_use.min 0 49 | Binlog_stmt_cache_disk_use.type DERIVE 50 | Binlog_stmt_cache_use.draw LINE1 51 | Binlog_stmt_cache_use.label Binlog Statement Cache Use 52 | Binlog_stmt_cache_use.min 0 53 | Binlog_stmt_cache_use.type DERIVE 54 | Bytes_received.draw LINE1 55 | Bytes_received.graph no 56 | Bytes_received.info The number of bytes received from all clients. 57 | Bytes_received.label Bytes transfered 58 | Bytes_received.min 0 59 | Bytes_received.type DERIVE 60 | Bytes_sent.draw LINE1 61 | Bytes_sent.info The number of bytes sent to all clients. 62 | Bytes_sent.label Bytes transfered 63 | Bytes_sent.min 0 64 | Bytes_sent.negative Bytes_received 65 | Bytes_sent.type DERIVE 66 | Com_delete.colour FF7D00 67 | Com_delete.draw AREASTACK 68 | Com_delete.label Delete 69 | Com_delete.min 0 70 | Com_delete.type DERIVE 71 | Com_delete_multi.colour 942D0C 72 | Com_delete_multi.draw AREASTACK 73 | Com_delete_multi.label Delete multi 74 | Com_delete_multi.min 0 75 | Com_delete_multi.type DERIVE 76 | Com_insert.colour FFF200 77 | Com_insert.draw AREASTACK 78 | Com_insert.label Insert 79 | Com_insert.min 0 80 | Com_insert.type DERIVE 81 | Com_insert_select.colour AAABA1 82 | Com_insert_select.draw AREASTACK 83 | Com_insert_select.label Insert select 84 | Com_insert_select.min 0 85 | Com_insert_select.type DERIVE 86 | Com_load.colour 55009D 87 | Com_load.draw AREASTACK 88 | Com_load.label Load Data 89 | Com_load.min 0 90 | Com_load.type DERIVE 91 | Com_replace.colour 2175D9 92 | Com_replace.draw AREASTACK 93 | Com_replace.label Replace 94 | Com_replace.min 0 95 | Com_replace.type DERIVE 96 | Com_replace_select.colour 00B99B 97 | Com_replace_select.draw AREASTACK 98 | Com_replace_select.label Replace select 99 | Com_replace_select.min 0 100 | Com_replace_select.type DERIVE 101 | Com_select.colour FF0000 102 | Com_select.draw AREASTACK 103 | Com_select.label Select 104 | Com_select.min 0 105 | Com_select.type DERIVE 106 | Com_update.colour 00CF00 107 | Com_update.draw AREASTACK 108 | Com_update.label Update 109 | Com_update.min 0 110 | Com_update.type DERIVE 111 | Com_update_multi.colour D8ACE0 112 | Com_update_multi.draw AREASTACK 113 | Com_update_multi.label Update multi 114 | Com_update_multi.min 0 115 | Com_update_multi.type DERIVE 116 | Connections.draw LINE1 117 | Connections.info The number of connection attempts (successful or not) to the MySQL server. 118 | Connections.label New connections 119 | Connections.min 0 120 | Connections.type DERIVE 121 | Created_tmp_disk_tables.draw LINE1 122 | Created_tmp_disk_tables.info The number of internal on-disk temporary tables created by the server while executing statements. 123 | Created_tmp_disk_tables.label Temp disk tables 124 | Created_tmp_disk_tables.min 0 125 | Created_tmp_disk_tables.type DERIVE 126 | Created_tmp_files.draw LINE1 127 | Created_tmp_files.info How many temporary files mysqld has created. 128 | Created_tmp_files.label Temp files 129 | Created_tmp_files.min 0 130 | Created_tmp_files.type DERIVE 131 | Created_tmp_tables.draw LINE1 132 | Created_tmp_tables.info The number of internal temporary tables created by the server while executing statements. 133 | Created_tmp_tables.label Temp tables 134 | Created_tmp_tables.min 0 135 | Created_tmp_tables.type DERIVE 136 | Handler_delete.colour BDB8B3 137 | Handler_delete.draw AREASTACK 138 | Handler_delete.info The number of requests to delete a row in a table. 139 | Handler_delete.label Handler delete 140 | Handler_delete.min 0 141 | Handler_delete.type DERIVE 142 | Handler_read_first.colour 8C286E 143 | Handler_read_first.draw AREASTACK 144 | Handler_read_first.info The number of times the first entry was read from an index. If this is high, it suggests that the server is doing a lot of full index scans. 145 | Handler_read_first.label Handler Read First 146 | Handler_read_first.min 0 147 | Handler_read_first.type DERIVE 148 | Handler_read_key.colour BAB27F 149 | Handler_read_key.draw AREASTACK 150 | Handler_read_key.info The number of requests to read a row based on a key. If this is high, it is a good indication that your queries and tables are properly indexed. 151 | Handler_read_key.label Handler Read Key 152 | Handler_read_key.min 0 153 | Handler_read_key.type DERIVE 154 | Handler_read_next.colour C02942 155 | Handler_read_next.draw AREASTACK 156 | Handler_read_next.info The number of requests to read the next row in key order. This is incremented if you are querying an index column with a range constraint or if you are doing an index scan. 157 | Handler_read_next.label Handler Read Next 158 | Handler_read_next.min 0 159 | Handler_read_next.type DERIVE 160 | Handler_read_prev.colour FA6900 161 | Handler_read_prev.draw AREASTACK 162 | Handler_read_prev.info The number of requests to read the previous row in key order. This read method is mainly used to optimize ORDER BY ... DESC. 163 | Handler_read_prev.label Handler Read Prev 164 | Handler_read_prev.min 0 165 | Handler_read_prev.type DERIVE 166 | Handler_read_rnd.colour 5A3D31 167 | Handler_read_rnd.draw AREASTACK 168 | Handler_read_rnd.info The number of requests to read a row based on a fixed position. This is high if you are doing a lot of queries that require sorting of the result. You probably have a lot of queries that require MySQL to scan whole tables or you have joins that don't use keys properly. 169 | Handler_read_rnd.label Handler Read Random 170 | Handler_read_rnd.min 0 171 | Handler_read_rnd.type DERIVE 172 | Handler_read_rnd_next.colour 69D2E7 173 | Handler_read_rnd_next.draw AREASTACK 174 | Handler_read_rnd_next.info RThe number of requests to read the next row in the data file. This is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have. 175 | Handler_read_rnd_next.label Handler Read Random Next 176 | Handler_read_rnd_next.min 0 177 | Handler_read_rnd_next.type DERIVE 178 | Handler_update.colour C79F71 179 | Handler_update.draw AREASTACK 180 | Handler_update.info The number of requests to update a row in a table. 181 | Handler_update.label Handler update 182 | Handler_update.min 0 183 | Handler_update.type DERIVE 184 | Handler_write.colour 4D4A47 185 | Handler_write.draw AREASTACK 186 | Handler_write.info The number of requests to insert a row in a table. 187 | Handler_write.label Handler write 188 | Handler_write.min 0 189 | Handler_write.type DERIVE 190 | Innodb_lsn_current.draw LINE1 191 | Innodb_lsn_current.info Log sequence number as shown in the LOG section of the SHOW ENGINE INNODB STATUS output. 192 | Innodb_lsn_current.label Current 193 | Innodb_lsn_current.min 0 194 | Innodb_lsn_current.type DERIVE 195 | Innodb_lsn_flushed.draw LINE1 196 | Innodb_lsn_flushed.info Flushed up to log sequence number as shown in the LOG section of the SHOW ENGINE INNODB 197 | Innodb_lsn_flushed.label Flushed 198 | Innodb_lsn_flushed.min 0 199 | Innodb_lsn_flushed.type DERIVE 200 | Innodb_lsn_last_checkpoint.draw LINE1 201 | Innodb_lsn_last_checkpoint.info Log sequence number last checkpoint as shown in the LOG section of the SHOW ENGINE INNODB STATUS output. 202 | Innodb_lsn_last_checkpoint.label Last checkpoint 203 | Innodb_lsn_last_checkpoint.min 0 204 | Innodb_lsn_last_checkpoint.type DERIVE 205 | Innodb_master_thread_active_loops.draw AREASTACK 206 | Innodb_master_thread_active_loops.label Active Loops 207 | Innodb_master_thread_active_loops.min 0 208 | Innodb_master_thread_active_loops.type DERIVE 209 | Innodb_master_thread_idle_loops.draw AREASTACK 210 | Innodb_master_thread_idle_loops.label Idle Loops 211 | Innodb_master_thread_idle_loops.min 0 212 | Innodb_master_thread_idle_loops.type DERIVE 213 | Innodb_rows_deleted.draw AREASTACK 214 | Innodb_rows_deleted.info The number of rows deleted from InnoDB tables. 215 | Innodb_rows_deleted.label Deletes 216 | Innodb_rows_deleted.min 0 217 | Innodb_rows_deleted.type DERIVE 218 | Innodb_rows_inserted.draw AREASTACK 219 | Innodb_rows_inserted.info The number of rows inserted into InnoDB tables. 220 | Innodb_rows_inserted.label Inserts 221 | Innodb_rows_inserted.min 0 222 | Innodb_rows_inserted.type DERIVE 223 | Innodb_rows_read.draw AREASTACK 224 | Innodb_rows_read.info The number of rows read from InnoDB tables. 225 | Innodb_rows_read.label Reads 226 | Innodb_rows_read.min 0 227 | Innodb_rows_read.type DERIVE 228 | Innodb_rows_updated.draw AREASTACK 229 | Innodb_rows_updated.info The number of rows updated in InnoDB tables. 230 | Innodb_rows_updated.label Updates 231 | Innodb_rows_updated.min 0 232 | Innodb_rows_updated.type DERIVE 233 | Key_buf_unflush.colour FECEA8 234 | Key_buf_unflush.draw AREA 235 | Key_buf_unflush.label Key buffer bytes unflushed 236 | Key_buf_unflush.min 0 237 | Key_buf_unflush.type GAUGE 238 | Key_buf_unused.colour 2A363B 239 | Key_buf_unused.draw AREA 240 | Key_buf_unused.label Key buffer bytes unused 241 | Key_buf_unused.min 0 242 | Key_buf_unused.type GAUGE 243 | Key_read_requests.colour 008800 244 | Key_read_requests.draw AREA 245 | Key_read_requests.info The number of requests to read a key block from the cache. 246 | Key_read_requests.label Key read requests 247 | Key_read_requests.min 0 248 | Key_read_requests.type DERIVE 249 | Key_reads.colour 00FF00 250 | Key_reads.draw LINE1 251 | Key_reads.info The number of physical reads of a key block from disk. 252 | Key_reads.label Key reads 253 | Key_reads.min 0 254 | Key_reads.type DERIVE 255 | Key_write_requests.cdef Key_write_requests,-1,* 256 | Key_write_requests.colour 880000 257 | Key_write_requests.draw AREA 258 | Key_write_requests.info The number of requests to write a key block to the cache. 259 | Key_write_requests.label Key write requests 260 | Key_write_requests.type DERIVE 261 | Key_writes.cdef Key_writes,-1,* 262 | Key_writes.colour FF0000 263 | Key_writes.draw LINE1 264 | Key_writes.info The number of physical writes of a key block to disk. 265 | Key_writes.label Key writes 266 | Key_writes.type DERIVE 267 | Max_used_connections.colour ffd660 268 | Max_used_connections.draw AREA 269 | Max_used_connections.info The maximum number of connections that have been in use simultaneously since the server started. 270 | Max_used_connections.label Max used 271 | Max_used_connections.min 0 272 | Max_used_connections.type GAUGE 273 | Open_files.draw LINE1 274 | Open_files.info The number of files that are open. 275 | Open_files.label Open files 276 | Open_files.min 0 277 | Open_files.type GAUGE 278 | Open_table_definitions.draw LINE1 279 | Open_table_definitions.info Number of currently cached .frm files. 280 | Open_table_definitions.label Open table definitions 281 | Open_table_definitions.min 0 282 | Open_table_definitions.type GAUGE 283 | Open_tables.draw LINE1 284 | Open_tables.info The number of tables that are open. 285 | Open_tables.label Open tables 286 | Open_tables.min 0 287 | Open_tables.type GAUGE 288 | Opened_table_definitions.draw LINE1 289 | Opened_table_definitions.info Number of .frm files that have been cached. 290 | Opened_table_definitions.label Opened table definitions 291 | Opened_table_definitions.min 0 292 | Opened_table_definitions.type DERIVE 293 | Opened_tables.draw LINE1 294 | Opened_tables.info The number of tables that have been opened. 295 | Opened_tables.label Opened tables 296 | Opened_tables.min 0 297 | Opened_tables.type DERIVE 298 | Opened_views.draw LINE1 299 | Opened_views.info The number of views that have been opened. 300 | Opened_views.label Opened Views 301 | Opened_views.min 0 302 | Opened_views.type DERIVE 303 | Qcache_avg_rslt_size.draw AREA 304 | Qcache_avg_rslt_size.info The average result size. 305 | Qcache_avg_rslt_size.label Average result size 306 | Qcache_avg_rslt_size.min 0 307 | Qcache_avg_rslt_size.type GAUGE 308 | Qcache_free_blocks.draw AREA 309 | Qcache_free_blocks.info The number of free blocks in memory 310 | Qcache_free_blocks.label Free blocks 311 | Qcache_free_blocks.min 0 312 | Qcache_free_blocks.type GAUGE 313 | Qcache_free_memory.draw AREA 314 | Qcache_free_memory.info The amount of free memory for the query cache. 315 | Qcache_free_memory.label Free mem 316 | Qcache_free_memory.min 0 317 | Qcache_free_memory.type GAUGE 318 | Qcache_hits.draw LINE1 319 | Qcache_hits.info The number of query cache hits. 320 | Qcache_hits.label Cache hits 321 | Qcache_hits.min 0 322 | Qcache_hits.type DERIVE 323 | Qcache_inserts.draw LINE1 324 | Qcache_inserts.info The number of queries added to the query cache. 325 | Qcache_inserts.label Inserts 326 | Qcache_inserts.min 0 327 | Qcache_inserts.type DERIVE 328 | Qcache_invalidations.draw LINE1 329 | Qcache_invalidations.info The number of query cache invalidations. 330 | Qcache_invalidations.label Invalidations 331 | Qcache_invalidations.min 0 332 | Qcache_invalidations.type DERIVE 333 | Qcache_lowmem_prunes.draw LINE1 334 | Qcache_lowmem_prunes.info The number of queries that were deleted from the query cache because of low memory. 335 | Qcache_lowmem_prunes.label Low-memory prunes 336 | Qcache_lowmem_prunes.min 0 337 | Qcache_lowmem_prunes.type DERIVE 338 | Qcache_not_cached.draw LINE1 339 | Qcache_not_cached.info The number of noncached queries (not cacheable, or not cached due to the query_cache_type setting). 340 | Qcache_not_cached.label Not cached 341 | Qcache_not_cached.min 0 342 | Qcache_not_cached.type DERIVE 343 | Qcache_queries_in_cache.cdef Qcache_queries_in_cache,1024,/ 344 | Qcache_queries_in_cache.draw LINE1 345 | Qcache_queries_in_cache.info The number of queries registered in the query cache. 346 | Qcache_queries_in_cache.label Queries in cache (K) 347 | Qcache_queries_in_cache.min 0 348 | Qcache_queries_in_cache.type GAUGE 349 | Qcache_total_blocks.draw AREA 350 | Qcache_total_blocks.info The number of total blocks 351 | Qcache_total_blocks.label Total blocks 352 | Qcache_total_blocks.min 0 353 | Qcache_total_blocks.type GAUGE 354 | Select_full_join.colour FF0000 355 | Select_full_join.draw AREASTACK 356 | Select_full_join.info The number of joins that perform table scans because they do not use indexes. 357 | Select_full_join.label Full join 358 | Select_full_join.min 0 359 | Select_full_join.type DERIVE 360 | Select_full_range_join.colour FF7D00 361 | Select_full_range_join.draw AREASTACK 362 | Select_full_range_join.info The number of joins that used a range search on a reference table. 363 | Select_full_range_join.label Full range 364 | Select_full_range_join.min 0 365 | Select_full_range_join.type DERIVE 366 | Select_range.colour FFF200 367 | Select_range.draw AREASTACK 368 | Select_range.info The number of joins that used ranges on the first table. 369 | Select_range.label Range 370 | Select_range.min 0 371 | Select_range.type DERIVE 372 | Select_range_check.colour 7DFF7D 373 | Select_range_check.draw AREASTACK 374 | Select_range_check.info The number of joins without keys that check for key usage after each row. 375 | Select_range_check.label Range check 376 | Select_range_check.min 0 377 | Select_range_check.type DERIVE 378 | Select_scan.colour 7D7DFF 379 | Select_scan.draw AREASTACK 380 | Select_scan.info The number of joins that did a full scan of the first table. 381 | Select_scan.label Scan 382 | Select_scan.min 0 383 | Select_scan.type DERIVE 384 | Slave_open_temp_tables.draw LINE1 385 | Slave_open_temp_tables.draw LINE1 386 | Slave_open_temp_tables.info The number of temporary tables that the slave SQL thread currently has open. 387 | Slave_open_temp_tables.info The number of temporary tables that the slave SQL thread currently has open. 388 | Slave_open_temp_tables.label Open Slave Temp Tables 389 | Slave_open_temp_tables.label Open Temp Tables 390 | Slave_open_temp_tables.min 0 391 | Slave_open_temp_tables.min 0 392 | Slave_open_temp_tables.type DERIVE 393 | Slave_open_temp_tables.type GAUGE 394 | Slave_retried_transactions.draw LINE1 395 | Slave_retried_transactions.info The total number of times since startup that the replication slave SQL thread has retried transactions. 396 | Slave_retried_transactions.label Retried Transactions 397 | Slave_retried_transactions.min 0 398 | Slave_retried_transactions.type DERIVE 399 | Slow_queries.draw LINE1 400 | Slow_queries.info The number of queries that have taken more than long_query_time seconds. 401 | Slow_queries.label Slow queries 402 | Slow_queries.min 0 403 | Slow_queries.type DERIVE 404 | Sort_merge_passes.colour 7D0000 405 | Sort_merge_passes.draw LINE1 406 | Sort_merge_passes.info The number of merge passes that the sort algorithm has had to do. 407 | Sort_merge_passes.label Merge passes 408 | Sort_merge_passes.min 0 409 | Sort_merge_passes.type DERIVE 410 | Sort_range.colour 007D00 411 | Sort_range.draw LINE1 412 | Sort_range.info The number of sorts that were done using ranges. 413 | Sort_range.label Range 414 | Sort_range.min 0 415 | Sort_range.type DERIVE 416 | Sort_rows.cdef Sort_rows,1024,/ 417 | Sort_rows.colour FF7D00 418 | Sort_rows.draw AREA 419 | Sort_rows.info The number of sorted rows. 420 | Sort_rows.label Rows sorted (K) 421 | Sort_rows.min 0 422 | Sort_rows.type DERIVE 423 | Sort_scan.colour 0000D0 424 | Sort_scan.draw LINE1 425 | Sort_scan.info The number of sorts that were done by scanning the table. 426 | Sort_scan.label Scan 427 | Sort_scan.min 0 428 | Sort_scan.type DERIVE 429 | State_closing_tables.colour DE0056 430 | State_closing_tables.draw AREASTACK 431 | State_closing_tables.info The thread is flushing the changed table data to disk and closing the used tables. 432 | State_closing_tables.label Closing tables 433 | State_closing_tables.min 0 434 | State_closing_tables.type DERIVE 435 | State_copying_to_tmp_table.colour 784890 436 | State_copying_to_tmp_table.draw AREASTACK 437 | State_copying_to_tmp_table.info The thread is processing an ALTER TABLE statement. This state occurs after the table with the new structure has been created but before rows are copied into it. 438 | State_copying_to_tmp_table.label Copying to tmp table 439 | State_copying_to_tmp_table.min 0 440 | State_copying_to_tmp_table.type DERIVE 441 | State_end.colour D1642E 442 | State_end.draw AREASTACK 443 | State_end.info This occurs at the end but before the cleanup of ALTER TABLE, CREATE VIEW, DELETE, INSERT, SELECT, or UPDATE statements. 444 | State_end.label End 445 | State_end.min 0 446 | State_end.type DERIVE 447 | State_freeing_items.colour 487860 448 | State_freeing_items.draw AREASTACK 449 | State_freeing_items.info The thread has executed a command. This state is usually followed by cleaning up. 450 | State_freeing_items.label Freeing items 451 | State_freeing_items.min 0 452 | State_freeing_items.type DERIVE 453 | State_init.colour 907890 454 | State_init.draw AREASTACK 455 | State_init.info This occurs before the initialization of ALTER TABLE, DELETE, INSERT, SELECT, or UPDATE statements. 456 | State_init.label Init 457 | State_init.min 0 458 | State_init.type DERIVE 459 | State_locked.colour DE0056 460 | State_locked.draw AREASTACK 461 | State_locked.info The query is locked by another query. 462 | State_locked.label Locked 463 | State_locked.min 0 464 | State_locked.type DERIVE 465 | State_login.colour 1693A7 466 | State_login.draw AREASTACK 467 | State_login.info The initial state for a connection thread until the client has been authenticated successfully. 468 | State_login.label Login 469 | State_login.min 0 470 | State_login.type DERIVE 471 | State_none.colour 521808 472 | State_none.draw AREASTACK 473 | State_none.label None 474 | State_none.min 0 475 | State_none.type DERIVE 476 | State_other.colour 194240 477 | State_other.draw AREASTACK 478 | State_other.label Other 479 | State_other.min 0 480 | State_other.type DERIVE 481 | State_preparing.colour 783030 482 | State_preparing.draw AREASTACK 483 | State_preparing.info This state occurs during query optimization. 484 | State_preparing.label Preparing 485 | State_preparing.min 0 486 | State_preparing.type DERIVE 487 | State_reading_from_net.colour FF7F00 488 | State_reading_from_net.draw AREASTACK 489 | State_reading_from_net.info The server is reading a packet from the network. 490 | State_reading_from_net.label Reading from net 491 | State_reading_from_net.min 0 492 | State_reading_from_net.type DERIVE 493 | State_sending_data.colour 54382A 494 | State_sending_data.draw AREASTACK 495 | State_sending_data.info The thread is processing rows for a SELECT statement and also is sending data to the client. 496 | State_sending_data.label Sending data 497 | State_sending_data.min 0 498 | State_sending_data.type DERIVE 499 | State_sorting_result.colour B83A04 500 | State_sorting_result.draw AREASTACK 501 | State_sorting_result.info For a SELECT statement, this is similar to Creating sort index, but for nontemporary tables. 502 | State_sorting_result.label Sorting result 503 | State_sorting_result.min 0 504 | State_sorting_result.type DERIVE 505 | State_statistics.colour 6E3803 506 | State_statistics.draw AREASTACK 507 | State_statistics.info The server is calculating statistics to develop a query execution plan. If a thread is in this state for a long time, the server is probably disk-bound performing other work. 508 | State_statistics.label Statistics 509 | State_statistics.min 0 510 | State_statistics.type DERIVE 511 | State_system_lock.colour c564a4 512 | State_system_lock.draw AREASTACK 513 | State_system_lock.info Requesting or waiting for a table system lock. 514 | State_system_lock.label System lock 515 | State_system_lock.min 0 516 | State_system_lock.type DERIVE 517 | State_table_lock.colour 151414 518 | State_table_lock.draw AREASTACK 519 | State_table_lock.info About to request an internal table lock after acquiring an external lock. Follows from System lock. 520 | State_table_lock.label Table lock 521 | State_table_lock.min 0 522 | State_table_lock.type DERIVE 523 | State_updating.colour B56414 524 | State_updating.draw AREASTACK 525 | State_updating.info The thread is searching for rows to update and is updating them. 526 | State_updating.label Updating 527 | State_updating.min 0 528 | State_updating.type DERIVE 529 | State_writing_to_net.colour 6E645A 530 | State_writing_to_net.draw AREASTACK 531 | State_writing_to_net.info The server is writing a packet to the network. 532 | State_writing_to_net.label Writing to net 533 | State_writing_to_net.min 0 534 | State_writing_to_net.type DERIVE 535 | Table_locks_immediate.draw LINE1 536 | Table_locks_immediate.info The number of times that a request for a table lock could be granted immediately. 537 | Table_locks_immediate.label Table locks immed 538 | Table_locks_immediate.min 0 539 | Table_locks_immediate.type DERIVE 540 | Table_locks_waited.draw LINE1 541 | Table_locks_waited.info The number of times that a request for a table lock could not be granted immediately and a wait was needed. 542 | Table_locks_waited.label Table locks waited 543 | Table_locks_waited.min 0 544 | Table_locks_waited.type DERIVE 545 | Threads_connected.colour 7777ff 546 | Threads_connected.draw LINE1 547 | Threads_connected.draw LINE1 548 | Threads_connected.info The number of currently open connections 549 | Threads_connected.info The number of open connections. 550 | Threads_connected.label Threads connected 551 | Threads_connected.label Threads connected 552 | Threads_connected.min 0 553 | Threads_connected.min 0 554 | Threads_connected.type GAUGE 555 | Threads_connected.type GAUGE 556 | Threads_created.colour 0000ff 557 | Threads_created.draw LINE1 558 | Threads_created.info The number of threads created to handle connections 559 | Threads_created.label Threads created 560 | Threads_created.min 0 561 | Threads_created.type GAUGE 562 | Threads_running.colour 7d0000 563 | Threads_running.draw LINE1 564 | Threads_running.draw LINE1 565 | Threads_running.info Number of threads that are actively running, not sleeping. 566 | Threads_running.info The number of threads that are not sleeping 567 | Threads_running.label Threads running 568 | Threads_running.label Threads running 569 | Threads_running.min 0 570 | Threads_running.min 0 571 | Threads_running.type GAUGE 572 | Threads_running.type GAUGE 573 | Uptime_days.draw AREA 574 | Uptime_days.info Server uptime in days. 575 | Uptime_days.label Uptime 576 | Uptime_days.min 0 577 | Uptime_days.type GAUGE 578 | graph_args --base 1000 --no-gridfit --slope-mode 579 | graph_args --base 1000 --no-gridfit --slope-mode 580 | graph_args --base 1000 --no-gridfit --slope-mode 581 | graph_args --base 1000 --no-gridfit --slope-mode 582 | graph_args --base 1000 --no-gridfit --slope-mode 583 | graph_args --base 1000 --no-gridfit --slope-mode 584 | graph_args --base 1000 --no-gridfit --slope-mode 585 | graph_args --base 1000 --no-gridfit --slope-mode 586 | graph_args --base 1000 --no-gridfit --slope-mode 587 | graph_args --base 1000 --no-gridfit --slope-mode 588 | graph_args --base 1000 --no-gridfit --slope-mode 589 | graph_args --base 1000 --no-gridfit --slope-mode 590 | graph_args --base 1000 --no-gridfit --slope-mode 591 | graph_args --base 1000 --no-gridfit --slope-mode 592 | graph_args --base 1000 --no-gridfit --slope-mode 593 | graph_args --base 1000 --no-gridfit --slope-mode 594 | graph_args --base 1000 --no-gridfit --slope-mode 595 | graph_args --base 1000 --no-gridfit --slope-mode 596 | graph_args --base 1000 --no-gridfit --slope-mode 597 | graph_args --base 1000 --no-gridfit --slope-mode 598 | graph_args --base 1000 --no-gridfit --slope-mode 599 | graph_args --base 1000 --no-gridfit --slope-mode 600 | graph_args --base 1000 --no-gridfit --slope-mode 601 | graph_args --base 1000 --no-gridfit --slope-mode 602 | graph_args --base 1000 --no-gridfit --slope-mode 603 | graph_args --base 1000 --no-gridfit --slope-mode 604 | graph_args --base 1000 --no-gridfit --slope-mode 605 | graph_args --base 1000 --no-gridfit --slope-mode 606 | graph_args --base 1000 --no-gridfit --slope-mode 607 | graph_args --base 1000 --no-gridfit --slope-mode 608 | graph_args --base 1000 --no-gridfit --slope-mode 609 | graph_args --base 1000 --no-gridfit --slope-mode 610 | graph_args --base 1024 --lower-limit 0 --no-gridfit --slope-mode 611 | graph_args --base 1024 --lower-limit 0 --no-gridfit --slope-mode 612 | graph_args --base 1024 --lower-limit 0 --no-gridfit --slope-mode 613 | graph_args --base 1024 --no-gridfit --slope-mode 614 | graph_args --base 1024 --no-gridfit --slope-mode 615 | graph_args --base 1024 -l 0 --no-gridfit --slope-mode 616 | graph_args --lower-limit 0 --no-gridfit --slope-mode 617 | graph_args --lower-limit 0 --no-gridfit --slope-mode 618 | graph_args --lower-limit 0 --no-gridfit --slope-mode 619 | graph_args -l 0 --no-gridfit --slope-mode 620 | graph_category mysql 621 | graph_category mysql 622 | graph_category mysql 623 | graph_category mysql 624 | graph_category mysql 625 | graph_category mysql 626 | graph_category mysql 627 | graph_category mysql 628 | graph_category mysql 629 | graph_category mysql 630 | graph_category mysql 631 | graph_category mysql 632 | graph_category mysql 633 | graph_category mysql 634 | graph_category mysql 635 | graph_category mysql 636 | graph_category mysql 637 | graph_category mysql 638 | graph_category mysql 639 | graph_category mysql 640 | graph_category mysql 641 | graph_category mysql 642 | graph_category mysql 643 | graph_category mysql 644 | graph_category mysql 645 | graph_category mysql 646 | graph_category mysql 647 | graph_category mysql 648 | graph_category mysql 649 | graph_category mysql 650 | graph_category mysql 651 | graph_category mysql 652 | graph_category mysql 653 | graph_category mysql 654 | graph_category mysql 655 | graph_category mysql 656 | graph_category mysql 657 | graph_category mysql 658 | graph_category mysql 659 | graph_category mysql 660 | graph_category mysql 661 | graph_category mysql 662 | graph_title Binary Log Commits 663 | graph_title Binary/Relay Logs 664 | graph_title Command Counters 665 | graph_title Connections 666 | graph_title Files 667 | graph_title Handlers 668 | graph_title InnoDB Buffer Pool 669 | graph_title InnoDB Buffer Pool Activity 670 | graph_title InnoDB Buffer Pool Internal breakdown 671 | graph_title InnoDB Checkpoint Age 672 | graph_title InnoDB Descriptors 673 | graph_title InnoDB Engine Queries and Transactions 674 | graph_title InnoDB History List 675 | graph_title InnoDB IO 676 | graph_title InnoDB IO Pending 677 | graph_title InnoDB Insert Buffer 678 | graph_title InnoDB Insert Buffer Size 679 | graph_title InnoDB Log 680 | graph_title InnoDB Log Sequence Number 681 | graph_title InnoDB Master Thread 682 | graph_title InnoDB Read Views 683 | graph_title InnoDB Row Operations 684 | graph_title InnoDB Semaphores 685 | graph_title InnoDB Transactions 686 | graph_title MyISAM Indexes 687 | graph_title MyISAM Key Cache 688 | graph_title Network Traffic 689 | graph_title Processlist states 690 | graph_title Query Cache 691 | graph_title Query Cache Blocks 692 | graph_title Query Cache Hit Rate 693 | graph_title Query Cache Memory 694 | graph_title Replication 695 | graph_title Select types 696 | graph_title Slow Queries 697 | graph_title Sorts 698 | graph_title Table locks 699 | graph_title Tables 700 | graph_title Tables Definitions 701 | graph_title Temporary objects 702 | graph_title Threads 703 | graph_title Uptime 704 | graph_total Questions 705 | graph_total Total 706 | graph_total Total 707 | graph_total Total 708 | graph_vlabel % 709 | graph_vlabel Activity 710 | graph_vlabel Activity per ${graph_period} 711 | graph_vlabel Activity per ${graph_period} 712 | graph_vlabel Blocks 713 | graph_vlabel Bytes 714 | graph_vlabel Bytes 715 | graph_vlabel Bytes 716 | graph_vlabel Bytes received (-) / sent (+) per ${graph_period} 717 | graph_vlabel Commands per ${graph_period} 718 | graph_vlabel Commands per ${graph_period} 719 | graph_vlabel Commands per ${graph_period} 720 | graph_vlabel Connections per ${graph_period} 721 | graph_vlabel IO operations per ${graph_period} 722 | graph_vlabel Log activity 723 | graph_vlabel Log activity per ${graph_period} 724 | graph_vlabel Number of commits 725 | graph_vlabel Objects per ${graph_period} 726 | graph_vlabel Operations per ${graph_period} 727 | graph_vlabel Pages 728 | graph_vlabel Pages 729 | graph_vlabel Pending operations 730 | graph_vlabel Requests per ${graph_period} 731 | graph_vlabel Semaphores per ${graph_period} 732 | graph_vlabel Slow queries per ${graph_period} 733 | graph_vlabel Sorts / ${graph_period} 734 | graph_vlabel State count per ${graph_period} 735 | graph_vlabel Threads created 736 | graph_vlabel Transactions 737 | graph_vlabel Transactions per ${graph_period} 738 | graph_vlabel Uptime in days 739 | graph_vlabel bytes 740 | graph_vlabel locks per ${graph_period} 741 | ib_bpool_created.draw LINE1 742 | ib_bpool_created.info Pages created in the buffer pool without reading the corresponding disk page. 743 | ib_bpool_created.label Pages created 744 | ib_bpool_created.min 0 745 | ib_bpool_created.type DERIVE 746 | ib_bpool_dbpages.colour cdcfc4 747 | ib_bpool_dbpages.draw AREA 748 | ib_bpool_dbpages.info The number of used buffer pool pages 749 | ib_bpool_dbpages.label Database pages 750 | ib_bpool_dbpages.min 0 751 | ib_bpool_dbpages.type GAUGE 752 | ib_bpool_free.draw LINE1 753 | ib_bpool_free.info The number of unused buffer pool pages 754 | ib_bpool_free.label Free pages 755 | ib_bpool_free.min 0 756 | ib_bpool_free.type GAUGE 757 | ib_bpool_internal_adaptive_hash_size_const.draw AREASTACK 758 | ib_bpool_internal_adaptive_hash_size_const.label Adaptive Hash const 759 | ib_bpool_internal_adaptive_hash_size_const.min 0 760 | ib_bpool_internal_adaptive_hash_size_const.type GAUGE 761 | ib_bpool_internal_adaptive_hash_size_var.draw AREASTACK 762 | ib_bpool_internal_adaptive_hash_size_var.label Adaptive Hash var 763 | ib_bpool_internal_adaptive_hash_size_var.min 0 764 | ib_bpool_internal_adaptive_hash_size_var.type GAUGE 765 | ib_bpool_internal_dictionary_cache_size_const.draw AREASTACK 766 | ib_bpool_internal_dictionary_cache_size_const.label Dictionary const 767 | ib_bpool_internal_dictionary_cache_size_const.min 0 768 | ib_bpool_internal_dictionary_cache_size_const.type GAUGE 769 | ib_bpool_internal_dictionary_cache_size_var.draw AREASTACK 770 | ib_bpool_internal_dictionary_cache_size_var.label Dictionary var 771 | ib_bpool_internal_dictionary_cache_size_var.min 0 772 | ib_bpool_internal_dictionary_cache_size_var.type GAUGE 773 | ib_bpool_internal_file_system_size_const.draw AREASTACK 774 | ib_bpool_internal_file_system_size_const.label Filesystem const 775 | ib_bpool_internal_file_system_size_const.min 0 776 | ib_bpool_internal_file_system_size_const.type GAUGE 777 | ib_bpool_internal_file_system_size_var.draw AREASTACK 778 | ib_bpool_internal_file_system_size_var.label Filesystem var 779 | ib_bpool_internal_file_system_size_var.min 0 780 | ib_bpool_internal_file_system_size_var.type GAUGE 781 | ib_bpool_internal_lock_system_size_const.draw AREASTACK 782 | ib_bpool_internal_lock_system_size_const.label Lock system const 783 | ib_bpool_internal_lock_system_size_const.min 0 784 | ib_bpool_internal_lock_system_size_const.type GAUGE 785 | ib_bpool_internal_lock_system_size_var.draw AREASTACK 786 | ib_bpool_internal_lock_system_size_var.label Lock system var 787 | ib_bpool_internal_lock_system_size_var.min 0 788 | ib_bpool_internal_lock_system_size_var.type GAUGE 789 | ib_bpool_internal_page_hash_size_total.draw AREASTACK 790 | ib_bpool_internal_page_hash_size_total.label Page Hash 791 | ib_bpool_internal_page_hash_size_total.min 0 792 | ib_bpool_internal_page_hash_size_total.type GAUGE 793 | ib_bpool_internal_recovery_system_size_const.draw AREASTACK 794 | ib_bpool_internal_recovery_system_size_const.label Recovery system const 795 | ib_bpool_internal_recovery_system_size_const.min 0 796 | ib_bpool_internal_recovery_system_size_const.type GAUGE 797 | ib_bpool_internal_recovery_system_size_var.draw AREASTACK 798 | ib_bpool_internal_recovery_system_size_var.label Recovery system var 799 | ib_bpool_internal_recovery_system_size_var.min 0 800 | ib_bpool_internal_recovery_system_size_var.type GAUGE 801 | ib_bpool_made_not_young.draw LINE1 802 | ib_bpool_made_not_young.info The number of pages that have remained in the old sublist without being made new. 803 | ib_bpool_made_not_young.label Made not young 804 | ib_bpool_made_not_young.min 0 805 | ib_bpool_made_not_young.type DERIVE 806 | ib_bpool_made_young.draw LINE1 807 | ib_bpool_made_young.info The number of old pages that were moved to the head of the buffer pool 808 | ib_bpool_made_young.label Made young 809 | ib_bpool_made_young.min 0 810 | ib_bpool_made_young.type DERIVE 811 | ib_bpool_modpages.draw LINE1 812 | ib_bpool_modpages.info The number of "dirty" database pages 813 | ib_bpool_modpages.label Modified pages 814 | ib_bpool_modpages.min 0 815 | ib_bpool_modpages.type GAUGE 816 | ib_bpool_oldpages.draw LINE1 817 | ib_bpool_oldpages.info The number of pages in the old sublist of the buffer pool 818 | ib_bpool_oldpages.label Old pages 819 | ib_bpool_oldpages.min 0 820 | ib_bpool_oldpages.type GAUGE 821 | ib_bpool_read.draw LINE1 822 | ib_bpool_read.info Pages read into the buffer pool from disk. 823 | ib_bpool_read.label Pages read 824 | ib_bpool_read.min 0 825 | ib_bpool_read.type DERIVE 826 | ib_bpool_size.colour ffd660 827 | ib_bpool_size.draw AREA 828 | ib_bpool_size.info The total number of buffer pool pages 829 | ib_bpool_size.label Buffer pool size 830 | ib_bpool_size.min 0 831 | ib_bpool_size.type GAUGE 832 | ib_bpool_written.draw LINE1 833 | ib_bpool_written.info Pages written to disk from the buffer pool. 834 | ib_bpool_written.label Pages written 835 | ib_bpool_written.min 0 836 | ib_bpool_written.type DERIVE 837 | ib_ibuf_delete.draw LINE1 838 | ib_ibuf_delete.label Merge Deletes 839 | ib_ibuf_delete.min 0 840 | ib_ibuf_delete.type DERIVE 841 | ib_ibuf_discard_delete.draw LINE1 842 | ib_ibuf_discard_delete.label Discard Deletes 843 | ib_ibuf_discard_delete.min 0 844 | ib_ibuf_discard_delete.type DERIVE 845 | ib_ibuf_discard_inserts.draw LINE1 846 | ib_ibuf_discard_inserts.label Discard Inserts 847 | ib_ibuf_discard_inserts.min 0 848 | ib_ibuf_discard_inserts.type DERIVE 849 | ib_ibuf_free_len.draw LINE1 850 | ib_ibuf_free_len.info Number of pages which are free. 851 | ib_ibuf_free_len.label Free pages 852 | ib_ibuf_free_len.min 0 853 | ib_ibuf_free_len.type GAUGE 854 | ib_ibuf_inserts.draw LINE1 855 | ib_ibuf_inserts.info These values shows statistics about how many buffer operations InnoDB has done. The ratio of merges to inserts gives a good idea of how efficient the buffer is. 856 | ib_ibuf_inserts.label Merge Inserts 857 | ib_ibuf_inserts.min 0 858 | ib_ibuf_inserts.type DERIVE 859 | ib_ibuf_merged_rec.draw LINE1 860 | ib_ibuf_merged_rec.label Merged Records 861 | ib_ibuf_merged_rec.min 0 862 | ib_ibuf_merged_rec.type DERIVE 863 | ib_ibuf_merges.draw LINE1 864 | ib_ibuf_merges.label Merges 865 | ib_ibuf_merges.min 0 866 | ib_ibuf_merges.type DERIVE 867 | ib_ibuf_seg_size.colour cdcfc4 868 | ib_ibuf_seg_size.draw AREA 869 | ib_ibuf_seg_size.info Allocated size of insert buffer segment. 870 | ib_ibuf_seg_size.label Segment size 871 | ib_ibuf_seg_size.min 0 872 | ib_ibuf_seg_size.type GAUGE 873 | ib_ibuf_size.colour 0022ff 874 | ib_ibuf_size.draw LINE1 875 | ib_ibuf_size.info Number of pages containing unmerged records. 876 | ib_ibuf_size.label Unmerged pages 877 | ib_ibuf_size.min 0 878 | ib_ibuf_size.type GAUGE 879 | ib_innodb_descriptors.draw AREASTACK 880 | ib_innodb_descriptors.label Descriptors 881 | ib_innodb_descriptors.min 0 882 | ib_innodb_descriptors.type GAUGE 883 | ib_innodb_descriptors_max.colour ffd660 884 | ib_innodb_descriptors_max.draw AREA 885 | ib_innodb_descriptors_max.label Max 886 | ib_innodb_descriptors_max.min 0 887 | ib_innodb_descriptors_max.type GAUGE 888 | ib_innodb_queries.draw AREASTACK 889 | ib_innodb_queries.label Active 890 | ib_innodb_queries.min 0 891 | ib_innodb_queries.type GAUGE 892 | ib_innodb_query_queue_len.draw AREASTACK 893 | ib_innodb_query_queue_len.label Queued 894 | ib_innodb_query_queue_len.min 0 895 | ib_innodb_query_queue_len.type GAUGE 896 | ib_innodb_read_views.draw AREASTACK 897 | ib_innodb_read_views.label Views 898 | ib_innodb_read_views.min 0 899 | ib_innodb_read_views.type GAUGE 900 | ib_innodb_ro_transactions_active.draw AREASTACK 901 | ib_innodb_ro_transactions_active.label RO Transactions 902 | ib_innodb_ro_transactions_active.min 0 903 | ib_innodb_ro_transactions_active.type GAUGE 904 | ib_innodb_rw_transactions_active.draw AREASTACK 905 | ib_innodb_rw_transactions_active.label RW Transactions 906 | ib_innodb_rw_transactions_active.min 0 907 | ib_innodb_rw_transactions_active.type GAUGE 908 | ib_innodb_transactions_active.draw AREASTACK 909 | ib_innodb_transactions_active.label Transactions 910 | ib_innodb_transactions_active.min 0 911 | ib_innodb_transactions_active.type GAUGE 912 | ib_io_fsync.draw LINE1 913 | ib_io_fsync.info The number of calls to the OS fsync function. 914 | ib_io_fsync.label File syncs 915 | ib_io_fsync.min 0 916 | ib_io_fsync.type DERIVE 917 | ib_io_log.draw LINE1 918 | ib_io_log.info The number of calls to the OS write function that is caused by the log subsystem. 919 | ib_io_log.label Log writes 920 | ib_io_log.min 0 921 | ib_io_log.type DERIVE 922 | ib_io_read.draw LINE1 923 | ib_io_read.info The number of calls to the OS read function. 924 | ib_io_read.label File reads 925 | ib_io_read.min 0 926 | ib_io_read.type DERIVE 927 | ib_io_write.draw LINE1 928 | ib_io_write.info The number of calls to the OS write function. 929 | ib_io_write.label File writes 930 | ib_io_write.min 0 931 | ib_io_write.type DERIVE 932 | ib_iop_aioread.draw LINE1 933 | ib_iop_aioread.label Normal AIO Reads 934 | ib_iop_aioread.min 0 935 | ib_iop_aioread.type DERIVE 936 | ib_iop_aiowrite.draw LINE1 937 | ib_iop_aiowrite.label Normal AIO Writes 938 | ib_iop_aiowrite.min 0 939 | ib_iop_aiowrite.type DERIVE 940 | ib_iop_flush_bpool.draw LINE1 941 | ib_iop_flush_bpool.label Buf Pool Flush 942 | ib_iop_flush_bpool.min 0 943 | ib_iop_flush_bpool.type DERIVE 944 | ib_iop_flush_log.draw LINE1 945 | ib_iop_flush_log.label Log Flushes 946 | ib_iop_flush_log.min 0 947 | ib_iop_flush_log.type DERIVE 948 | ib_iop_ibuf_aio.draw LINE1 949 | ib_iop_ibuf_aio.label Insert Buf AIO Read 950 | ib_iop_ibuf_aio.min 0 951 | ib_iop_ibuf_aio.type DERIVE 952 | ib_iop_log.draw LINE1 953 | ib_iop_log.label AIO Log 954 | ib_iop_log.min 0 955 | ib_iop_log.type DERIVE 956 | ib_iop_sync.draw LINE1 957 | ib_iop_sync.label AIO Sync 958 | ib_iop_sync.min 0 959 | ib_iop_sync.type DERIVE 960 | ib_log_chkpt_age.colour ffd660 961 | ib_log_chkpt_age.draw AREA 962 | ib_log_chkpt_age.info The age in bytes of InnoDB checkpoint. 963 | ib_log_chkpt_age.label Uncheckpointed bytes 964 | ib_log_chkpt_age.min 0 965 | ib_log_chkpt_age.type GAUGE 966 | ib_log_flush.draw LINE1 967 | ib_log_flush.info Number of bytes flushed to the transaction log file. 968 | ib_log_flush.label KB Flushed 969 | ib_log_flush.min 0 970 | ib_log_flush.type DERIVE 971 | ib_log_written.draw LINE1 972 | ib_log_written.info Number of bytes written to the transaction log buffer. 973 | ib_log_written.label KB Written 974 | ib_log_written.min 0 975 | ib_log_written.type DERIVE 976 | ib_os_waits.draw LINE1 977 | ib_os_waits.label OS Waits 978 | ib_os_waits.min 0 979 | ib_os_waits.type DERIVE 980 | ib_rw_excl_os_waits.draw LINE1 981 | ib_rw_excl_os_waits.label RW/X OS Waits 982 | ib_rw_excl_os_waits.min 0 983 | ib_rw_excl_os_waits.type DERIVE 984 | ib_rw_excl_rounds.draw LINE1 985 | ib_rw_excl_rounds.label RW/X Rounds 986 | ib_rw_excl_rounds.min 0 987 | ib_rw_excl_rounds.type DERIVE 988 | ib_rw_excl_waits.draw LINE1 989 | ib_rw_excl_waits.label RW/X Waits 990 | ib_rw_excl_waits.min 0 991 | ib_rw_excl_waits.type DERIVE 992 | ib_rw_shared_os_waits.draw LINE1 993 | ib_rw_shared_os_waits.label RW/S OS Waits 994 | ib_rw_shared_os_waits.min 0 995 | ib_rw_shared_os_waits.type DERIVE 996 | ib_rw_shared_rounds.draw LINE1 997 | ib_rw_shared_rounds.label RW/S Rounds 998 | ib_rw_shared_rounds.min 0 999 | ib_rw_shared_rounds.type DERIVE 1000 | ib_rw_shared_waits.draw LINE1 1001 | ib_rw_shared_waits.label RW/S Waits 1002 | ib_rw_shared_waits.min 0 1003 | ib_rw_shared_waits.type DERIVE 1004 | ib_spin_rounds.draw LINE1 1005 | ib_spin_rounds.label Spin Rounds 1006 | ib_spin_rounds.min 0 1007 | ib_spin_rounds.type DERIVE 1008 | ib_spin_waits.draw LINE1 1009 | ib_spin_waits.label Spin Waits 1010 | ib_spin_waits.min 0 1011 | ib_spin_waits.type DERIVE 1012 | ib_srv_main_background_loops.draw AREASTACK 1013 | ib_srv_main_background_loops.label Background Loop 1014 | ib_srv_main_background_loops.min 0 1015 | ib_srv_main_background_loops.type DERIVE 1016 | ib_srv_main_flush_loops.draw AREASTACK 1017 | ib_srv_main_flush_loops.label Flush Loop 1018 | ib_srv_main_flush_loops.min 0 1019 | ib_srv_main_flush_loops.type DERIVE 1020 | ib_srv_main_flushs_writes.draw LINE1 1021 | ib_srv_main_flushs_writes.label Flushes/Writes 1022 | ib_srv_main_flushs_writes.min 0 1023 | ib_srv_main_flushs_writes.type DERIVE 1024 | ib_tnx.draw LINE1 1025 | ib_tnx.info Number of transactions created. 1026 | ib_tnx.label Transactions created 1027 | ib_tnx.min 0 1028 | ib_tnx.type DERIVE 1029 | ib_tnx_hist.draw LINE1 1030 | ib_tnx_hist.info Number of unpurged transactions in undo space. 1031 | ib_tnx_hist.label History list length 1032 | ib_tnx_hist.min 0 1033 | ib_tnx_hist.type GAUGE 1034 | innodb_log_buffer_size.colour fafd9e 1035 | innodb_log_buffer_size.draw AREA 1036 | innodb_log_buffer_size.info The size in bytes of the buffer that InnoDB uses to write to the log files on disk. 1037 | innodb_log_buffer_size.label Buffer Size 1038 | innodb_log_buffer_size.min 0 1039 | innodb_log_buffer_size.type GAUGE 1040 | innodb_log_size.colour cdcfc4 1041 | innodb_log_size.draw AREA 1042 | innodb_log_size.info The size in bytes of InnoDB log space. 1043 | innodb_log_size.label InnoDB log size 1044 | innodb_log_size.min 0 1045 | innodb_log_size.type GAUGE 1046 | innodb_open_files.colour 66ffff 1047 | innodb_open_files.draw LINE1 1048 | innodb_open_files.label Innodb Table Cache Limit 1049 | innodb_open_files.min 0 1050 | innodb_open_files.type GAUGE 1051 | key_buffer_size.colour 99B898 1052 | key_buffer_size.draw AREA 1053 | key_buffer_size.label Key buffer size 1054 | key_buffer_size.min 0 1055 | key_buffer_size.type GAUGE 1056 | ma_binlog_size.cdef ma_binlog_size,1024,/,1024,/,1024,/ 1057 | ma_binlog_size.draw LINE1 1058 | ma_binlog_size.info The total combined size of all existing binary logs in GB 1059 | ma_binlog_size.label Binary Log Space (GB) 1060 | ma_binlog_size.min 0 1061 | ma_binlog_size.type GAUGE 1062 | max_connections.colour cdcfc4 1063 | max_connections.draw AREA 1064 | max_connections.info The number of simultaneous client connections allowed. 1065 | max_connections.label Max connections 1066 | max_connections.min 0 1067 | max_connections.type GAUGE 1068 | multigraph mysql_bin_relay_log 1069 | multigraph mysql_binlog_commits 1070 | multigraph mysql_commands 1071 | multigraph mysql_connections 1072 | multigraph mysql_files 1073 | multigraph mysql_handlers 1074 | multigraph mysql_innodb_bpool 1075 | multigraph mysql_innodb_bpool_act 1076 | multigraph mysql_innodb_bpool_internal_breakdown 1077 | multigraph mysql_innodb_checkpoint_age 1078 | multigraph mysql_innodb_descriptors 1079 | multigraph mysql_innodb_history_length 1080 | multigraph mysql_innodb_insert_buf 1081 | multigraph mysql_innodb_insert_buf_size 1082 | multigraph mysql_innodb_io 1083 | multigraph mysql_innodb_io_pend 1084 | multigraph mysql_innodb_log 1085 | multigraph mysql_innodb_lsn 1086 | multigraph mysql_innodb_queries 1087 | multigraph mysql_innodb_read_views 1088 | multigraph mysql_innodb_rows 1089 | multigraph mysql_innodb_semaphores 1090 | multigraph mysql_innodb_srv_master_thread 1091 | multigraph mysql_innodb_tnx 1092 | multigraph mysql_myisam_indexes 1093 | multigraph mysql_myisam_key_cache 1094 | multigraph mysql_network_traffic 1095 | multigraph mysql_processlist 1096 | multigraph mysql_qcache 1097 | multigraph mysql_qcache_blocks 1098 | multigraph mysql_qcache_hit_rate 1099 | multigraph mysql_qcache_mem 1100 | multigraph mysql_replication 1101 | multigraph mysql_select_types 1102 | multigraph mysql_slow 1103 | multigraph mysql_sorts 1104 | multigraph mysql_table_locks 1105 | multigraph mysql_tables 1106 | multigraph mysql_tables_definitions 1107 | multigraph mysql_threads 1108 | multigraph mysql_tmp_tables 1109 | multigraph mysql_uptime 1110 | open_files_limit.colour cdcfc4 1111 | open_files_limit.draw AREA 1112 | open_files_limit.info The number of file descriptors available to mysqld. 1113 | open_files_limit.label File limit 1114 | open_files_limit.min 0 1115 | open_files_limit.type GAUGE 1116 | query_cache_hit_rate.draw LINE1 1117 | query_cache_hit_rate.info The percentage of queries served by cache instead of being re-executed by the database repeatedly. 1118 | query_cache_hit_rate.label Hit Rate 1119 | query_cache_hit_rate.min 0 1120 | query_cache_hit_rate.type GAUGE 1121 | query_cache_size.draw AREA 1122 | query_cache_size.info The amount of memory allocated for caching query results. 1123 | query_cache_size.label Cache size 1124 | query_cache_size.min 0 1125 | query_cache_size.type GAUGE 1126 | relay_log_space.cdef relay_log_space,1024,/,1024,/,1024,/ 1127 | relay_log_space.draw LINE1 1128 | relay_log_space.info The total combined size of all existing relay logs in GB. 1129 | relay_log_space.label Relay Log Space (GB) 1130 | relay_log_space.min 0 1131 | relay_log_space.type GAUGE 1132 | seconds_behind_master.draw LINE1 1133 | seconds_behind_master.info http://dev.mysql.com/doc/refman/5.1/en/show-slave-status.html 1134 | seconds_behind_master.label Secs Behind Master 1135 | seconds_behind_master.min 0 1136 | seconds_behind_master.type GAUGE 1137 | slave_running.colour 00AA00 1138 | slave_running.draw AREA 1139 | slave_running.label Slave Running 1140 | slave_running.min 0 1141 | slave_running.type GAUGE 1142 | slave_stopped.colour DD0000 1143 | slave_stopped.draw AREA 1144 | slave_stopped.label Slave Stopped 1145 | slave_stopped.min 0 1146 | slave_stopped.type GAUGE 1147 | table_definition_cache.colour cdcfc4 1148 | table_definition_cache.draw AREA 1149 | table_definition_cache.info Number of table definitions that can be cached. 1150 | table_definition_cache.label Cache Limit 1151 | table_definition_cache.min 0 1152 | table_definition_cache.type GAUGE 1153 | table_open_cache.colour cdcfc4 1154 | table_open_cache.draw AREA 1155 | table_open_cache.info The number of open tables for all threads. 1156 | table_open_cache.label Table cache 1157 | table_open_cache.min 0 1158 | table_open_cache.type GAUGE 1159 | thread_cache_size.colour 99ff99 1160 | thread_cache_size.draw AREA 1161 | thread_cache_size.info How many threads the server should cache for reuse 1162 | thread_cache_size.label Thread cache size 1163 | thread_cache_size.min 0 1164 | thread_cache_size.type GAUGE 1165 | -------------------------------------------------------------------------------- /t/generate-test-data: -------------------------------------------------------------------------------- 1 | #! /usr/bin/perl 2 | 3 | use warnings; 4 | use strict; 5 | 6 | use DBI; 7 | use Data::Dumper qw(Dumper); 8 | use Getopt::Std; 9 | 10 | my %opts; 11 | getopt('dup', \%opts); 12 | 13 | warn Dumper(\%opts); 14 | 15 | my $dsn = $opts{d} || 'DBI:mysql:mysql'; 16 | my $user = $opts{u} || 'root'; 17 | my $pass = $opts{p} || ''; 18 | 19 | my @queries = ( 20 | 'SHOW GLOBAL STATUS', 21 | 'SHOW GLOBAL VARIABLES', 22 | 'SHOW /*!50000 ENGINE*/ INNODB STATUS', 23 | 'SHOW MASTER LOGS', 24 | 'SHOW SLAVE STATUS', 25 | ); 26 | 27 | my $dbh = DBI->connect($dsn, $user, $pass, { 28 | FetchHashKeyName => 'NAME_lc', 29 | RaiseError => 1 30 | }); 31 | 32 | sub selectall { 33 | my ($query) = @_; 34 | 35 | my @res = (); 36 | 37 | my $sth = $dbh->prepare($query); 38 | $sth->execute(); 39 | 40 | # Need to add the column names first, the order of these names is 41 | # significant. Used by fetch function in the DBI mock. 42 | push @res, [map {lc $_} @{$sth->{NAME}}]; 43 | 44 | while (my $row = $sth->fetchrow_hashref()) { 45 | push @res, $row; 46 | } 47 | 48 | return \@res; 49 | } 50 | 51 | my %results = (); 52 | 53 | for my $q (@queries) { 54 | eval { 55 | $results{$q} = selectall($q); 56 | }; 57 | if ($@) { 58 | $results{$q} = $@; #FIX Do the DBI mock need to handle this? 59 | } 60 | } 61 | 62 | $Data::Dumper::Varname = 'results'; 63 | print Dumper(\%results), "\n\n1;\n"; 64 | -------------------------------------------------------------------------------- /t/innodb-status-5.0.68-percona-highperf-3-log.txt: -------------------------------------------------------------------------------- 1 | 2 | ===================================== 3 | 090220 12:36:43 INNODB MONITOR OUTPUT 4 | ===================================== 5 | Per second averages calculated from the last 5 seconds 6 | ---------- 7 | SEMAPHORES 8 | ---------- 9 | OS WAIT ARRAY INFO: reservation count 32353502, signal count 3140950 10 | Mutex spin waits 0, rounds 1490683391, OS waits 26634117 11 | RW-shared spins 5430701, OS waits 3989532; RW-excl spins 2310397, OS waits 751502 12 | ------------------------ 13 | LATEST FOREIGN KEY ERROR 14 | ------------------------ 15 | 090219 18:28:16 Transaction: 16 | TRANSACTION 1 2572721126, ACTIVE 0 sec, process no 19730, OS thread id 1175857472 inserting 17 | mysql tables in use 2, locked 2 18 | 6 lock struct(s), heap size 1216 19 | MySQL thread id 50400, query id 94321815 solsta.example.com 10.0.0.88 etc_api copy to tmp table 20 | alter table api_redirect add index FK179F6C61719B5E02 (redirect_id), add constraint FK179F6C61719B5E02 foreign key (redirect_id) references api_publication (publication_id) 21 | Foreign key constraint fails for table "etc_api/#sql-4d12_c4e0": 22 | , 23 | CONSTRAINT "FK179F6C61719B5E02" FOREIGN KEY ("redirect_id") REFERENCES "api_publication" ("publication_id") 24 | Trying to add in child table, in index "PRIMARY" tuple: 25 | DATA TUPLE: 8 fields; 26 | 0: len 4; hex 80000001; asc ;; 1: len 6; hex 000199589be6; asc X ;; 2: len 7; hex 00000000000000; asc ;; 3: len 4; hex 80000001; asc ;; 4: len 4; hex 80000001; asc ;; 5: len 4; hex 8000001b; asc ;; 6: len 13; hex 736b617474656c697374656e65; asc skattelistene;; 7: len 43; hex 687474703a2f2f736b6174742e6170692e6e6f2f706f6c6b612e6170692e6e6f2f696e6465782e68746d6c; asc http://skatt.api.no/polka.api.no/index.html;; 27 | 28 | But in parent table "etc_api/api_publication", in index "PRIMARY", 29 | the closest match we can find is record: 30 | PHYSICAL RECORD: n_fields 4; compact format; info bits 0 31 | 0: len 4; hex 80000019; asc ;; 1: len 6; hex 0000e1592347; asc Y#G;; 2: len 7; hex 800000003c03b0; asc < ;; 3: len 13; hex 7777772e72657474656e2e6e6f; asc www.retten.no;; 32 | 33 | ------------------------ 34 | LATEST DETECTED DEADLOCK 35 | ------------------------ 36 | 090220 8:23:00 37 | *** (1) TRANSACTION: 38 | TRANSACTION 1 2593719418, ACTIVE 0 sec, process no 19730, OS thread id 1237092672 39 | mysql tables in use 8, locked 8 40 | LOCK WAIT 9 lock struct(s), heap size 3024, undo log entries 1 41 | MySQL thread id 136873, query id 214863560 lycksele.example.com 10.0.0.100 ECE_API updating 42 | DELETE FROM article_list_view WHERE articleid = NEW.articleid 43 | *** (1) WAITING FOR THIS LOCK TO BE GRANTED: 44 | RECORD LOCKS space id 17715 page no 201104 n bits 1016 index "articleid" of table "ece_api/article_list_view" trx id 1 2593719418 lock_mode X locks rec but not gap waiting 45 | Record lock, heap no 914 PHYSICAL RECORD: n_fields 2; compact format; info bits 32 46 | 0: len 4; hex 803f2d22; asc ?-";; 1: len 6; hex 000007a94f39; asc O9;; 47 | 48 | *** (2) TRANSACTION: 49 | TRANSACTION 1 2593719416, ACTIVE 0 sec, process no 19730, OS thread id 1197156672 fetching rows 50 | mysql tables in use 8, locked 8 51 | 18 lock struct(s), heap size 3024, undo log entries 4 52 | MySQL thread id 136838, query id 214863559 lycksele.example.com 10.0.0.100 ECE_API Sending data 53 | INSERT INTO article_list_view 54 | (SELECT a.articleid, p.Publicationname, s.Sectionid, s.uniquename, a.publishdate, a.lastModified, at.codetext AS Articletype 55 | FROM ArticleMetaContent a, Articletype at, ArticleSection ase, Publication p, Section s, ArticleState ast 56 | WHERE (((((((a.art_codeid = ast.codeid) AND (a.codeid = at.codeid)) AND (a.articleid = ase.articleid)) 57 | AND (ase.Sectionid = s.Sectionid)) AND (p.Referenceid = s.Referenceid)) 58 | AND (ast.codetext = 'published')) AND (a.Layoutid IS NULL)) 59 | AND a.articleid = NEW.articleid) 60 | *** (2) HOLDS THE LOCK(S): 61 | RECORD LOCKS space id 17715 page no 201104 n bits 1016 index "articleid" of table "ece_api/article_list_view" trx id 1 2593719416 lock_mode X locks rec but not gap 62 | Record lock, heap no 913 PHYSICAL RECORD: n_fields 2; compact format; info bits 32 63 | 0: len 4; hex 803f2d22; asc ?-";; 1: len 6; hex 000007a94f3a; asc O:;; 64 | 65 | Record lock, heap no 914 PHYSICAL RECORD: n_fields 2; compact format; info bits 32 66 | 0: len 4; hex 803f2d22; asc ?-";; 1: len 6; hex 000007a94f39; asc O9;; 67 | 68 | *** (2) WAITING FOR THIS LOCK TO BE GRANTED: 69 | RECORD LOCKS space id 17405 page no 72786 n bits 944 index "articlesection_artmetacont_idx" of table "ece_api/articlesection" trx id 1 2593719416 lock mode S locks rec but not gap waiting 70 | Record lock, heap no 872 PHYSICAL RECORD: n_fields 2; compact format; info bits 0 71 | 0: len 4; hex 803f2d22; asc ?-";; 1: len 4; hex 800004e6; asc ;; 72 | 73 | *** WE ROLL BACK TRANSACTION (1) 74 | ------------ 75 | TRANSACTIONS 76 | ------------ 77 | Trx id counter 1 2601507487 78 | Purge done for trx's n:o < 1 2601499335 undo n:o < 0 0 79 | History list length 17 80 | Total number of lock structs in row lock hash table 0 81 | LIST OF TRANSACTIONS FOR EACH SESSION: 82 | ---TRANSACTION 0 0, not started, process no 19730, OS thread id 1196357952 83 | MySQL thread id 161015, query id 257800566 mysql.example.com 10.0.0.3 root 84 | SHOW ENGINE INNODB STATUS 85 | ---TRANSACTION 1 2601504521, not started, process no 19730, OS thread id 1185974592 86 | MySQL thread id 161003, query id 257784475 backa.example.com 10.0.0.116 ECE_API 87 | ---TRANSACTION 1 2601505955, not started, process no 19730, OS thread id 1193163072 88 | MySQL thread id 161012, query id 257792978 fixhult.example.com 10.0.0.106 ECE_API 89 | ---TRANSACTION 1 2601504711, not started, process no 19730, OS thread id 1220852032 90 | MySQL thread id 161011, query id 257785611 fixhult.example.com 10.0.0.106 ECE_API 91 | ---TRANSACTION 1 2601506051, not started, process no 19730, OS thread id 1187039552 92 | MySQL thread id 161004, query id 257793492 mata.example.com 10.0.0.115 ECE_API 93 | ---TRANSACTION 1 2601506939, not started, process no 19730, OS thread id 1228306752 94 | MySQL thread id 161006, query id 257798116 lillberg.example.com 10.0.0.99 ECE_API 95 | ---TRANSACTION 1 2601506052, not started, process no 19730, OS thread id 1239488832 96 | MySQL thread id 161000, query id 257793493 gustav.example.com 10.0.0.121 ECE_API 97 | ---TRANSACTION 1 2601499752, not started, process no 19730, OS thread id 1232300352 98 | MySQL thread id 160994, query id 257760667 mata.example.com 10.0.0.115 ECE_API 99 | ---TRANSACTION 1 2601497421, not started, process no 19730, OS thread id 1283684672 100 | MySQL thread id 160998, query id 257748165 ektorp.example.com 10.0.0.105 ECE_API 101 | ---TRANSACTION 1 2601507485, not started, process no 19730, OS thread id 1192896832 102 | MySQL thread id 160996, query id 257800556 ektorp.example.com 10.0.0.105 ECE_API 103 | ---TRANSACTION 1 2601507414, not started, process no 19730, OS thread id 1212332352 104 | MySQL thread id 160991, query id 257800192 lillberg.example.com 10.0.0.99 ECE_API 105 | ---TRANSACTION 1 2601507416, not started, process no 19730, OS thread id 1201682752 106 | MySQL thread id 160992, query id 257800199 lillberg.example.com 10.0.0.99 ECE_API 107 | ---TRANSACTION 1 2601507451, not started, process no 19730, OS thread id 1282885952 108 | MySQL thread id 160990, query id 257800350 lillberg.example.com 10.0.0.99 ECE_API 109 | ---TRANSACTION 1 2601494341, not started, process no 19730, OS thread id 1257859392 110 | MySQL thread id 160988, query id 257732468 lillberg.example.com 10.0.0.99 ECE_API 111 | ---TRANSACTION 1 2601501822, not started, process no 19730, OS thread id 1176123712 112 | MySQL thread id 160986, query id 257771019 lycksele.example.com 10.0.0.100 ECE_API 113 | ---TRANSACTION 1 2601503098, not started, process no 19730, OS thread id 1198754112 114 | MySQL thread id 160979, query id 257776727 karlanda.example.com 10.0.0.109 ECE_API 115 | ---TRANSACTION 1 2601507447, not started, process no 19730, OS thread id 1181980992 116 | MySQL thread id 160980, query id 257800336 karlanda.example.com 10.0.0.109 ECE_API 117 | ---TRANSACTION 1 2601494678, not started, process no 19730, OS thread id 1209669952 118 | MySQL thread id 160972, query id 257733837 mata.example.com 10.0.0.115 ECE_API 119 | ---TRANSACTION 1 2601497796, not started, process no 19730, OS thread id 1185175872 120 | MySQL thread id 160971, query id 257750277 backa.example.com 10.0.0.116 ECE_API 121 | ---TRANSACTION 1 2601497850, not started, process no 19730, OS thread id 1224579392 122 | MySQL thread id 160970, query id 257750573 backa.example.com 10.0.0.116 ECE_API 123 | ---TRANSACTION 1 2601496409, not started, process no 19730, OS thread id 1212066112 124 | MySQL thread id 160967, query id 257742467 gustav.example.com 10.0.0.121 ECE_API 125 | ---TRANSACTION 1 2601504309, not started, process no 19730, OS thread id 1269041472 126 | MySQL thread id 160955, query id 257783166 fixhult.example.com 10.0.0.106 ECE_API 127 | ---TRANSACTION 1 2601501377, not started, process no 19730, OS thread id 1205410112 128 | MySQL thread id 160942, query id 257768774 lillberg.example.com 10.0.0.99 ECE_API 129 | ---TRANSACTION 1 2601506948, not started, process no 19730, OS thread id 1178786112 130 | MySQL thread id 160930, query id 257798118 klippan.example.com 10.0.0.118 ECE_API 131 | ---TRANSACTION 1 2601507344, not started, process no 19730, OS thread id 1237891392 132 | MySQL thread id 160963, query id 257799891 lycksele.example.com 10.0.0.100 ECE_API 133 | ---TRANSACTION 1 2601507345, not started, process no 19730, OS thread id 1206208832 134 | MySQL thread id 160964, query id 257799895 lycksele.example.com 10.0.0.100 ECE_API 135 | ---TRANSACTION 1 2601494324, not started, process no 19730, OS thread id 1204078912 136 | MySQL thread id 160961, query id 257732370 lillberg.example.com 10.0.0.99 ECE_API 137 | ---TRANSACTION 1 2601494322, not started, process no 19730, OS thread id 1225644352 138 | MySQL thread id 160959, query id 257732371 lillberg.example.com 10.0.0.99 ECE_API 139 | ---TRANSACTION 1 2601507322, not started, process no 19730, OS thread id 1177721152 140 | MySQL thread id 160957, query id 257799798 lycksele.example.com 10.0.0.100 ECE_API 141 | ---TRANSACTION 1 2601504357, not started, process no 19730, OS thread id 1180383552 142 | MySQL thread id 160956, query id 257783480 fixhult.example.com 10.0.0.106 ECE_API 143 | ---TRANSACTION 1 2601506565, not started, process no 19730, OS thread id 1182779712 144 | MySQL thread id 160946, query id 257796229 lillberg.example.com 10.0.0.99 ECE_API 145 | ---TRANSACTION 1 2601501948, not started, process no 19730, OS thread id 1213929792 146 | MySQL thread id 160936, query id 257771648 lycksele.example.com 10.0.0.100 ECE_API 147 | ---TRANSACTION 1 2601506943, not started, process no 19730, OS thread id 1235761472 148 | MySQL thread id 160931, query id 257798098 klippan.example.com 10.0.0.118 ECE_API 149 | ---TRANSACTION 1 2601506951, not started, process no 19730, OS thread id 1261852992 150 | MySQL thread id 160932, query id 257798133 klippan.example.com 10.0.0.118 ECE_API 151 | ---TRANSACTION 1 2601481962, not started, process no 19730, OS thread id 1222981952 152 | MySQL thread id 160923, query id 257669328 karlanda.example.com 10.0.0.109 ECE_API 153 | ---TRANSACTION 1 2601481950, not started, process no 19730, OS thread id 1196091712 154 | MySQL thread id 160922, query id 257669250 karlanda.example.com 10.0.0.109 ECE_API 155 | ---TRANSACTION 1 2601503244, not started, process no 19730, OS thread id 1193695552 156 | MySQL thread id 160924, query id 257777497 karlanda.example.com 10.0.0.109 ECE_API 157 | ---TRANSACTION 1 2601506086, not started, process no 19730, OS thread id 1173993792 158 | MySQL thread id 160920, query id 257793684 karlanda.example.com 10.0.0.109 ECE_API 159 | ---TRANSACTION 1 2601503105, not started, process no 19730, OS thread id 1194760512 160 | MySQL thread id 160919, query id 257776762 karlanda.example.com 10.0.0.109 ECE_API 161 | ---TRANSACTION 1 2601496304, not started, process no 19730, OS thread id 1222449472 162 | MySQL thread id 160915, query id 257741800 ektorp.example.com 10.0.0.105 ECE_API 163 | ---TRANSACTION 1 2601500360, not started, process no 19730, OS thread id 1262651712 164 | MySQL thread id 160894, query id 257763858 lycksele.example.com 10.0.0.100 ECE_API 165 | ---TRANSACTION 1 2601502744, not started, process no 19730, OS thread id 1190234432 166 | MySQL thread id 160891, query id 257775183 lycksele.example.com 10.0.0.100 ECE_API 167 | ---TRANSACTION 1 2601494319, not started, process no 19730, OS thread id 1224046912 168 | MySQL thread id 160879, query id 257732350 lillberg.example.com 10.0.0.99 ECE_API 169 | ---TRANSACTION 1 2601494320, not started, process no 19730, OS thread id 1227774272 170 | MySQL thread id 160872, query id 257732357 lillberg.example.com 10.0.0.99 ECE_API 171 | ---TRANSACTION 1 2601507409, not started, process no 19730, OS thread id 1188903232 172 | MySQL thread id 160861, query id 257800172 klippan.example.com 10.0.0.118 ECE_API 173 | ---TRANSACTION 1 2601481948, not started, process no 19730, OS thread id 1205676352 174 | MySQL thread id 160856, query id 257669238 karlanda.example.com 10.0.0.109 ECE_API 175 | ---TRANSACTION 1 2601481961, not started, process no 19730, OS thread id 1186240832 176 | MySQL thread id 160855, query id 257669321 karlanda.example.com 10.0.0.109 ECE_API 177 | ---TRANSACTION 1 2601489170, not started, process no 19730, OS thread id 1220053312 178 | MySQL thread id 160851, query id 257706632 klippan.example.com 10.0.0.118 ECE_API 179 | ---TRANSACTION 1 2601507450, not started, process no 19730, OS thread id 1175058752 180 | MySQL thread id 160828, query id 257800346 lillberg.example.com 10.0.0.99 ECE_API 181 | ---TRANSACTION 1 2601506147, not started, process no 19730, OS thread id 1191299392 182 | MySQL thread id 160818, query id 257794034 fixhult.example.com 10.0.0.106 ECE_API 183 | ---TRANSACTION 1 2601507197, not started, process no 19730, OS thread id 1211799872 184 | MySQL thread id 160791, query id 257799274 klippan.example.com 10.0.0.118 ECE_API 185 | ---TRANSACTION 1 2601496305, not started, process no 19730, OS thread id 1177188672 186 | MySQL thread id 160802, query id 257741811 ektorp.example.com 10.0.0.105 ECE_API 187 | ---TRANSACTION 1 2601506946, not started, process no 19730, OS thread id 1227508032 188 | MySQL thread id 160793, query id 257798106 klippan.example.com 10.0.0.118 ECE_API 189 | ---TRANSACTION 1 2601502800, not started, process no 19730, OS thread id 1178519872 190 | MySQL thread id 160783, query id 257775431 lycksele.example.com 10.0.0.100 ECE_API 191 | ---TRANSACTION 1 2601481959, not started, process no 19730, OS thread id 1238956352 192 | MySQL thread id 160755, query id 257669307 karlanda.example.com 10.0.0.109 ECE_API 193 | ---TRANSACTION 1 2601503101, not started, process no 19730, OS thread id 1234430272 194 | MySQL thread id 160751, query id 257776744 karlanda.example.com 10.0.0.109 ECE_API 195 | ---TRANSACTION 1 2601506724, not started, process no 19730, OS thread id 1207007552 196 | MySQL thread id 160723, query id 257797042 karlanda.example.com 10.0.0.109 ECE_API 197 | ---TRANSACTION 1 2601503350, not started, process no 19730, OS thread id 1208604992 198 | MySQL thread id 160714, query id 257778134 karlanda.example.com 10.0.0.109 ECE_API 199 | ---TRANSACTION 1 2601507484, not started, process no 19730, OS thread id 1174526272 200 | MySQL thread id 160613, query id 257800550 ektorp.example.com 10.0.0.105 ECE_API 201 | ---TRANSACTION 1 2601507486, not started, process no 19730, OS thread id 1249605952 202 | MySQL thread id 160611, query id 257800562 ektorp.example.com 10.0.0.105 ECE_API 203 | ---TRANSACTION 1 2601507477, not started, process no 19730, OS thread id 1188104512 starting index read 204 | mysql tables in use 2, locked 0 205 | MySQL thread id 160526, query id 257800567 ektorp.example.com 10.0.0.105 ECE_API Sending data 206 | SELECT eceCatalog.referenceID,eceCatalog.catID,eceCatalog.name,eceCatalog.codeID,eceCatalog.isTopLevel,eceCatalog.inheritAccess FROM Catalog eceCatalog,EntityCatalog WHERE EntityCatalog.catID = eceCatalog.catID AND EntityCatalog.referenceID = 2060306 207 | -------- 208 | FILE I/O 209 | -------- 210 | I/O thread 0 state: waiting for i/o request (insert buffer thread) 211 | I/O thread 1 state: waiting for i/o request (log thread) 212 | I/O thread 2 state: waiting for i/o request (read thread) 213 | I/O thread 3 state: waiting for i/o request (write thread) 214 | Pending normal aio reads: 0, aio writes: 0, 215 | ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 216 | Pending flushes (fsync) log: 0; buffer pool: 0 217 | 477680 OS file reads, 885048 OS file writes, 501281 OS fsyncs 218 | 0.00 reads/s, 0 avg bytes/read, 8.00 writes/s, 8.00 fsyncs/s 219 | ------------------------------------- 220 | INSERT BUFFER AND ADAPTIVE HASH INDEX 221 | ------------------------------------- 222 | Ibuf: size 1, free list len 80, seg size 82, 223 | 3735 inserts, 3735 merged recs, 3048 merges 224 | Hash table size 19124899, used cells 15463568, node heap has 46625 buffer(s) 225 | 40114.58 hash searches/s, 2931.61 non-hash searches/s 226 | --- 227 | LOG 228 | --- 229 | Log sequence number 257 1596200561 230 | Log flushed up to 257 1596200561 231 | Last checkpoint at 257 1595039957 232 | 0 pending log writes, 0 pending chkp writes 233 | 432375 log i/o's done, 8.00 log i/o's/second 234 | ---------------------- 235 | BUFFER POOL AND MEMORY 236 | ---------------------- 237 | Total memory allocated 10750963785; in additional pool allocated 31662848 238 | Buffer pool size 589824 239 | Free buffers 47895 240 | Database pages 495304 241 | Modified db pages 820 242 | Pending reads 0 243 | Pending writes: LRU 0, flush list 0, single page 0 244 | Pages read 491655, created 3673, written 525834 245 | 0.00 reads/s, 0.00 creates/s, 0.00 writes/s 246 | Buffer pool hit rate 1000 / 1000 247 | -------------- 248 | ROW OPERATIONS 249 | -------------- 250 | 0 queries inside InnoDB, 0 queries in queue 251 | 2 read views open inside InnoDB 252 | Main thread process no. 19730, id 1167337792, state: sleeping 253 | Number of rows inserted 619342, updated 81512, deleted 544425, read 4003866740 254 | 45.39 inserts/s, 1.00 updates/s, 44.59 deletes/s, 522149.57 reads/s 255 | ---------------------------- 256 | END OF INNODB MONITOR OUTPUT 257 | ============================ 258 | 259 | -------------------------------------------------------------------------------- /t/innodb-status-5.1.30-percona-xtradb-1.0.2.txt: -------------------------------------------------------------------------------- 1 | 2 | ===================================== 3 | 090226 16:01:33 INNODB MONITOR OUTPUT 4 | ===================================== 5 | Per second averages calculated from the last 30 seconds 6 | ---------- 7 | SEMAPHORES 8 | ---------- 9 | OS WAIT ARRAY INFO: reservation count 47803, signal count 47738 10 | Mutex spin waits 0, rounds 1560613, OS waits 8368 11 | RW-shared spins 74912, OS waits 35984; RW-excl spins 5308, OS waits 2660 12 | -------- 13 | FILE I/O 14 | -------- 15 | I/O thread 0 state: waiting for i/o request (insert buffer thread) 16 | I/O thread 1 state: waiting for i/o request (log thread) 17 | I/O thread 2 state: waiting for i/o request (read thread) 18 | I/O thread 3 state: waiting for i/o request (write thread) 19 | I/O thread 4 state: waiting for i/o request (write thread) 20 | I/O thread 5 state: waiting for i/o request (write thread) 21 | I/O thread 6 state: waiting for i/o request (write thread) 22 | Pending normal aio reads: 0, aio writes: 0, 23 | ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 24 | Pending flushes (fsync) log: 0; buffer pool: 0 25 | 872753 OS file reads, 7377301 OS file writes, 928136 OS fsyncs 26 | 4.50 reads/s, 25607 avg bytes/read, 34.27 writes/s, 4.40 fsyncs/s 27 | ------------------------------------- 28 | INSERT BUFFER AND ADAPTIVE HASH INDEX 29 | ------------------------------------- 30 | Ibuf: size 1, free list len 402, seg size 404, 31 | 952758 inserts, 952758 merged recs, 356579 merges 32 | Hash table size 17700857, node heap has 37530 buffer(s) 33 | 61.76 hash searches/s, 134.53 non-hash searches/s 34 | --- 35 | LOG 36 | --- 37 | Log sequence number 48274881404 38 | Log flushed up to 48274881404 39 | Last checkpoint at 48274881404 40 | Max checkpoint age 433682474 41 | Modified age 0 42 | Checkpoint age 0 43 | 0 pending log writes, 0 pending chkp writes 44 | 145492 log i/o's done, 0.57 log i/o's/second 45 | ---------------------- 46 | BUFFER POOL AND MEMORY 47 | ---------------------- 48 | Total memory allocated 9410009082; in additional pool allocated 1048576 49 | Internal hash tables (constant factor + variable factor) 50 | Adaptive hash index 756506544 (141606856 + 614899688) 51 | Page hash 8851256 52 | Dictionary cache 35639448 (35403184 + 236264) 53 | File system 104384 (82672 + 21712) 54 | Lock system 21250936 (21250568 + 368) 55 | Recovery system 0 (0 + 0) 56 | Threads 407416 (406936 + 480) 57 | Dictionary memory allocated 236264 58 | Buffer pool size 524288 59 | Buffer pool size, bytes 8589934592 60 | Free buffers 1 61 | Database pages 486757 62 | Modified db pages 0 63 | Pending reads 0 64 | Pending writes: LRU 0, flush list 0, single page 0 65 | Pages read 1108031, created 931106, written 12162263 66 | 7.03 reads/s, 0.00 creates/s, 39.43 writes/s 67 | Buffer pool hit rate 990 / 1000 68 | LRU len: 486757, unzip_LRU len: 0 69 | I/O sum[1275]:cur[0], unzip sum[0]:cur[0] 70 | -------------- 71 | ROW OPERATIONS 72 | -------------- 73 | 0 queries inside InnoDB, 0 queries in queue 74 | 1 read views open inside InnoDB 75 | Main thread process no. 21426, id 1198143808, state: waiting for server activity 76 | Number of rows inserted 141913577, updated 0, deleted 3385165, read 11636495 77 | 0.00 inserts/s, 0.00 updates/s, 25.07 deletes/s, 25.07 reads/s 78 | ------------ 79 | TRANSACTIONS 80 | ------------ 81 | Trx id counter FA21 82 | Purge done for trx's n:o < FA21 undo n:o < 0 83 | History list length 0 84 | LIST OF TRANSACTIONS FOR EACH SESSION: 85 | ---TRANSACTION 0, not started, process no 21426, OS thread id 1199208768 86 | MySQL thread id 387693, query id 1183303 localhost markus 87 | show innodb status 88 | ---------------------------- 89 | END OF INNODB MONITOR OUTPUT 90 | ============================ 91 | -------------------------------------------------------------------------------- /t/innodb-status-5.5-multiple-buffer-pools.txt: -------------------------------------------------------------------------------- 1 | 2 | ===================================== 3 | 090220 12:36:43 INNODB MONITOR OUTPUT 4 | ===================================== 5 | Per second averages calculated from the last 5 seconds 6 | ---------------------- 7 | BUFFER POOL AND MEMORY 8 | ---------------------- 9 | Total memory allocated 29783752704; in additional pool allocated 0 10 | Internal hash tables (constant factor + variable factor) 11 | Adaptive hash index 2048919104 (458995144 + 1589923960) 12 | Page hash 7172584 (buffer pool 0 only) 13 | Dictionary cache 115766209 (114750256 + 1015953) 14 | File system 110832 (82672 + 28160) 15 | Lock system 71736872 (71718824 + 18048) 16 | Recovery system 0 (0 + 0) 17 | Dictionary memory allocated 1015953 18 | Buffer pool size 1769468 19 | Buffer pool size, bytes 28990963712 20 | Free buffers 1 21 | Database pages 1672426 22 | Old database pages 617279 23 | Modified db pages 2923 24 | Pending reads 0 25 | Pending writes: LRU 0, flush list 0, single page 0 26 | Pages made young 31483253, not young 1915732679 27 | 4.20 youngs/s, 16.20 non-youngs/s 28 | Pages read 50141845, created 1051953, written 69568873 29 | 7.40 reads/s, 0.60 creates/s, 0.00 writes/s 30 | Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000 31 | Pages read ahead 0.00/s, evicted without access 0.00/s 32 | LRU len: 1672426, unzip_LRU len: 0 33 | I/O sum[10216]:cur[8], unzip sum[0]:cur[0] 34 | ---------------------- 35 | INDIVIDUAL BUFFER POOL INFO 36 | ---------------------- 37 | ---BUFFER POOL 0 38 | Buffer pool size 442367 39 | Buffer pool size, bytes 7247740928 40 | Free buffers 0 41 | Database pages 418135 42 | Old database pages 154331 43 | Modified db pages 876 44 | Pending reads 0 45 | Pending writes: LRU 0, flush list 0, single page 0 46 | Pages made young 8012138, not young 512929033 47 | 1.20 youngs/s, 5.00 non-youngs/s 48 | Pages read 12839051, created 265441, written 17463949 49 | 2.60 reads/s, 0.00 creates/s, 0.00 writes/s 50 | Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000 51 | Pages read ahead 0.00/s, evicted without access 0.00/s 52 | LRU len: 418135, unzip_LRU len: 0 53 | I/O sum[2554]:cur[2], unzip sum[0]:cur[0] 54 | ---BUFFER POOL 1 55 | Buffer pool size 442367 56 | Buffer pool size, bytes 7247740928 57 | Free buffers 1 58 | Database pages 418057 59 | Old database pages 154301 60 | Modified db pages 404 61 | Pending reads 0 62 | Pending writes: LRU 0, flush list 0, single page 0 63 | Pages made young 7874890, not young 474563887 64 | 1.40 youngs/s, 4.60 non-youngs/s 65 | Pages read 12537934, created 258941, written 17405384 66 | 1.80 reads/s, 0.00 creates/s, 0.00 writes/s 67 | Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000 68 | Pages read ahead 0.00/s, evicted without access 0.00/s 69 | LRU len: 418057, unzip_LRU len: 0 70 | I/O sum[2554]:cur[2], unzip sum[0]:cur[0] 71 | ---BUFFER POOL 2 72 | Buffer pool size 442367 73 | Buffer pool size, bytes 7247740928 74 | Free buffers 0 75 | Database pages 418148 76 | Old database pages 154335 77 | Modified db pages 774 78 | Pending reads 0 79 | Pending writes: LRU 0, flush list 0, single page 0 80 | Pages made young 7765924, not young 451795351 81 | 1.40 youngs/s, 1.80 non-youngs/s 82 | Pages read 12311287, created 261939, written 17323009 83 | 1.40 reads/s, 0.20 creates/s, 0.00 writes/s 84 | Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000 85 | Pages read ahead 0.00/s, evicted without access 0.00/s 86 | LRU len: 418148, unzip_LRU len: 0 87 | I/O sum[2554]:cur[2], unzip sum[0]:cur[0] 88 | ---BUFFER POOL 3 89 | Buffer pool size 442367 90 | Buffer pool size, bytes 7247740928 91 | Free buffers 0 92 | Database pages 418086 93 | Old database pages 154312 94 | Modified db pages 869 95 | Pending reads 0 96 | Pending writes: LRU 0, flush list 0, single page 0 97 | Pages made young 7830301, not young 476444408 98 | 0.20 youngs/s, 4.80 non-youngs/s 99 | Pages read 12453573, created 265632, written 17376531 100 | 1.60 reads/s, 0.40 creates/s, 0.00 writes/s 101 | Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000 102 | Pages read ahead 0.00/s, evicted without access 0.00/s 103 | LRU len: 418086, unzip_LRU len: 0 104 | I/O sum[2554]:cur[2], unzip sum[0]:cur[0] 105 | ---------------------------- 106 | END OF INNODB MONITOR OUTPUT 107 | ============================ 108 | 109 | -------------------------------------------------------------------------------- /t/mock/Cache/SharedMemoryCache.pm: -------------------------------------------------------------------------------- 1 | use warnings; 2 | use strict; 3 | 4 | package Cache::SharedMemoryCache; 5 | 6 | sub new { 7 | my $class = shift; 8 | return bless {}, $class; 9 | } 10 | 11 | sub get {} 12 | sub set {} 13 | 14 | 15 | 1; 16 | -------------------------------------------------------------------------------- /t/mock/DBI.pm: -------------------------------------------------------------------------------- 1 | use warnings; 2 | use strict; 3 | 4 | package DBI; 5 | 6 | our $results1; 7 | require 'mysql_51_data.pm'; 8 | 9 | sub connect { 10 | my ($class) = @_; 11 | 12 | my $self = { 13 | prepared_query => '', 14 | result => '', 15 | cursor => 0, 16 | }; 17 | 18 | return bless $self, $class; 19 | } 20 | 21 | sub prepare { 22 | my ($self, $query) = @_; 23 | $self->{prepared_query} = $query; 24 | 25 | return $self; 26 | } 27 | 28 | sub execute { 29 | my ($self) = @_; 30 | 31 | $self->{cursor} = 1; 32 | $self->{result} = $results1->{$self->{prepared_query}}; 33 | 34 | return $self; 35 | } 36 | 37 | sub finish {} 38 | 39 | sub fetch { 40 | my ($self) = @_; 41 | 42 | my $row_hash = $self->fetchrow_hashref(); 43 | return unless $row_hash; 44 | 45 | my @row = @$row_hash{@{$self->{result}[0]}}; 46 | return \@row; 47 | } 48 | 49 | sub fetchrow_hashref { 50 | my ($self) = @_; 51 | 52 | return unless exists $self->{result}[$self->{cursor}]; 53 | 54 | return $self->{result}[$self->{cursor}++]; 55 | } 56 | 57 | 1; 58 | -------------------------------------------------------------------------------- /t/mock/Munin/Plugin.pm: -------------------------------------------------------------------------------- 1 | package Munin::Plugin; 2 | 3 | use warnings; 4 | use strict; 5 | 6 | use Exporter; 7 | 8 | our @ISA = ('Exporter'); 9 | our @EXPORT = qw(clean_fieldname need_multigraph print_thresholds); 10 | 11 | 12 | sub clean_fieldname { 13 | my ($fn) = @_; 14 | 15 | return $fn; 16 | } 17 | 18 | 19 | sub need_multigraph { 1; } 20 | 21 | 22 | sub print_thresholds { 1; } 23 | 24 | 25 | 1; 26 | -------------------------------------------------------------------------------- /t/parse_innodb_status.t: -------------------------------------------------------------------------------- 1 | use Test::More tests => 3; 2 | use Test::Exception; 3 | use FindBin; 4 | 5 | $ENV{MUNIN_CAP_MULTIGRAPH} = 1; 6 | 7 | # Both mysql_ and Test::More defines the sub skip. Put mysql_ in its 8 | # own package so it don't polute the main:: name space 9 | package mysql_; 10 | Test::More::require_ok("$FindBin::Bin/../mysql"); 11 | package main; 12 | 13 | sub dump_data { 14 | use Data::Dumper; 15 | my %ib = (); 16 | for my $k (grep /ib/, keys %$mysql_::data) { 17 | $ib{$k} = $mysql_::data->{$k}; 18 | } 19 | print Dumper(\%ib); 20 | } 21 | 22 | sub slurp { 23 | my ($file_name) = @_; 24 | open my $file, '<', $file_name or die($!); 25 | return do { local $/; <$file> }; 26 | } 27 | 28 | dies_ok { mysql_::parse_innodb_status('x') } 29 | 'Not a valid innodb status should die'; 30 | 31 | lives_ok { 32 | for my $file (glob "$FindBin::Bin/innodb-status-*.txt") { 33 | $mysql_::data = {}; 34 | mysql_::parse_innodb_status(slurp($file)); 35 | 36 | # FIX test that the correct values is extracted 37 | #dump_data(); 38 | } 39 | } 'All status files should parse'; 40 | -------------------------------------------------------------------------------- /t/regression.t: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | 4 | use FindBin; 5 | use Path::Class qw(dir); 6 | use Test::More; 7 | use Test::Output qw(:functions); 8 | use Test::Regression; 9 | 10 | $ENV{MUNIN_CAP_MULTIGRAPH} = 1; 11 | use lib "$FindBin::Bin/mock"; 12 | 13 | # Put mysql_ in its own package so it don't polute the main:: name 14 | # space. 15 | package mysql_; 16 | Test::More::require_ok("$FindBin::Bin/../mysql"); 17 | package main; 18 | 19 | sub helper { 20 | @ARGV = @_; 21 | return join("\n",sort(split(/\n/, stdout_from(sub {mysql_::main()}))))."\n"; 22 | } 23 | 24 | no warnings; 25 | *mysql_::plugins = sub { 26 | my $d = dir("$FindBin::Bin/../lib/Munin/MySQL/Graph/"); 27 | my @plugins = (); 28 | for my $f ($d->children) { 29 | next unless $f =~ /\.pm$/; 30 | require $f; 31 | my $name = $f->basename; 32 | $name =~ s/.pm$//; 33 | push @plugins, 'Munin::MySQL::Graph::' . $name; 34 | } 35 | return @plugins; 36 | }; 37 | use warnings; 38 | 39 | ok_regression(sub { helper }, "$FindBin::Bin/values.out", 'Values'); 40 | ok_regression(sub { helper('config') }, "$FindBin::Bin/config.out", 'Config'); 41 | 42 | done_testing; 43 | -------------------------------------------------------------------------------- /t/values.out: -------------------------------------------------------------------------------- 1 | Aborted_clients.value 30 2 | Aborted_connects.value 0 3 | Binlog_cache_disk_use.value 0 4 | Binlog_cache_use.value 8388142 5 | Binlog_commits.value 0 6 | Binlog_group_commit_trigger_count.value U 7 | Binlog_group_commit_trigger_lock_wait.value U 8 | Binlog_group_commit_trigger_timeout.value U 9 | Binlog_group_commits.value 0 10 | Binlog_stmt_cache_disk_use.value U 11 | Binlog_stmt_cache_use.value U 12 | Bytes_received.value 162368494765 13 | Bytes_sent.value 188482967756 14 | Com_delete.value 2471844 15 | Com_delete_multi.value 0 16 | Com_insert.value 16524909 17 | Com_insert_select.value 0 18 | Com_load.value 0 19 | Com_replace.value 0 20 | Com_replace_select.value 0 21 | Com_select.value 95506949 22 | Com_update.value 0 23 | Com_update_multi.value 0 24 | Connections.value 980 25 | Created_tmp_disk_tables.value 2 26 | Created_tmp_files.value 29 27 | Created_tmp_tables.value 1800 28 | Handler_delete.value 0 29 | Handler_read_first.value 31 30 | Handler_read_key.value 195957566 31 | Handler_read_next.value 6337002 32 | Handler_read_prev.value 0 33 | Handler_read_rnd.value 0 34 | Handler_read_rnd_next.value 477487 35 | Handler_update.value 0 36 | Handler_write.value 553921509 37 | Innodb_lsn_current.value 14329178292 38 | Innodb_lsn_flushed.value 14329178292 39 | Innodb_lsn_last_checkpoint.value 14201461428 40 | Innodb_master_thread_active_loops.value U 41 | Innodb_master_thread_idle_loops.value U 42 | Innodb_rows_deleted.value 2471842 43 | Innodb_rows_inserted.value 5916293 44 | Innodb_rows_read.value 89263890 45 | Innodb_rows_updated.value 0 46 | Key_buf_unflush.value 0 47 | Key_buf_unused.value 0 48 | Key_read_requests.value 5384999053 49 | Key_reads.value 153 50 | Key_write_requests.value 1130475636 51 | Key_writes.value 49967776 52 | Max_used_connections.value 33 53 | Open_files.value 157 54 | Open_table_definitions.value 23 55 | Open_tables.value 42 56 | Opened_table_definitions.value 55 57 | Opened_tables.value 119 58 | Opened_views.value U 59 | Qcache_avg_rslt_size.value 3299575.25977239 60 | Qcache_free_blocks.value 10434 61 | Qcache_free_memory.value 30023328 62 | Qcache_hits.value 22299654 63 | Qcache_inserts.value 28009339 64 | Qcache_invalidations.value 27977003 65 | Qcache_lowmem_prunes.value 22914381 66 | Qcache_not_cached.value 292599 67 | Qcache_queries_in_cache.value 32336 68 | Qcache_total_blocks.value 82222 69 | Select_full_join.value 0 70 | Select_full_range_join.value 0 71 | Select_range.value 0 72 | Select_range_check.value 0 73 | Select_scan.value 1826 74 | Slave_open_temp_tables.value 0 75 | Slave_open_temp_tables.value 0 76 | Slave_retried_transactions.value 0 77 | Slow_queries.value 0 78 | Sort_merge_passes.value 0 79 | Sort_range.value 0 80 | Sort_rows.value 0 81 | Sort_scan.value 0 82 | State_closing_tables.value 0 83 | State_copying_to_tmp_table.value 0 84 | State_end.value 0 85 | State_freeing_items.value 14 86 | State_init.value 0 87 | State_locked.value 8 88 | State_login.value 0 89 | State_none.value 22 90 | State_other.value 4 91 | State_preparing.value 0 92 | State_reading_from_net.value 0 93 | State_sending_data.value 1 94 | State_sorting_result.value 0 95 | State_statistics.value 0 96 | State_system_lock.value 0 97 | State_table_lock.value 0 98 | State_updating.value 0 99 | State_writing_to_net.value 0 100 | Table_locks_immediate.value 155740409 101 | Table_locks_waited.value 1012946 102 | Threads_connected.value 32 103 | Threads_connected.value 32 104 | Threads_created.value 979 105 | Threads_running.value 2 106 | Threads_running.value 2 107 | Uptime_days.value 3 108 | ib_bpool_created.value 74438 109 | ib_bpool_dbpages.value 74532 110 | ib_bpool_free.value 775719 111 | ib_bpool_internal_adaptive_hash_size_const.value U 112 | ib_bpool_internal_adaptive_hash_size_var.value U 113 | ib_bpool_internal_dictionary_cache_size_const.value U 114 | ib_bpool_internal_dictionary_cache_size_var.value U 115 | ib_bpool_internal_file_system_size_const.value U 116 | ib_bpool_internal_file_system_size_var.value U 117 | ib_bpool_internal_lock_system_size_const.value U 118 | ib_bpool_internal_lock_system_size_var.value U 119 | ib_bpool_internal_page_hash_size_total.value U 120 | ib_bpool_internal_recovery_system_size_const.value U 121 | ib_bpool_internal_recovery_system_size_var.value U 122 | ib_bpool_made_not_young.value U 123 | ib_bpool_made_young.value U 124 | ib_bpool_modpages.value 22831 125 | ib_bpool_oldpages.value U 126 | ib_bpool_read.value 94 127 | ib_bpool_size.value 851968 128 | ib_bpool_written.value 1330485 129 | ib_ibuf_delete.value U 130 | ib_ibuf_discard_delete.value U 131 | ib_ibuf_discard_inserts.value U 132 | ib_ibuf_free_len.value 92 133 | ib_ibuf_inserts.value 0 134 | ib_ibuf_merged_rec.value 0 135 | ib_ibuf_merges.value 0 136 | ib_ibuf_seg_size.value 94 137 | ib_ibuf_size.value 1 138 | ib_innodb_descriptors.value U 139 | ib_innodb_descriptors_max.value U 140 | ib_innodb_queries.value 0 141 | ib_innodb_query_queue_len.value 0 142 | ib_innodb_read_views.value 1 143 | ib_innodb_ro_transactions_active.value U 144 | ib_innodb_rw_transactions_active.value U 145 | ib_innodb_transactions_active.value U 146 | ib_io_fsync.value 16902456 147 | ib_io_log.value 16813492 148 | ib_io_read.value 66 149 | ib_io_write.value 17209444 150 | ib_iop_aioread.value 0 151 | ib_iop_aiowrite.value 0 152 | ib_iop_flush_bpool.value 0 153 | ib_iop_flush_log.value 0 154 | ib_iop_ibuf_aio.value 0 155 | ib_iop_log.value 0 156 | ib_iop_sync.value 0 157 | ib_log_chkpt_age.value 127716864 158 | ib_log_flush.value 14329178292 159 | ib_log_written.value 14329178292 160 | ib_os_waits.value 93073 161 | ib_rw_excl_os_waits.value U 162 | ib_rw_excl_rounds.value U 163 | ib_rw_excl_waits.value U 164 | ib_rw_shared_os_waits.value U 165 | ib_rw_shared_rounds.value U 166 | ib_rw_shared_waits.value U 167 | ib_spin_rounds.value 2964990 168 | ib_spin_waits.value 0 169 | ib_srv_main_background_loops.value U 170 | ib_srv_main_flush_loops.value U 171 | ib_srv_main_flushs_writes.value U 172 | ib_tnx.value 189633096 173 | ib_tnx_hist.value 117 174 | innodb_log_buffer_size.value 33554432 175 | innodb_log_size.value 2147483648 176 | innodb_open_files.value 1000 177 | key_buffer_size.value 4194304000 178 | ma_binlog_size.value 12887116460 179 | max_connections.value 1500 180 | multigraph mysql_bin_relay_log 181 | multigraph mysql_binlog_commits 182 | multigraph mysql_commands 183 | multigraph mysql_connections 184 | multigraph mysql_files 185 | multigraph mysql_handlers 186 | multigraph mysql_innodb_bpool 187 | multigraph mysql_innodb_bpool_act 188 | multigraph mysql_innodb_bpool_internal_breakdown 189 | multigraph mysql_innodb_checkpoint_age 190 | multigraph mysql_innodb_descriptors 191 | multigraph mysql_innodb_history_length 192 | multigraph mysql_innodb_insert_buf 193 | multigraph mysql_innodb_insert_buf_size 194 | multigraph mysql_innodb_io 195 | multigraph mysql_innodb_io_pend 196 | multigraph mysql_innodb_log 197 | multigraph mysql_innodb_lsn 198 | multigraph mysql_innodb_queries 199 | multigraph mysql_innodb_read_views 200 | multigraph mysql_innodb_rows 201 | multigraph mysql_innodb_semaphores 202 | multigraph mysql_innodb_srv_master_thread 203 | multigraph mysql_innodb_tnx 204 | multigraph mysql_myisam_indexes 205 | multigraph mysql_myisam_key_cache 206 | multigraph mysql_network_traffic 207 | multigraph mysql_processlist 208 | multigraph mysql_qcache 209 | multigraph mysql_qcache_blocks 210 | multigraph mysql_qcache_hit_rate 211 | multigraph mysql_qcache_mem 212 | multigraph mysql_replication 213 | multigraph mysql_select_types 214 | multigraph mysql_slow 215 | multigraph mysql_sorts 216 | multigraph mysql_table_locks 217 | multigraph mysql_tables 218 | multigraph mysql_tables_definitions 219 | multigraph mysql_threads 220 | multigraph mysql_tmp_tables 221 | multigraph mysql_uptime 222 | open_files_limit.value 20000 223 | query_cache_hit_rate.value 18.9290357519264 224 | query_cache_size.value 134217728 225 | relay_log_space.value 504 226 | seconds_behind_master.value 100 227 | slave_running.value 100 228 | slave_stopped.value 0 229 | table_definition_cache.value 256 230 | table_open_cache.value 1800 231 | thread_cache_size.value 0 232 | --------------------------------------------------------------------------------