os_performance_tools.collectors.mysql module

MySQL is accessed via the configuration options found at ~/.my.cnf. This is parsed not by libmysqlclient, which may or may not be present, but by configparser. As such, some options that are usually usable from that file may be ignored by this module. Everything from the “client” section will be passed through to pymysql’s connect method.

os_performance_tools.collectors.mysql.COLLECT_COUNTERS = ('Com_delete', 'Com_insert', 'Com_select', 'Com_update', 'Connections', 'Innodb_buffer_pool_read_requests', 'Innodb_data_reads', 'Innodb_data_read', 'Innodb_data_writes', 'Innodb_data_written', 'Innodb_log_writes', 'Innodb_rows_deleted', 'Innodb_rows_inserted', 'Innodb_rows_read', 'Innodb_rows_updated', 'Queries', 'Slow_queries')

These counters’ meaning are all documented in the MySQL manual. They are intended to show a picture of how much has been asked of MySQL, and how busy MySQL was while executing commands. Each one will be recorded unaltered by name in the resulting counters mapping.

os_performance_tools.collectors.mysql.collect()