SHOW STATUS
Contents
Syntax:
SHOW [GLOBAL | SESSION] STATUS [LIKE 'pattern' | WHERE expr]
Description:
SHOW STATUS
provides server status information. This
information also can be obtained using the mysqladmin extended-status
command.
The LIKE
clause, if present, indicates which variable names
to match. The WHERE
clause can be given to select rows using
more general conditions.
With the GLOBAL
modifier, SHOW STATUS
displays the status values for all connections to MariaDB. With
SESSION
, it displays the status values
for the current connection. If no modifier is present, the default is
SESSION
. LOCAL
is a synonym for
SESSION
. If you see a lot of 0 values, the reason is probably that you have used SHOW STATUS
with a new connection instead of SHOW GLOBAL STATUS
.
Some status variables have only a global value. For these, you get the
same value for both GLOBAL
and SESSION
.
See Server-Status-Variables for a full list, scope and description of the variables that can be viewed with SHOW STATUS.
Examples:
MariaDB [test]> SHOW STATUS LIKE 'Key%'; +------------------------+--------+ | Variable_name | Value | +------------------------+--------+ | Key_blocks_not_flushed | 0 | | Key_blocks_unused | 115973 | | Key_blocks_used | 7 | | Key_read_requests | 19 | | Key_reads | 5 | | Key_write_requests | 2 | | Key_writes | 2 | +------------------------+--------+