SHOW STATUS

You are viewing an old version of this article. View the current version here.

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      |
+------------------------+--------+

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.