InnoDBStatus.comMySQL InnoDB Diagnostic Tool

Complete Guide: How to Read SHOW ENGINE INNODB STATUS

SHOW ENGINE INNODB STATUS is the most information-dense diagnostic command available in MySQL, cramming dozens of real-time metrics about locks, transactions, buffer pool, redo logs, I/O throughput, and internal concurrency into a single text output. The output is divided into named sections, each covering a distinct InnoDB subsystem: SEMAPHORES, LATEST DETECTED DEADLOCK, TRANSACTIONS, FILE I/O, INSERT BUFFER AND ADAPTIVE HASH INDEX, LOG, BUFFER POOL AND MEMORY, ROW OPERATIONS, and more. Each section contains both cumulative counters (since server start or last reset) and recent-period rates (averaged over approximately 30 seconds). Mastering this output is a prerequisite for every serious MySQL performance engineer. This complete guide covers every section, explains each field, and shows you how to extract a full health picture in under 2 minutes.

Output Structure and Section Overview

Header Timestamp, Background Thread, and Semaphores

The SHOW ENGINE INNODB STATUS output begins with a header showing the current timestamp ("YYYY-MM-DD HH:MM:SS"), the InnoDB version string, and the time since the server started. Immediately below is the per-second activity summary from the BACKGROUND THREAD section: "n pending log flushes, n pending buffer pool flushes, N main background thread loops done in last M secs". This background thread summary is your first checkpoint — pending log flushes > 0 indicates the redo log fsync path is struggling; main thread loops that have fallen behind wall clock time indicate the background thread is CPU-saturated. The header timestamp also lets you correlate the InnoDB status snapshot with other time-series data from monitoring tools, OS metrics, and application logs.

Transactions, Log, and Buffer Pool Sections

The TRANSACTIONS section is the most critical section for diagnosing lock contention, slow queries, and MVCC health. It begins with "Trx id counter N" (current transaction ID counter, indicating TPS), "Purge done for trx's n:o < M" (oldest unprocessed undo record), and "History list length K" (HLL, dirty read view count). Below that, each active transaction is listed with its state (ACTIVE, LOCK WAIT, ROLLING BACK), duration, query text, and lock details. The LOG section follows, containing "Log sequence number", "Log flushed up to", "Pages flushed up to", and "Last checkpoint at" — four LSN values that together characterise redo log health. The BUFFER POOL section reports hit rate, page counts, dirty pages, and LRU statistics that determine whether your working set fits in memory.

Permissions and Execution Context

Required Privileges: PROCESS vs SUPER in MySQL 8.0

In MySQL 5.7 and earlier, SHOW ENGINE INNODB STATUS requires the SUPER privilege, which is also required for many other administrative operations. In MySQL 8.0, Oracle decomposed SUPER into fine-grained dynamic privileges; PROCESS is now sufficient to execute SHOW ENGINE INNODB STATUS, making it practical to grant to read-only monitoring users without granting full administrative access. Grant with GRANT PROCESS ON *.* TO 'monitor'@'localhost'. Note that SHOW ENGINE INNODB STATUS still exposes potentially sensitive data: the TRANSACTIONS section shows query text from all active sessions (not just the current user's), and the LATEST DETECTED DEADLOCK section may contain application query patterns. Restrict access to monitoring users and DBA accounts only.

30-Second Averaging Window and Sampling Frequency

Most rate metrics in SHOW ENGINE INNODB STATUS ("N reads/s", "M writes/s", etc.) are averages computed over approximately the last 30 seconds. This 30-second averaging window smooths out sub-second spikes and provides a stable trend view, but it means the output lags real-time events by up to 30 seconds. For incident response, run SHOW ENGINE INNODB STATUS repeatedly at 5-second intervals using a shell while-loop or the MySQL client's built-in SHOW ENGINE INNODB STATUS inside a watch-like loop. Tools like pt-mext (Percona Toolkit) automate multi-sample capture and display deltas between captures, making it easy to spot metrics that are changing rapidly. The Innodb_row_lock_waits, Innodb_deadlocks, and Innodb_buffer_pool_reads SHOW STATUS variables update in real time without the 30-second lag.

Practical Diagnostic Workflows

Incident Response: Reading Status in Under 2 Minutes

A rapid SHOW ENGINE INNODB STATUS incident triage should take no more than 2 minutes and follows this sequence: (1) Check the TRANSACTIONS section for any transaction with state "LOCK WAIT" or "ROLLING BACK" and note the duration — anything over 60 seconds is an active incident. (2) Check History List Length — above 100,000 indicates purge lag requiring investigation. (3) Check the SEMAPHORES section for any thread waiting over 60 seconds for a semaphore. (4) In the LOG section, compute checkpoint age percentage — above 75% risks a sharp checkpoint stall. (5) Check buffer pool hit rate — below 95% indicates working set overflow. Run each of these five checks in sequence and you can triage the most common InnoDB production incidents in under 2 minutes without additional tooling.

Automating Status Collection with pt-mext and innotop

pt-mext from Percona Toolkit automates the capture and delta-display of SHOW GLOBAL STATUS and SHOW ENGINE INNODB STATUS outputs, making it easy to compare two snapshots and identify metrics that changed between them. Run pt-mext -- mysql -e "SHOW ENGINE INNODB STATUS" -- to capture continuous samples. innotop is an ncurses-based real-time MySQL monitor that displays InnoDB status data in a continuously refreshing dashboard with colour-coded alert thresholds for key metrics. For infrastructure-scale monitoring, mysqld_exporter (Prometheus) scrapes all SHOW GLOBAL STATUS metrics and many INFORMATION_SCHEMA and Performance Schema tables, exposing them as Prometheus time series for Grafana dashboards. The combination of pt-mext for ad-hoc debugging and mysqld_exporter for continuous monitoring covers both incident response and proactive capacity planning.

Ready to Diagnose Your MySQL Instance?

Paste your SHOW ENGINE INNODB STATUS output and get an instant visual analysis — 100% in your browser, no data sent anywhere.

Analyze my status now →