Parameters
| Name | Type | Mode |
|---|---|---|
| in_max_runtime | int unsigned | IN |
| in_interval | int unsigned | IN |
| in_auto_config | enum('current','medium','full') | IN |
Create a report of the current status of the server for diagnostics purposes. Data collected includes (some items depends on versions and settings):
Some of the sys schema views are calculated as initial (optional), overall, delta:
Requires the SUPER privilege for “SET sql_log_bin = 0;”.
in_max_runtime (INT UNSIGNED): The maximum time to keep collecting data. Use NULL to get the default which is 60 seconds, otherwise enter a value greater than 0. in_interval (INT UNSIGNED): How long to sleep between data collections. Use NULL to get the default which is 30 seconds, otherwise enter a value greater than 0. in_auto_config (ENUM(‘current’, ‘medium’, ‘full’)) Automatically enable Performance Schema instruments and consumers. NOTE: The more that are enabled, the more impact on the performance. Supported values are: * current - use the current settings. * medium - enable some settings. This requires the SUPER privilege. * full - enables all settings. This will have a big impact on the performance - be careful using this option. This requires the SUPER privilege. If another setting the ‘current’ is chosen, the current settings are restored at the end of the procedure.
sys.diagnostics.allow_i_s_tables Specifies whether it is allowed to do table scan queries on information_schema.TABLES. This can be expensive if there are many tables. Set to ‘ON’ to allow, ‘OFF’ to not allow. Default is ‘OFF’.
sys.diagnostics.include_raw Set to ‘ON’ to include the raw data (e.g. the original output of “SELECT * FROM sys.metrics”). Use this to get the initial values of the various views. Default is ‘OFF’.
sys.statement_truncate_len How much of queries in the process list output to include. Default is 64.
sys.debug Whether to provide debugging output. Default is ‘OFF’. Set to ‘ON’ to include.
To create a report and append it to the file diag.out:
mysql> TEE diag.out; mysql> CALL sys.diagnostics(120, 30, ‘current’); … mysql> NOTEE;
| Name | Type | Mode |
|---|---|---|
| in_max_runtime | int unsigned | IN |
| in_interval | int unsigned | IN |
| in_auto_config | enum('current','medium','full') | IN |