Viewing Current Server Diagnostics

View the current server diagnostics by running the sys.diagnostics stored procedure.

Data collected by sys.diagnostics includes:
  • Information from sys.metriccs view. See The metrics View.
  • Information from other relevant sys schema views
  • Replication status (both source and replica)
Some of the sys schema views are calculated as initial (optional), overall, and delta values:
  • The initial view is the content of the view at the start of the diagnostics() procedure.
  • The overall view is the content of the view at the end of the diagnostics() procedure.
  • The delta view is the difference from the beginning to the end of procedure execution. The minimum and maximum values are the minimum and maximum values from the end view, respectively.

Using a Command-Line Client

Use a command-line client such as MySQL Client or MySQL Shell to run the sys.diagnostics stored procedure.

This task requires the following:
  • A running DB system.
  • A DB system connected using MySQL Shell, MySQL Client, or any command-line client of your choice.
Do the following to run the sys.diagnostics stored procedure. using MySQL Shell or MySQL Client:
  1. Run the following command:
    CALL sys.diagnostics(NULL, NULL, 'current');
    The parameters:
    • The first parameter specifies the maximum data collection time in seconds. Use NULL to collect data for the default of 60 seconds.
    • The second parameter specifies the sleep time between data collections in seconds. Use NULL to sleep for the default of 30 seconds.
    • The third parameter specifies the Performance Schema configuration to use. Permitted values are:
      • current: Use the current instrument and consumer settings.
      • medium: Enable some instruments and consumers.
      • full: Enable all instruments and consumers.
      Note

      current is supported in all HeatWave versions. medium and full are supported from 8.0.43, 8.4.6, and 9.4.0 onwards.
    As an example, to specify the maximum collection time to 120 seconds and sleep time to 20 seconds:
    CALL sys.diagnostics(120, 20, 'current');