Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Fix notice for empty ibuf aio reads in innodb status #115

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions cacti/scripts/ss_get_mysql_stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -1040,9 +1040,19 @@ function get_innodb_array($text, $mysql_version) {
}
elseif (strpos($line, 'ibuf aio reads') === 0 ) {
# ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
$results['pending_ibuf_aio_reads'] = to_int($row[3]);
$results['pending_aio_log_ios'] = to_int($row[6]);
$results['pending_aio_sync_ios'] = to_int($row[9]);
# or
# ibuf aio reads:, log i/o\'s:, sync i/o\'s:
#
# see https://jira.percona.com/browse/PS-3549

$results['pending_ibuf_aio_reads'] = 0;
$results['pending_aio_log_ios'] = 0;
$results['pending_aio_sync_ios'] = 0;
if (count($row) === 10) {
$results['pending_ibuf_aio_reads'] = to_int($row[3]);
$results['pending_aio_log_ios'] = to_int($row[6]);
$results['pending_aio_sync_ios'] = to_int($row[9]);
}
}
elseif ( strpos($line, 'Pending flushes (fsync)') === 0 ) {
# Pending flushes (fsync) log: 0; buffer pool: 0
Expand Down Expand Up @@ -1414,4 +1424,3 @@ function debug($val) {
$debug_log = FALSE;
}
}