MySQL 26.10.0
Source Code Documentation
hm Namespace Reference

Namespaces

namespace  anonymous_namespace{health_monitor_cpu_adapter-t.cc}
 
namespace  anonymous_namespace{health_monitor_cpu_mapping.cc}
 
namespace  anonymous_namespace{health_monitor_disk_forecast_reset-t.cc}
 
namespace  anonymous_namespace{health_monitor_filesystem_adapter-t.cc}
 
namespace  anonymous_namespace{health_monitor_filesystem_sample.cc}
 
namespace  anonymous_namespace{health_monitor_host_memory_adapter-t.cc}
 
namespace  anonymous_namespace{health_monitor_memory_adapter-t.cc}
 
namespace  anonymous_namespace{health_monitor_memory_mapping.cc}
 
namespace  anonymous_namespace{health_monitor_process_memory_adapter-t.cc}
 
namespace  anonymous_namespace{health_monitor_process_memory_mapping.cc}
 
namespace  anonymous_namespace{health_monitor_process_stats_mapping.cc}
 
namespace  anonymous_namespace{health_monitor_process_threads_adapter-t.cc}
 
namespace  anonymous_namespace{health_monitor_storage_adapter-t.cc}
 
namespace  anonymous_namespace{health_monitor_storage_mapping.cc}
 
namespace  anonymous_namespace{health_monitor_system_vars.cc}
 
namespace  anonymous_namespace{health_monitor_util-t.cc}
 
namespace  configuration
 
namespace  ds
 
namespace  ms
 
namespace  ss
 

Classes

class  Collector
 
class  Cycle_Timer
 Cycle-driven timer. More...
 
class  Disk_Collector
 Disk Collector. More...
 
struct  Disk_Forecast
 Forecast record. More...
 
struct  Disk_forecast_reset_context
 The context reset atomically discards all forecasting state, and is used when the monitored filesystem changes. More...
 
struct  Disk_Forecast_Summary
 
class  Disk_Forecaster
 
struct  Disk_Info
 Disk Info Record structure for health_block_device. More...
 
struct  Disk_Metric
 Disk metric time series. More...
 
struct  Disk_Metric_Aggregate
 Aggregated disk metric. More...
 
class  Fallback_State
 Fallback State. More...
 
struct  Filesystem_sample_state
 
class  fmt
 
struct  GR_Status
 Group Replication status. More...
 
class  GR_Status_Listener
 Group replication status listener. More...
 
class  Health_Monitor
 Own the objects used by one Health Monitor component instance. More...
 
struct  Health_process_memory_row
 
struct  Health_system_memory_row
 
class  Log
 
class  Memory_Collector
 Memory Collector. More...
 
struct  Memory_Info
 Memory Info Record structure for health_process_memory and health_system_memory. More...
 
class  Metric_Buffer
 Metric_Buffer extends the circular buffer, Stat_Buffer, with a two-way read/write capability such that it can be shared between multiple collectors. More...
 
class  Mode_Timer
 Server mode timer used for fallback mode, recovery mode, etc. More...
 
class  Monitored_path_cache
 Store and synchronize the effective automatic monitored path. More...
 
class  mutex_guard
 Scoped mutex. More...
 
class  Option_Usage
 Option usage tracking for the Health Monitor component. More...
 
class  Periodic_Reporter
 The Periodic_Reporter has a framework for printing reports to some destination. More...
 
struct  Process_Memory_Info
 
struct  Query
 
class  Query_Manager
 Query processor. More...
 
class  Recovery_State
 Recovery State. More...
 
struct  Report
 
class  Report_Definition_Manager
 The Report_Definition_Manager keeps track of all the report definitions for a reporter. More...
 
class  Retry_Timer
 Retry timer with backoff. More...
 
class  rwlock_guard
 Scoped r/w lock. More...
 
class  Server
 Server utility class. More...
 
class  Stat_Buffer
 Sample data buffer. More...
 
class  Status_vars
 
class  Statvar
 
class  Supervisor
 
class  System_Collector
 System Collector. More...
 
struct  System_CPU_Stats
 
struct  System_Disk_Stats
 
struct  System_Disk_Table_Row
 
struct  System_Memory_Info
 
struct  System_Memory_Stats
 
struct  System_Process_Stats
 
struct  System_process_stats_row
 
class  System_vars
 
class  Sysvar
 
class  Sysvar_base
 
class  table_base
 
struct  table_base_pos
 
class  table_system_cpu_stats
 
class  table_system_cpu_stats_base
 
class  table_system_cpu_stats_history
 
struct  table_system_cpu_stats_row
 
class  table_system_disk_stats
 
class  table_system_disk_stats_base
 
class  table_system_disk_stats_history
 
class  table_system_memory_stats
 
class  table_system_memory_stats_base
 
class  table_system_memory_stats_history
 
struct  table_system_memory_stats_row
 
class  table_system_process_stats
 
class  table_system_process_stats_base
 
class  table_system_process_stats_history
 
class  Tables
 Table manager for all Health Monitor tables in the Performance Schema. More...
 
class  Thread
 
class  Triggered_Reporter
 The Triggered_Reporter overrides run_process to react only to signals. More...
 
class  utl
 

Typedefs

using Disk_Stats_Buffer = std::shared_ptr< Stat_Buffer< Disk_Info > >
 
using Disk_Metric_Buffer = std::shared_ptr< Metric_Buffer< Disk_Metric > >
 
using Disk_Metric_Aggregate_Buffer = std::shared_ptr< Stat_Buffer< Disk_Metric_Aggregate > >
 
using Disk_Forecast_Buffer = std::shared_ptr< Stat_Buffer< Disk_Forecast > >
 
using Disk_Forecast_Summary_Buffer = std::shared_ptr< Stat_Buffer< Disk_Forecast_Summary > >
 
using Disk_writeable_getter = std::function< bool()>
 
using Disk_writeable_setter = std::function< void(bool)>
 
using Disk_series_reset_action = std::function< void()>
 
using Disk_record_writer = std::function< void(const Disk_Info &)>
 
using weak_option = weak_service_reference< const mysql_service_mysql_option_tracker_option_t, k_component_name, k_tracker_name >
 
typedef std::string Field
 
typedef std::vector< std::string > Row
 
typedef std::vector< Row > Result_Set
 
using Internal_Queries = std::map< const std::string, Query >
 
using Reports = std::map< const std::string, Report >
 
using svc_gmst_t = mysql_service_group_member_status_listener_t
 
typedef std::vector< std::string > Processlist_Ids
 
using System_CPU_Stats_Buffer = std::shared_ptr< Stat_Buffer< System_CPU_Stats > >
 
using System_Disk_Stats_Buffer = std::shared_ptr< Stat_Buffer< System_Disk_Stats > >
 
using System_Process_Stats_Buffer = std::shared_ptr< Stat_Buffer< System_Process_Stats > >
 
using System_Memory_Stats_Buffer = std::shared_ptr< Stat_Buffer< System_Memory_Stats > >
 
using sv_bool = Sysvar< bool >
 
using sv_int = Sysvar< int >
 
using sv_ulong = Sysvar< uint64_t >
 
using sv_char = Sysvar< const char * >
 
using sv_double = Sysvar< double >
 

Enumerations

enum class  Yes_No { YES = 1 , NO = 2 }
 
enum class  Dfx_Status { NONE , NORMAL , WARNING , CRITICAL }
 
enum class  Filesystem_change { initial , unchanged , capacity_changed , identity_changed }
 
enum class  Process_memory_metric { resident_bytes , data_bytes , swap_bytes , page_faults }
 
enum class  Process_threads_conversion_result { success , degraded , failure }
 
enum class  Process_thread_metric {
  user_time , system_time , child_user_time , child_system_time ,
  thread_count , virtual_bytes , resident_bytes , resident_limit_bytes ,
  processor , block_io_delay , guest_time , child_guest_time ,
  read_bytes , write_bytes
}
 

Functions

 REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_command_factory, cmd_factory_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_command_thread, cmd_thread_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_command_options, cmd_options_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_command_query, cmd_query_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_command_query_result, cmd_query_result_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_command_field_info, cmd_field_info_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_command_error_info, cmd_error_info_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_command_field_metadata, cmd_field_meta_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (log_builtins, log_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (log_builtins_string, log_string_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (registry, registry_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (registry_registration, registry_reg_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (status_variable_registration, statvar_register_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_status_variable_string, status_variable_reader_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_charset, charset_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_string_charset_converter, string_converter_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_string_factory, string_factory_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (component_sys_variable_register, sysvar_register_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (component_sys_variable_unregister, sysvar_unregister_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_system_variable_reader, sysvar_reader_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_system_variable_update_string, sysvar_update_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_global_variable_attributes, sysvar_attributes_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (pfs_plugin_table_v1, table_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (pfs_plugin_column_bigint_v1, bigint_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (pfs_plugin_column_decimal_v1, decimal_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (pfs_plugin_column_double_v1, double_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (pfs_plugin_column_enum_v1, enum_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (pfs_plugin_column_integer_v1, integer_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (pfs_plugin_column_string_v2, string_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (pfs_plugin_column_timestamp_v2, timestamp_srv)
 
mysql_service_status_t health_monitor_component_init ()
 Initialize the Health Monitor component. More...
 
mysql_service_status_t health_monitor_component_deinit ()
 Deinitialize the Health Monitor component. More...
 
bool convert_host_cpu_snapshot (const mysql::system_info::Host_cpu_snapshot &snapshot, time_t timestamp, std::vector< System_CPU_Stats > &output)
 Convert a host CPU snapshot into Health Monitor CPU records. More...
 
void reset_disk_series (const Disk_writeable_getter &get_writeable, const Disk_writeable_setter &set_writeable, const Disk_series_reset_action &reset_series)
 Pause disk metric writes, reset the series and restore the prior write state. More...
 
unsigned int disk_metric_position_after_reset (uint64_t total_written)
 Return the next logical metric position after clearing retained rows. More...
 
void clear_disk_forecast_retained_state (size_t &total_metric_count, time_t &last_forecast_time, std::vector< Disk_Forecast > &last_forecasts, Disk_Forecast_Summary &last_forecast_summary, uint64_t &total_mb, uint64_t &last_total_mb, uint64_t &used_mb, double &used_pct, bool &volume_size_changed)
 
void clear_disk_forecast_series_no_lock (const Disk_Metric_Buffer &metric_buffer, const Disk_Metric_Aggregate_Buffer &aggregate_buffer, const Disk_Forecast_Buffer &forecast_buffer, const Disk_Forecast_Summary_Buffer &summary_buffer, Holt_Winters_Forecaster &forecaster, size_t &total_metric_count, time_t &last_forecast_time, std::vector< Disk_Forecast > &last_forecasts, Disk_Forecast_Summary &last_forecast_summary, uint64_t &total_mb, uint64_t &last_total_mb, uint64_t &used_mb, double &used_pct, bool &volume_size_changed)
 Clear metric, model, forecast and reporting state. More...
 
static int clamp_int (int v, int lo, int hi)
 
static int approximate_confidence (const hm::Disk_Forecast &f)
 Compute a display score from interval width relative to forecast magnitude. More...
 
static std::string action_required_for_status (const std::string &status_name)
 
Fallback_State & fallback ()
 Storage State - Modes. More...
 
void start_fallback_timer ()
 
void stop_fallback_timer ()
 
void cancel_fallback_timer ()
 
bool fallback_eligible (bool print_reason=true)
 
bool check_fenced_server_state ()
 
bool forced_fallback_eligible ()
 
Mode_Timer & fallback_timer ()
 
void set_fallback_mode (bool force)
 
void process_expired_fallback_timer ()
 
Recovery_State & recovery ()
 
void check_recovery_status ()
 
bool convert_filesystem_snapshot (const mysql::system_info::Filesystem_snapshot &snapshot, Disk_Info &output)
 Convert a filesystem snapshot into a Disk Collector record. More...
 
Filesystem_change classify_filesystem_change (const Filesystem_sample_state &state, const Disk_Info &sample)
 Classify a complete sample against the last successful sample. More...
 
bool accept_filesystem_snapshot (const mysql::system_info::Filesystem_snapshot &snapshot, Filesystem_sample_state &state, Disk_Info &output, Filesystem_change &change)
 Accept a complete snapshot and update the last successful sample state. More...
 
void publish_filesystem_records (Disk_Info &sample, time_t timestamp, bool write_stat, bool write_metric, Filesystem_change change, const Disk_series_reset_action &reset_series, const Disk_record_writer &stat_writer, const Disk_record_writer &metric_writer)
 Publish the records for one complete filesystem sample. More...
 
int rwlock_wrlock (mysql_rwlock_t *lock, const char *file, int line)
 Acquire a write lock. More...
 
int rwlock_rdlock (mysql_rwlock_t *lock, const char *file, int line)
 Acquire a read lock. More...
 
void rwlock_unlock (mysql_rwlock_t *lock)
 Unlock a read or write lock. More...
 
std::string bool_to_string (bool value, const std::string &if_true, const std::string &if_false)
 Boolean to string helper functions. More...
 
std::string on_off (bool value)
 
std::string true_false (bool value)
 
std::string bool_to_string (bool value, std::string &if_true, std::string &if_false)
 
template<typename Process_writer , typename System_writer >
void publish_memory_records (Memory_Info &memory_info, time_t timestamp, Process_writer &&write_process, System_writer &&write_system)
 Timestamp and publish the records for one memory sample. More...
 
bool convert_host_memory_snapshot (const mysql::system_info::Host_memory_snapshot &snapshot, time_t timestamp, System_Memory_Stats &output)
 Convert a host memory snapshot into a System Memory Stats record. More...
 
bool convert_host_memory_snapshot (const mysql::system_info::Host_memory_snapshot &snapshot, System_Memory_Info &output)
 Convert a host memory snapshot into a Memory Collector record. More...
 
Health_system_memory_row make_health_system_memory_row (const System_Memory_Info &record)
 Convert a system memory record into a Performance Schema table row. More...
 
bool health_system_memory_column_is_null (const Health_system_memory_row &row, unsigned int index)
 Determine whether a nullable memory column is NULL. More...
 
template<typename T , typename U >
constexpr bool CanTypeFitValue (const U value)
 
template<typename T , typename U >
T Clamp (U x)
 
static void get_metric_disk_used_percent (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_memory_used_percent (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_disk_available (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_disk_total (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_cpu_system_time (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_cpu_system_time_per_core (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_reads (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_reads_per_partition (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_reads_bytes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_reads_bytes_per_partition (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_reads_time (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_reads_time_per_partition (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_writes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_writes_per_partition (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_writes_bytes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_writes_bytes_per_partition (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_writes_time (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_writes_time_per_partition (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_flushes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_flushes_per_partition (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_flushes_time (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_disk_flushes_time_per_partition (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_proc_time (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static bool read_latest_process_metric (const Process_thread_metric metric, System_Process_Stats &record)
 
static void deliver_single_process_metric (const Process_thread_metric metric, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_proc_num_threads (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_proc_vsize (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_proc_rss (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_proc_rsslim (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_proc_processor (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_proc_delayacct_blkio (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_proc_guest_time (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_proc_cguest_time (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_proc_read_bytes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_proc_write_bytes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_memory_total_bytes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_memory_free_bytes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_memory_avail_bytes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_memory_used_bytes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_memory_buffers_bytes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_memory_cached_bytes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_memory_slab_bytes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_memory_swap_total_bytes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_memory_swap_free_bytes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_memory_swap_used_bytes (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_memory_swap_in (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_system_memory_swap_out (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_super_read_only_disk_full (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_memory_process_page_faults (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_memory_process_vmrss (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_memory_process_vmdata (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
static void get_metric_memory_process_vmswap (void *, measurement_delivery_callback_t delivery, void *delivery_context)
 
size_t get_health_meter_count ()
 
const std::string k_component_name ("component_health_monitor")
 
const std::string k_option_name ("Health Monitor")
 
const std::string k_tracker_name ("mysql_option_tracker_option")
 
static bool cb_set_usage_count (unsigned long long new_value)
 
bool convert_process_memory_snapshot (const mysql::system_info::Process_memory_snapshot &snapshot, Process_Memory_Info &output)
 Convert a process memory snapshot into a Health Monitor memory record. More...
 
bool process_memory_snapshot_is_unavailable (const mysql::system_info::Process_memory_snapshot &snapshot)
 Check whether the process memory row must be omitted as unavailable. More...
 
Health_process_memory_row make_health_process_memory_row (const Process_Memory_Info &record)
 Convert a process memory record into a Performance Schema table row. More...
 
bool health_process_memory_column_is_null (const Health_process_memory_row &row, unsigned int index)
 Determine whether a process memory column is NULL. More...
 
template<typename Delivery >
bool deliver_process_memory_metric (const Process_Memory_Info &record, const Process_memory_metric metric, Delivery &&delivery)
 Deliver one available process memory metric. More...
 
bool update_process_threads_error_state (Process_threads_conversion_result result, bool &error_state)
 Update process thread warning suppression after conversion. More...
 
Process_threads_conversion_result convert_process_threads_snapshot (const mysql::system_info::Process_threads_snapshot &snapshot, time_t timestamp, std::vector< System_Process_Stats > &output)
 Convert process threads snapshot into multiple Health Monitor process records. More...
 
System_process_stats_row make_system_process_stats_row (const System_Process_Stats &record)
 Convert a process thread record into a Performance Schema table row. More...
 
bool system_process_stats_column_is_null (const System_process_stats_row &row, unsigned int index)
 Determine whether a process thread metric column is NULL. More...
 
bool process_thread_metric_available (const System_Process_Stats &record, const Process_thread_metric metric)
 Determine whether a process thread metric is available. More...
 
template<typename Reader >
bool select_latest_process_thread_metric (const int count, const Process_thread_metric metric, Reader &&reader, System_Process_Stats &output)
 Select the newest record that contains a process thread metric. More...
 
template<typename Delivery >
bool deliver_process_thread_metric (const System_Process_Stats &record, const Process_thread_metric metric, Delivery &&delivery)
 Deliver one process thread metric. More...
 
Result_state convert_storage_snapshot (const mysql::system_info::Storage_snapshot &snapshot, time_t timestamp, std::vector< System_Disk_Stats > &output)
 Convert a storage snapshot into Health Monitor disk records. More...
 
System_Disk_Table_Row make_system_disk_table_row (const System_Disk_Stats &record)
 Convert a disk record into a Performance Schema table row. More...
 
bool system_disk_table_column_is_null (const System_Disk_Table_Row &row, unsigned int index)
 Determine whether disk table column is NULL. More...
 
bool system_disk_read_write_metric_eligible (const System_Disk_Stats &record, bool partition)
 Determine whether a read/write metric can use a disk record. More...
 
bool system_disk_flush_metric_eligible (const System_Disk_Stats &record, bool partition)
 Determine whether a flush metric can use a disk record. More...
 
static void * start_routine (void *arg)
 Static routine for thread instrumentation interface. More...
 
PFS_engine_table_share_proxy * table_system_cpu_stats_init ()
 
PFS_engine_table_share_proxy * table_system_cpu_stats_base_init (PFS_engine_table_share_proxy &share, const char *table_name, Access_control acl)
 
PFS_engine_table_share_proxy * table_system_cpu_stats_history_init (std::shared_ptr< Stat_Buffer< System_CPU_Stats > > buffer)
 
void table_system_cpu_stats_history_deinit ()
 
PFS_engine_table_share_proxy * table_system_cpu_stats_history_init (std::shared_ptr< hm::Stat_Buffer< hm::System_CPU_Stats > > stat_buffer)
 
PFS_engine_table_share_proxy * table_system_disk_stats_init ()
 
PFS_engine_table_share_proxy * table_system_disk_stats_base_init (PFS_engine_table_share_proxy &share, const char *table_name, Access_control acl)
 
PFS_engine_table_share_proxy * table_system_disk_stats_history_init (std::shared_ptr< Stat_Buffer< System_Disk_Stats > > buffer)
 
void table_system_disk_stats_history_deinit ()
 
PFS_engine_table_share_proxy * table_system_disk_stats_history_init (std::shared_ptr< hm::Stat_Buffer< hm::System_Disk_Stats > > stat_buffer)
 
PFS_engine_table_share_proxy * table_system_memory_stats_init ()
 
PFS_engine_table_share_proxy * table_system_memory_stats_base_init (PFS_engine_table_share_proxy &share, const char *table_name, Access_control acl)
 
PFS_engine_table_share_proxy * table_system_memory_stats_history_init (std::shared_ptr< Stat_Buffer< System_Memory_Stats > > buffer)
 
void table_system_memory_stats_history_deinit ()
 
PFS_engine_table_share_proxy * table_system_memory_stats_history_init (std::shared_ptr< hm::Stat_Buffer< hm::System_Memory_Stats > > stat_buffer)
 
PFS_engine_table_share_proxy * table_system_process_stats_init ()
 
PFS_engine_table_share_proxy * table_system_process_stats_base_init (PFS_engine_table_share_proxy &share, const char *table_name, Access_control acl)
 
PFS_engine_table_share_proxy * table_system_process_stats_history_init (std::shared_ptr< Stat_Buffer< System_Process_Stats > > buffer)
 
void table_system_process_stats_history_deinit ()
 
PFS_engine_table_share_proxy * table_system_process_stats_history_init (std::shared_ptr< hm::Stat_Buffer< hm::System_Process_Stats > > stat_buffer)
 

Variables

static constexpr int max_int {std::numeric_limits<int>::max()}
 
static constexpr uint64_t max_uint64_t {std::numeric_limits<uint64_t>::max()}
 
static constexpr uint64_t microseconds_per_second {1000000}
 
static constexpr uint64_t hundredth_ns {10000000}
 
static constexpr uint64_t days_per_year {365}
 
static constexpr uint64_t seconds_per_minute {60}
 
static constexpr uint64_t seconds_per_hour {3600}
 
static constexpr uint64_t seconds_per_day {86400}
 
static constexpr uint64_t seconds_per_week {seconds_per_day * 7}
 
static constexpr uint64_t seconds_per_month {seconds_per_day * 30}
 
static constexpr uint64_t seconds_per_year {seconds_per_day * days_per_year}
 
static constexpr uint64_t minutes_per_hour {60}
 
static constexpr uint64_t minutes_per_day {minutes_per_hour * 24}
 
static constexpr uint64_t minutes_per_month {minutes_per_day * 30}
 
static constexpr uint64_t mib {1}
 
static constexpr uint64_t gib {1024 * mib}
 
static constexpr uint64_t tib {1024 * gib}
 
static constexpr uint64_t pib {1024 * tib}
 
static constexpr uint64_t eib {1024 * pib}
 
static constexpr int megabyte {1048576}
 
static constexpr double MiB {1048576.0}
 
static constexpr uint64_t k_max_level {ULLONG_MAX - 1}
 
constexpr bool Lock_Write = true
 
constexpr bool Lock_Read = false
 
const std::string eq {"="}
 
constexpr size_t proc_attr_count = 4
 
static const char * proc_attr_names [proc_attr_count]
 
static PSI_metric_info_v1 disk_metrics []
 
static PSI_metric_info_v1 memory_metrics []
 
static PSI_metric_info_v1 cpu_metrics []
 
PSI_meter_info_v1 health_meter []
 
static bool cb_error {false}
 
static const char * k_GR_listener_service_name {"group_member_status_listener.health_monitor"}
 Group Replication status listener. More...
 
static const mysql_service_group_member_status_listener_t svc_gmst_def
 
my_h_service h_gmst_listener = reinterpret_cast<my_h_service>(const_cast<svc_gmst_t *>(&svc_gmst_def))
 
const std::string k_offline_mode_disk_full {"offline_mode_disk_full"}
 
const std::string k_super_read_only_disk_full {"super_read_only_disk_full"}
 
const std::string k_recovery_cycles {"recovery_cycles"}
 
const std::string k_option_tracker_usage {"option_tracker_usage:Health Monitor"}
 
const std::string k_disk_forecaster_run_mode {"disk_forecaster_run_mode"}
 
const std::string k_disk_forecaster_test_state {"disk_forecaster_test_state"}
 
static constexpr auto sysvar_prefix {"health_monitor"}
 
static constexpr char default_filename [] {""}
 
static const int k_default_timer_interval {10}
 
static const int k_default_timer_timeout {60}
 
static const int k_default_report_interval {30}
 
static PFS_engine_table_share_proxy table_share
 
static PFS_engine_table_share_proxy table_share
 
static std::shared_ptr< Stat_Buffer< System_CPU_Stats > > stat_buffer {nullptr}
 
static PFS_engine_table_share_proxy table_share
 
static PFS_engine_table_share_proxy table_share
 
static std::shared_ptr< Stat_Buffer< System_Disk_Stats > > stat_buffer {nullptr}
 
static PFS_engine_table_share_proxy table_share
 
static PFS_engine_table_share_proxy table_share
 
static std::shared_ptr< Stat_Buffer< System_Memory_Stats > > stat_buffer {nullptr}
 
static PFS_engine_table_share_proxy table_share
 
static PFS_engine_table_share_proxy table_share
 
static std::shared_ptr< Stat_Buffer< System_Process_Stats > > stat_buffer {nullptr}
 

Typedef Documentation

◆ Disk_Forecast_Buffer

using hm::Disk_Forecast_Buffer = typedef std::shared_ptr<Stat_Buffer<Disk_Forecast> >

◆ Disk_Forecast_Summary_Buffer

◆ Disk_Metric_Aggregate_Buffer

◆ Disk_Metric_Buffer

using hm::Disk_Metric_Buffer = typedef std::shared_ptr<Metric_Buffer<Disk_Metric> >

◆ Disk_record_writer

using hm::Disk_record_writer = typedef std::function<void(const Disk_Info &)>

◆ Disk_series_reset_action

typedef std::function< void()> hm::Disk_series_reset_action

◆ Disk_Stats_Buffer

using hm::Disk_Stats_Buffer = typedef std::shared_ptr<Stat_Buffer<Disk_Info> >

◆ Disk_writeable_getter

using hm::Disk_writeable_getter = typedef std::function<bool()>

◆ Disk_writeable_setter

using hm::Disk_writeable_setter = typedef std::function<void(bool)>

◆ Field

typedef std::string hm::Field

◆ Internal_Queries

using hm::Internal_Queries = typedef std::map<const std::string, Query>

◆ Processlist_Ids

typedef std::vector<std::string> hm::Processlist_Ids

◆ Reports

using hm::Reports = typedef std::map<const std::string, Report>

◆ Result_Set

typedef std::vector<Row> hm::Result_Set

◆ Row

typedef std::vector<std::string> hm::Row

◆ sv_bool

using hm::sv_bool = typedef Sysvar<bool>

◆ sv_char

using hm::sv_char = typedef Sysvar<const char *>

◆ sv_double

using hm::sv_double = typedef Sysvar<double>

◆ sv_int

using hm::sv_int = typedef Sysvar<int>

◆ sv_ulong

using hm::sv_ulong = typedef Sysvar<uint64_t>

◆ svc_gmst_t

◆ System_CPU_Stats_Buffer

using hm::System_CPU_Stats_Buffer = typedef std::shared_ptr<Stat_Buffer<System_CPU_Stats> >

◆ System_Disk_Stats_Buffer

using hm::System_Disk_Stats_Buffer = typedef std::shared_ptr<Stat_Buffer<System_Disk_Stats> >

◆ System_Memory_Stats_Buffer

◆ System_Process_Stats_Buffer

◆ weak_option

Enumeration Type Documentation

◆ Dfx_Status

enum class hm::Dfx_Status
strong
Enumerator
NONE 
NORMAL 
WARNING 
CRITICAL 

◆ Filesystem_change

enum class hm::Filesystem_change
strong
Enumerator
initial 
unchanged 
capacity_changed 
identity_changed 

◆ Process_memory_metric

enum class hm::Process_memory_metric
strong
Enumerator
resident_bytes 
data_bytes 
swap_bytes 
page_faults 

◆ Process_thread_metric

enum class hm::Process_thread_metric
strong
Enumerator
user_time 
system_time 
child_user_time 
child_system_time 
thread_count 
virtual_bytes 
resident_bytes 
resident_limit_bytes 
processor 
block_io_delay 
guest_time 
child_guest_time 
read_bytes 
write_bytes 

◆ Process_threads_conversion_result

Enumerator
success 
degraded 
failure 

◆ Yes_No

enum class hm::Yes_No
strong
Enumerator
YES 
NO 

Function Documentation

◆ accept_filesystem_snapshot()

bool hm::accept_filesystem_snapshot ( const mysql::system_info::Filesystem_snapshot &  snapshot,
Filesystem_sample_state &  state,
Disk_Info &  output,
Filesystem_change &  change 
)

Accept a complete snapshot and update the last successful sample state.

Parameters
[in]snapshotFilesystem snapshot to convert
[in,out]stateLast successful filesystem identity and capacity
[in,out]outputDestination record, unchanged on failure
[in,out]changeSample classification, unchanged on failure
Returns
true on success, false on failure

◆ action_required_for_status()

static std::string hm::action_required_for_status ( const std::string &  status_name)
inlinestatic

◆ approximate_confidence()

static int hm::approximate_confidence ( const hm::Disk_Forecast &  f)
inlinestatic

Compute a display score from interval width relative to forecast magnitude.

This score is not a statistical confidence level.

span = |CI_UB − CI_LB| half = span / 2 denom = max(1, |FORECAST_MB|) conf = 100 * (1 − half / denom), then clamped to [0, 99] and rounded

Parameters
[in]fHorizon forecast containing forecast_mb and CI bounds.
Returns
Score in [0, 99]. Larger values indicate narrower intervals relative to the forecast magnitude.

◆ bool_to_string() [1/2]

std::string hm::bool_to_string ( bool  value,
const std::string &  if_true,
const std::string &  if_false 
)

Boolean to string helper functions.

Parameters
valueboolean
if_trueString if 'value' is true
if_falseString if 'value' is false
Returns
string boolean

◆ bool_to_string() [2/2]

std::string hm::bool_to_string ( bool  value,
std::string &  if_true,
std::string &  if_false 
)

◆ cancel_fallback_timer()

void hm::cancel_fallback_timer ( )

◆ CanTypeFitValue()

template<typename T , typename U >
constexpr bool hm::CanTypeFitValue ( const U  value)
constexpr

◆ cb_set_usage_count()

static bool hm::cb_set_usage_count ( unsigned long long  new_value)
static

◆ check_fenced_server_state()

bool hm::check_fenced_server_state ( )

◆ check_recovery_status()

void hm::check_recovery_status ( )

◆ Clamp()

template<typename T , typename U >
T hm::Clamp ( U  x)

◆ clamp_int()

static int hm::clamp_int ( int  v,
int  lo,
int  hi 
)
inlinestatic

◆ classify_filesystem_change()

Filesystem_change hm::classify_filesystem_change ( const Filesystem_sample_state &  state,
const Disk_Info &  sample 
)

Classify a complete sample against the last successful sample.

Parameters
[in]stateLast successful filesystem identity and capacity
[in]sampleComplete current filesystem sample
Returns
Classification of the current sample

◆ clear_disk_forecast_retained_state()

void hm::clear_disk_forecast_retained_state ( size_t &  total_metric_count,
time_t &  last_forecast_time,
std::vector< Disk_Forecast > &  last_forecasts,
Disk_Forecast_Summary &  last_forecast_summary,
uint64_t &  total_mb,
uint64_t &  last_total_mb,
uint64_t &  used_mb,
double &  used_pct,
bool &  volume_size_changed 
)

◆ clear_disk_forecast_series_no_lock()

void hm::clear_disk_forecast_series_no_lock ( const Disk_Metric_Buffer &  metric_buffer,
const Disk_Metric_Aggregate_Buffer &  aggregate_buffer,
const Disk_Forecast_Buffer &  forecast_buffer,
const Disk_Forecast_Summary_Buffer &  summary_buffer,
Holt_Winters_Forecaster &  forecaster,
size_t &  total_metric_count,
time_t &  last_forecast_time,
std::vector< Disk_Forecast > &  last_forecasts,
Disk_Forecast_Summary &  last_forecast_summary,
uint64_t &  total_mb,
uint64_t &  last_total_mb,
uint64_t &  used_mb,
double &  used_pct,
bool &  volume_size_changed 
)

Clear metric, model, forecast and reporting state.

The caller must hold the buffer write lock and forecast model write lock.

◆ convert_filesystem_snapshot()

bool hm::convert_filesystem_snapshot ( const mysql::system_info::Filesystem_snapshot &  snapshot,
Disk_Info &  output 
)

Convert a filesystem snapshot into a Disk Collector record.

The snapshot must be complete to be converted into a Disk Collector record.

  • Filesystem_identity and Filesystem_usage must have a valid System_result.
  • 'Unavailable' means there is no equivalent on this platform.
  • 'Failed' means that the collection attempt failed.
Parameters
[in]snapshotFilesystem snapshot to convert
[in,out]outputDestination record, unchanged on failure
Returns
true on success, false on failure

◆ convert_host_cpu_snapshot()

bool hm::convert_host_cpu_snapshot ( const mysql::system_info::Host_cpu_snapshot &  snapshot,
time_t  timestamp,
std::vector< System_CPU_Stats > &  output 
)

Convert a host CPU snapshot into Health Monitor CPU records.

CPU times in Cpu_times_snapshot are required. Extended CPU times are optional and will be represented as NULL in the table. For example, extended CPU times are unavailable on macOS because it has no supported equivalent.

Parameters
[in]snapshotCPU snapshot to convert
[in]timestampTimestamp for every converted record
[in,out]outputDestination records, unchanged on failure
Returns
true on success, false on failure

◆ convert_host_memory_snapshot() [1/2]

bool hm::convert_host_memory_snapshot ( const mysql::system_info::Host_memory_snapshot &  snapshot,
System_Memory_Info &  output 
)

Convert a host memory snapshot into a Memory Collector record.

The snapshot must have a valid System_result to be converted.

  • 'Unavailable' for a value means there is no equivalent on this platform.
  • 'Failed' means that the collection attempt failed.

If the record is complete but a value is unavailable, then that value is represented as NULL in the table.

Parameters
[in]snapshotHost memory snapshot to convert
[in,out]outputDestination record, no change on failure
Returns
true on success, false on failure

◆ convert_host_memory_snapshot() [2/2]

bool hm::convert_host_memory_snapshot ( const mysql::system_info::Host_memory_snapshot &  snapshot,
time_t  timestamp,
System_Memory_Stats &  output 
)

Convert a host memory snapshot into a System Memory Stats record.

The snapshot must have a valid System_result to be converted.

  • 'Unavailable' for a value means there is no equivalent on this platform.
  • 'Failed' means that the collection attempt failed.

For example, swap_activity is available on Linux but not macOS, and would be represented as NULL in the memory tables.

Parameters
[in]snapshotMemory snapshot to convert
[in]timestampTimestamp for the converted record
[in,out]outputDestination record, no change on failure
Returns
true on success, false on failure

◆ convert_process_memory_snapshot()

bool hm::convert_process_memory_snapshot ( const mysql::system_info::Process_memory_snapshot &  snapshot,
Process_Memory_Info &  output 
)

Convert a process memory snapshot into a Health Monitor memory record.

Identity and residency must have available System_result values. The details and page_faults fields are optional. Optional fields without available values become SQL NULL.

Parameters
[in]snapshotProcess memory snapshot to convert
[in,out]outputDestination record, unchanged on failure
Returns
true on success, false on failure

◆ convert_process_threads_snapshot()

Process_threads_conversion_result hm::convert_process_threads_snapshot ( const mysql::system_info::Process_threads_snapshot &  snapshot,
time_t  timestamp,
std::vector< System_Process_Stats > &  output 
)

Convert process threads snapshot into multiple Health Monitor process records.

  • Process_identity, Thread_inventory and Thread_cpu_times are required.
  • Runtime, extended CPU, scheduler and I/O capabilities are optional.

A failed optional capability still produces the required rows. For example, if I/O collection fails, the thread rows still contain identity, state and CPU time, however, READ_BYTES and WRITE_BYTES remain NULL, and the corresponding metrics are not delivered.

Parameters
[in]snapshotProcess threads snapshot to convert
[in]timestampTimestamp for every converted record
[in,out]outputDestination records, unchanged on failure
Returns
complete success, 'degraded' success or conversion failure

◆ convert_storage_snapshot()

mysql::system_info::Result_state hm::convert_storage_snapshot ( const mysql::system_info::Storage_snapshot &  snapshot,
time_t  timestamp,
std::vector< System_Disk_Stats > &  output 
)

Convert a storage snapshot into Health Monitor disk records.

This function merges five storage capabilities:

  • Device inventory and disk/partition classification
  • Capacity and sector size
  • Read/write counters
  • Flush counters
  • Partition-to-disk hierarchy

Each capability contains rows keyed by a device name such as sda or sda1. These rows are then joined into one System_Disk_Stats record per device.

For example: inventory: sda = disk capacity: sda = 1 TB read_write: sda = 100 reads, 50 writes flush: unavailable produces an sda record with inventory, capacity and read/write counts, but flush availability is false because it's not available on the platform.

Parameters
[in]snapshotStorage snapshot to convert
[in]timestampTimestamp to apply to every converted record
[in,out]outputDestination records, unchanged unless data is available
Returns
Storage conversion result state

◆ deliver_process_memory_metric()

template<typename Delivery >
bool hm::deliver_process_memory_metric ( const Process_Memory_Info &  record,
const Process_memory_metric  metric,
Delivery &&  delivery 
)

Deliver one available process memory metric.

The delivery function receives the metric value and process ID. It is not called when the metric is unavailable. A value of zero is a valid available measurement.

Parameters
[in]recordprocess memory record
[in]metricMetric to deliver
[in]deliveryDelivery function
Returns
true when the delivery function was called

◆ deliver_process_thread_metric()

template<typename Delivery >
bool hm::deliver_process_thread_metric ( const System_Process_Stats &  record,
const Process_thread_metric  metric,
Delivery &&  delivery 
)

Deliver one process thread metric.

The delivery function receives the metric value. It is not called when the selected metric is unavailable. A value of zero remains an available measurement.

Parameters
[in]recordprocess thread record
[in]metricMetric to deliver
[in]deliveryDelivery function
Returns
true when the delivery function was called

◆ deliver_single_process_metric()

static void hm::deliver_single_process_metric ( const Process_thread_metric  metric,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ disk_metric_position_after_reset()

unsigned int hm::disk_metric_position_after_reset ( uint64_t  total_written)

Return the next logical metric position after clearing retained rows.

Parameters
[in]total_writtenMonotonic count of metrics written
Returns
Logical position for the first metric after reset

◆ fallback()

Fallback_State & hm::fallback ( )

Storage State - Modes.

The Disk Collector will be in one of the following modes:

  • Normal: No action required
  • Fallback: Server is in read-only mode after storage depletion
  • Recovery: Server is in read-only mode after storage depletion, but is now preparing to restore normal operation Storage State - Disk Collector wrappers

◆ fallback_eligible()

bool hm::fallback_eligible ( bool  print_reason = true)

◆ fallback_timer()

Mode_Timer & hm::fallback_timer ( )

◆ forced_fallback_eligible()

bool hm::forced_fallback_eligible ( )

◆ get_health_meter_count()

size_t hm::get_health_meter_count ( )

◆ get_metric_cpu_system_time()

static void hm::get_metric_cpu_system_time ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_cpu_system_time_per_core()

static void hm::get_metric_cpu_system_time_per_core ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_disk_available()

static void hm::get_metric_disk_available ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_disk_total()

static void hm::get_metric_disk_total ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_disk_used_percent()

static void hm::get_metric_disk_used_percent ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_memory_process_page_faults()

static void hm::get_metric_memory_process_page_faults ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_memory_process_vmdata()

static void hm::get_metric_memory_process_vmdata ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_memory_process_vmrss()

static void hm::get_metric_memory_process_vmrss ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_memory_process_vmswap()

static void hm::get_metric_memory_process_vmswap ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_memory_used_percent()

static void hm::get_metric_memory_used_percent ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_super_read_only_disk_full()

static void hm::get_metric_super_read_only_disk_full ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_flushes()

static void hm::get_metric_system_disk_flushes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_flushes_per_partition()

static void hm::get_metric_system_disk_flushes_per_partition ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_flushes_time()

static void hm::get_metric_system_disk_flushes_time ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_flushes_time_per_partition()

static void hm::get_metric_system_disk_flushes_time_per_partition ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_reads()

static void hm::get_metric_system_disk_reads ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_reads_bytes()

static void hm::get_metric_system_disk_reads_bytes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_reads_bytes_per_partition()

static void hm::get_metric_system_disk_reads_bytes_per_partition ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_reads_per_partition()

static void hm::get_metric_system_disk_reads_per_partition ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_reads_time()

static void hm::get_metric_system_disk_reads_time ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_reads_time_per_partition()

static void hm::get_metric_system_disk_reads_time_per_partition ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_writes()

static void hm::get_metric_system_disk_writes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_writes_bytes()

static void hm::get_metric_system_disk_writes_bytes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_writes_bytes_per_partition()

static void hm::get_metric_system_disk_writes_bytes_per_partition ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_writes_per_partition()

static void hm::get_metric_system_disk_writes_per_partition ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_writes_time()

static void hm::get_metric_system_disk_writes_time ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_disk_writes_time_per_partition()

static void hm::get_metric_system_disk_writes_time_per_partition ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_memory_avail_bytes()

static void hm::get_metric_system_memory_avail_bytes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_memory_buffers_bytes()

static void hm::get_metric_system_memory_buffers_bytes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_memory_cached_bytes()

static void hm::get_metric_system_memory_cached_bytes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_memory_free_bytes()

static void hm::get_metric_system_memory_free_bytes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_memory_slab_bytes()

static void hm::get_metric_system_memory_slab_bytes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_memory_swap_free_bytes()

static void hm::get_metric_system_memory_swap_free_bytes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_memory_swap_in()

static void hm::get_metric_system_memory_swap_in ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_memory_swap_out()

static void hm::get_metric_system_memory_swap_out ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_memory_swap_total_bytes()

static void hm::get_metric_system_memory_swap_total_bytes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_memory_swap_used_bytes()

static void hm::get_metric_system_memory_swap_used_bytes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_memory_total_bytes()

static void hm::get_metric_system_memory_total_bytes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_memory_used_bytes()

static void hm::get_metric_system_memory_used_bytes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_proc_cguest_time()

static void hm::get_metric_system_proc_cguest_time ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_proc_delayacct_blkio()

static void hm::get_metric_system_proc_delayacct_blkio ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_proc_guest_time()

static void hm::get_metric_system_proc_guest_time ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_proc_num_threads()

static void hm::get_metric_system_proc_num_threads ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_proc_processor()

static void hm::get_metric_system_proc_processor ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_proc_read_bytes()

static void hm::get_metric_system_proc_read_bytes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_proc_rss()

static void hm::get_metric_system_proc_rss ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_proc_rsslim()

static void hm::get_metric_system_proc_rsslim ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_proc_time()

static void hm::get_metric_system_proc_time ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_proc_vsize()

static void hm::get_metric_system_proc_vsize ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ get_metric_system_proc_write_bytes()

static void hm::get_metric_system_proc_write_bytes ( void *  ,
measurement_delivery_callback_t  delivery,
void *  delivery_context 
)
static

◆ health_monitor_component_deinit()

mysql_service_status_t hm::health_monitor_component_deinit ( )

Deinitialize the Health Monitor component.

◆ health_monitor_component_init()

mysql_service_status_t hm::health_monitor_component_init ( )

Initialize the Health Monitor component.

◆ health_process_memory_column_is_null()

bool hm::health_process_memory_column_is_null ( const Health_process_memory_row &  row,
unsigned int  index 
)

Determine whether a process memory column is NULL.

Parameters
[in]rowTable row
[in]indexPerformance Schema column index
Returns
true when the column is NULL

◆ health_system_memory_column_is_null()

bool hm::health_system_memory_column_is_null ( const Health_system_memory_row &  row,
unsigned int  index 
)

Determine whether a nullable memory column is NULL.

Parameters
[in]rowTable row
[in]indexPerformance Schema column index
Returns
true when the column is NULL

◆ k_component_name()

const std::string hm::k_component_name ( "component_health_monitor"  )

◆ k_option_name()

const std::string hm::k_option_name ( "Health Monitor"  )

◆ k_tracker_name()

const std::string hm::k_tracker_name ( "mysql_option_tracker_option"  )

◆ make_health_process_memory_row()

Health_process_memory_row hm::make_health_process_memory_row ( const Process_Memory_Info &  record)

Convert a process memory record into a Performance Schema table row.

Parameters
[in]recordProcess memory record to convert
Returns
Converted table row

◆ make_health_system_memory_row()

Health_system_memory_row hm::make_health_system_memory_row ( const System_Memory_Info &  record)

Convert a system memory record into a Performance Schema table row.

Parameters
[in]recordSystem-memory record to convert
Returns
Converted table row

◆ make_system_disk_table_row()

System_Disk_Table_Row hm::make_system_disk_table_row ( const System_Disk_Stats &  record)

Convert a disk record into a Performance Schema table row.

Parameters
[in]recordDisk record to convert
Returns
Converted table row

◆ make_system_process_stats_row()

System_process_stats_row hm::make_system_process_stats_row ( const System_Process_Stats &  record)

Convert a process thread record into a Performance Schema table row.

Parameters
[in]recordprocess thread record to convert
Returns
Converted table row

◆ on_off()

std::string hm::on_off ( bool  value)

◆ process_expired_fallback_timer()

void hm::process_expired_fallback_timer ( )

◆ process_memory_snapshot_is_unavailable()

bool hm::process_memory_snapshot_is_unavailable ( const mysql::system_info::Process_memory_snapshot &  snapshot)

Check whether the process memory row must be omitted as unavailable.

The collector omits the row only when every capability is unavailable. Failed capabilities remain failures.

Parameters
[in]snapshotProcess memory snapshot
Returns
true when the complete row is unavailable

◆ process_thread_metric_available()

bool hm::process_thread_metric_available ( const System_Process_Stats &  record,
const Process_thread_metric  metric 
)
inline

Determine whether a process thread metric is available.

Parameters
[in]recordprocess thread record
[in]metricMetric to inspect
Returns
true when the selected metric is available

◆ publish_filesystem_records()

void hm::publish_filesystem_records ( Disk_Info &  sample,
time_t  timestamp,
bool  write_stat,
bool  write_metric,
Filesystem_change  change,
const Disk_series_reset_action &  reset_series,
const Disk_record_writer &  stat_writer,
const Disk_record_writer &  metric_writer 
)

Publish the records for one complete filesystem sample.

A sample is one-time filesystem observation. 'Publishing' the sample means:

  • Set the timestamp.
  • Write to the disk stats buffer (health_block_device).
  • Write to the disk metrics buffer (disk_metrics).
Parameters
[in,out]sampleComplete sample to timestamp and publish
[in]timestampTimestamp used for every published record
[in]write_statWhether to publish the Performance Schema record
[in]write_metricWhether to publish the disk metric
[in]changeCurrent sample classification
[in]reset_seriesIf true, then reset the time series
[in]stat_writerhealth_block_device record writer
[in]metric_writerdisk_metric record writer

◆ publish_memory_records()

template<typename Process_writer , typename System_writer >
void hm::publish_memory_records ( Memory_Info &  memory_info,
time_t  timestamp,
Process_writer &&  write_process,
System_writer &&  write_system 
)

Timestamp and publish the records for one memory sample.

A 'sample' is one-time memory observation. 'Publication' means making its record(s) visible through writers provided by the caller.

The caller provides writers to store the records in their respective buffers.

Parameters
[in,out]memory_infoMemory sample to publish
[in]timestampTimestamp applied to published records
[in]write_processWriter for a process memory record
[in]write_systemWriter for a system memory record

◆ read_latest_process_metric()

static bool hm::read_latest_process_metric ( const Process_thread_metric  metric,
System_Process_Stats &  record 
)
static

◆ recovery()

Recovery_State & hm::recovery ( )

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [1/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( component_sys_variable_register  ,
sysvar_register_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [2/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( component_sys_variable_unregister  ,
sysvar_unregister_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [3/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( log_builtins  ,
log_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [4/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( log_builtins_string  ,
log_string_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [5/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( mysql_charset  ,
charset_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [6/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( mysql_command_error_info  ,
cmd_error_info_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [7/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( mysql_command_factory  ,
cmd_factory_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [8/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( mysql_command_field_info  ,
cmd_field_info_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [9/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( mysql_command_field_metadata  ,
cmd_field_meta_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [10/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( mysql_command_options  ,
cmd_options_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [11/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( mysql_command_query  ,
cmd_query_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [12/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( mysql_command_query_result  ,
cmd_query_result_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [13/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( mysql_command_thread  ,
cmd_thread_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [14/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( mysql_global_variable_attributes  ,
sysvar_attributes_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [15/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( mysql_status_variable_string  ,
status_variable_reader_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [16/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( mysql_string_charset_converter  ,
string_converter_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [17/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( mysql_string_factory  ,
string_factory_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [18/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( mysql_system_variable_reader  ,
sysvar_reader_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [19/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( mysql_system_variable_update_string  ,
sysvar_update_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [20/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( pfs_plugin_column_bigint_v1  ,
bigint_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [21/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( pfs_plugin_column_decimal_v1  ,
decimal_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [22/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( pfs_plugin_column_double_v1  ,
double_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [23/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( pfs_plugin_column_enum_v1  ,
enum_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [24/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( pfs_plugin_column_integer_v1  ,
integer_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [25/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( pfs_plugin_column_string_v2  ,
string_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [26/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( pfs_plugin_column_timestamp_v2  ,
timestamp_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [27/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( pfs_plugin_table_v1  ,
table_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [28/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( registry  ,
registry_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [29/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( registry_registration  ,
registry_reg_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [30/30]

hm::REQUIRES_SERVICE_PLACEHOLDER_AS ( status_variable_registration  ,
statvar_register_srv   
)

◆ reset_disk_series()

void hm::reset_disk_series ( const Disk_writeable_getter &  get_writeable,
const Disk_writeable_setter &  set_writeable,
const Disk_series_reset_action &  reset_series 
)

Pause disk metric writes, reset the series and restore the prior write state.

Parameters
[in]get_writeableWrite state reader
[in]set_writeableWrite state setter
[in]reset_seriesLocked series reset action

◆ rwlock_rdlock()

int hm::rwlock_rdlock ( mysql_rwlock_t *  lock,
const char *  file,
int  line 
)

Acquire a read lock.

Parameters
lockLock object
fileSource file name
lineSource line number
Returns
0 success, 1 failure

◆ rwlock_unlock()

void hm::rwlock_unlock ( mysql_rwlock_t *  lock)

Unlock a read or write lock.

Parameters
lockLock object

◆ rwlock_wrlock()

int hm::rwlock_wrlock ( mysql_rwlock_t *  lock,
const char *  file,
int  line 
)

Acquire a write lock.

Parameters
lockLock object
fileSource file name
lineSource line number
Returns
0 success, 1 failure

◆ select_latest_process_thread_metric()

template<typename Reader >
bool hm::select_latest_process_thread_metric ( const int  count,
const Process_thread_metric  metric,
Reader &&  reader,
System_Process_Stats &  output 
)

Select the newest record that contains a process thread metric.

Records are read by descending index. The search is limited to the newest timestamp so an unavailable current sample cannot fall back to stale data.

Parameters
[in]countNumber of records available to read
[in]metricMetric that must be available
[in]readerFunction that copies the record at an index
[out]outputSelected record, unchanged when no record is selected
Returns
true when a record was selected

◆ set_fallback_mode()

void hm::set_fallback_mode ( bool  force)

◆ start_fallback_timer()

void hm::start_fallback_timer ( )

◆ start_routine()

static void * hm::start_routine ( void *  arg)
static

Static routine for thread instrumentation interface.

◆ stop_fallback_timer()

void hm::stop_fallback_timer ( )

◆ system_disk_flush_metric_eligible()

bool hm::system_disk_flush_metric_eligible ( const System_Disk_Stats &  record,
bool  partition 
)

Determine whether a flush metric can use a disk record.

Parameters
[in]recordDisk record
[in]partitionDevice classification
Returns
true when the record is eligible

◆ system_disk_read_write_metric_eligible()

bool hm::system_disk_read_write_metric_eligible ( const System_Disk_Stats &  record,
bool  partition 
)

Determine whether a read/write metric can use a disk record.

Parameters
[in]recordDisk record
[in]partitionDevice classification
Returns
true when the record is eligible

◆ system_disk_table_column_is_null()

bool hm::system_disk_table_column_is_null ( const System_Disk_Table_Row &  row,
unsigned int  index 
)

Determine whether disk table column is NULL.

Parameters
[in]rowTable row
[in]indexPerformance Schema column index
Returns
true when the column is NULL

◆ system_process_stats_column_is_null()

bool hm::system_process_stats_column_is_null ( const System_process_stats_row &  row,
unsigned int  index 
)

Determine whether a process thread metric column is NULL.

Parameters
[in]rowTable row
[in]indexPerformance Schema column index
Returns
true when the column is NULL

◆ table_system_cpu_stats_base_init()

PFS_engine_table_share_proxy * hm::table_system_cpu_stats_base_init ( PFS_engine_table_share_proxy &  share,
const char *  table_name,
Access_control  acl 
)

◆ table_system_cpu_stats_history_deinit()

void hm::table_system_cpu_stats_history_deinit ( )

◆ table_system_cpu_stats_history_init() [1/2]

PFS_engine_table_share_proxy * hm::table_system_cpu_stats_history_init ( std::shared_ptr< hm::Stat_Buffer< hm::System_CPU_Stats > >  stat_buffer)

◆ table_system_cpu_stats_history_init() [2/2]

PFS_engine_table_share_proxy * hm::table_system_cpu_stats_history_init ( std::shared_ptr< Stat_Buffer< System_CPU_Stats > >  buffer)

◆ table_system_cpu_stats_init()

PFS_engine_table_share_proxy * hm::table_system_cpu_stats_init ( )

◆ table_system_disk_stats_base_init()

PFS_engine_table_share_proxy * hm::table_system_disk_stats_base_init ( PFS_engine_table_share_proxy &  share,
const char *  table_name,
Access_control  acl 
)

◆ table_system_disk_stats_history_deinit()

void hm::table_system_disk_stats_history_deinit ( )

◆ table_system_disk_stats_history_init() [1/2]

PFS_engine_table_share_proxy * hm::table_system_disk_stats_history_init ( std::shared_ptr< hm::Stat_Buffer< hm::System_Disk_Stats > >  stat_buffer)

◆ table_system_disk_stats_history_init() [2/2]

PFS_engine_table_share_proxy * hm::table_system_disk_stats_history_init ( std::shared_ptr< Stat_Buffer< System_Disk_Stats > >  buffer)

◆ table_system_disk_stats_init()

PFS_engine_table_share_proxy * hm::table_system_disk_stats_init ( )

◆ table_system_memory_stats_base_init()

PFS_engine_table_share_proxy * hm::table_system_memory_stats_base_init ( PFS_engine_table_share_proxy &  share,
const char *  table_name,
Access_control  acl 
)

◆ table_system_memory_stats_history_deinit()

void hm::table_system_memory_stats_history_deinit ( )

◆ table_system_memory_stats_history_init() [1/2]

PFS_engine_table_share_proxy * hm::table_system_memory_stats_history_init ( std::shared_ptr< hm::Stat_Buffer< hm::System_Memory_Stats > >  stat_buffer)

◆ table_system_memory_stats_history_init() [2/2]

PFS_engine_table_share_proxy * hm::table_system_memory_stats_history_init ( std::shared_ptr< Stat_Buffer< System_Memory_Stats > >  buffer)

◆ table_system_memory_stats_init()

PFS_engine_table_share_proxy * hm::table_system_memory_stats_init ( )

◆ table_system_process_stats_base_init()

PFS_engine_table_share_proxy * hm::table_system_process_stats_base_init ( PFS_engine_table_share_proxy &  share,
const char *  table_name,
Access_control  acl 
)

◆ table_system_process_stats_history_deinit()

void hm::table_system_process_stats_history_deinit ( )

◆ table_system_process_stats_history_init() [1/2]

PFS_engine_table_share_proxy * hm::table_system_process_stats_history_init ( std::shared_ptr< hm::Stat_Buffer< hm::System_Process_Stats > >  stat_buffer)

◆ table_system_process_stats_history_init() [2/2]

PFS_engine_table_share_proxy * hm::table_system_process_stats_history_init ( std::shared_ptr< Stat_Buffer< System_Process_Stats > >  buffer)

◆ table_system_process_stats_init()

PFS_engine_table_share_proxy * hm::table_system_process_stats_init ( )

◆ true_false()

std::string hm::true_false ( bool  value)

◆ update_process_threads_error_state()

bool hm::update_process_threads_error_state ( Process_threads_conversion_result  result,
bool &  error_state 
)

Update process thread warning suppression after conversion.

Parameters
[in]resultConversion result
[in,out]error_stateExisting warning suppression state
Returns
true when the caller must log this result

Variable Documentation

◆ cb_error

bool hm::cb_error {false}
static

◆ cpu_metrics

PSI_metric_info_v1 hm::cpu_metrics[]
static

◆ days_per_year

constexpr uint64_t hm::days_per_year {365}
staticconstexpr

◆ default_filename

constexpr char hm::default_filename[] {""}
staticconstexpr

◆ disk_metrics

PSI_metric_info_v1 hm::disk_metrics[]
static

◆ eib

constexpr uint64_t hm::eib {1024 * pib}
staticconstexpr

◆ eq

const std::string hm::eq {"="}

◆ gib

constexpr uint64_t hm::gib {1024 * mib}
staticconstexpr

◆ h_gmst_listener

my_h_service hm::h_gmst_listener = reinterpret_cast<my_h_service>(const_cast<svc_gmst_t *>(&svc_gmst_def))

◆ health_meter

PSI_meter_info_v1 hm::health_meter
Initial value:
= {
{"mysql.health.disk", "Health monitor disk metrics", 30, 0, 0, disk_metrics,
{"mysql.health.memory", "Health monitor memory metrics", 30, 0, 0,
{"mysql.health.cpu", "Health monitor CPU metrics", 30, 0, 0, cpu_metrics,
static PSI_metric_info_v1 disk_metrics[]
Definition: health_monitor_metrics.cc:1278
static PSI_metric_info_v1 cpu_metrics[]
Definition: health_monitor_metrics.cc:1429
static PSI_metric_info_v1 memory_metrics[]
Definition: health_monitor_metrics.cc:1355
size_t size(const char *const c)
Definition: base64.h:46

◆ hundredth_ns

constexpr uint64_t hm::hundredth_ns {10000000}
staticconstexpr

◆ k_default_report_interval

const int hm::k_default_report_interval {30}
static

◆ k_default_timer_interval

const int hm::k_default_timer_interval {10}
static

◆ k_default_timer_timeout

const int hm::k_default_timer_timeout {60}
static

◆ k_disk_forecaster_run_mode

const std::string hm::k_disk_forecaster_run_mode {"disk_forecaster_run_mode"}

◆ k_disk_forecaster_test_state

const std::string hm::k_disk_forecaster_test_state {"disk_forecaster_test_state"}

◆ k_GR_listener_service_name

const char* hm::k_GR_listener_service_name {"group_member_status_listener.health_monitor"}
static

Group Replication status listener.

Register listener methods to receive Group Replication status changes. Note: These calls hold a mutex, so process quickly and don't call too frequently.

◆ k_max_level

constexpr uint64_t hm::k_max_level {ULLONG_MAX - 1}
staticconstexpr

◆ k_offline_mode_disk_full

const std::string hm::k_offline_mode_disk_full {"offline_mode_disk_full"}

◆ k_option_tracker_usage

const std::string hm::k_option_tracker_usage {"option_tracker_usage:Health Monitor"}

◆ k_recovery_cycles

const std::string hm::k_recovery_cycles {"recovery_cycles"}

◆ k_super_read_only_disk_full

const std::string hm::k_super_read_only_disk_full {"super_read_only_disk_full"}

◆ Lock_Read

constexpr bool hm::Lock_Read = false
constexpr

◆ Lock_Write

constexpr bool hm::Lock_Write = true
constexpr

◆ max_int

constexpr int hm::max_int {std::numeric_limits<int>::max()}
staticconstexpr

◆ max_uint64_t

constexpr uint64_t hm::max_uint64_t {std::numeric_limits<uint64_t>::max()}
staticconstexpr

◆ megabyte

constexpr int hm::megabyte {1048576}
staticconstexpr

◆ memory_metrics

PSI_metric_info_v1 hm::memory_metrics[]
static

◆ mib

constexpr uint64_t hm::mib {1}
staticconstexpr

◆ MiB

constexpr double hm::MiB {1048576.0}
staticconstexpr

◆ microseconds_per_second

constexpr uint64_t hm::microseconds_per_second {1000000}
staticconstexpr

◆ minutes_per_day

constexpr uint64_t hm::minutes_per_day {minutes_per_hour * 24}
staticconstexpr

◆ minutes_per_hour

constexpr uint64_t hm::minutes_per_hour {60}
staticconstexpr

◆ minutes_per_month

constexpr uint64_t hm::minutes_per_month {minutes_per_day * 30}
staticconstexpr

◆ pib

constexpr uint64_t hm::pib {1024 * tib}
staticconstexpr

◆ proc_attr_count

constexpr size_t hm::proc_attr_count = 4
constexpr

◆ proc_attr_names

const char* hm::proc_attr_names[proc_attr_count]
static
Initial value:
= {
"pid", "tid", "process_name", "thread_name"}

◆ seconds_per_day

constexpr uint64_t hm::seconds_per_day {86400}
staticconstexpr

◆ seconds_per_hour

constexpr uint64_t hm::seconds_per_hour {3600}
staticconstexpr

◆ seconds_per_minute

constexpr uint64_t hm::seconds_per_minute {60}
staticconstexpr

◆ seconds_per_month

constexpr uint64_t hm::seconds_per_month {seconds_per_day * 30}
staticconstexpr

◆ seconds_per_week

constexpr uint64_t hm::seconds_per_week {seconds_per_day * 7}
staticconstexpr

◆ seconds_per_year

constexpr uint64_t hm::seconds_per_year {seconds_per_day * days_per_year}
staticconstexpr

◆ stat_buffer [1/4]

std::shared_ptr<Stat_Buffer<System_CPU_Stats> > hm::stat_buffer {nullptr}
static

◆ stat_buffer [2/4]

std::shared_ptr<Stat_Buffer<System_Disk_Stats> > hm::stat_buffer {nullptr}
static

◆ stat_buffer [3/4]

std::shared_ptr<Stat_Buffer<System_Memory_Stats> > hm::stat_buffer {nullptr}
static

◆ stat_buffer [4/4]

std::shared_ptr<Stat_Buffer<System_Process_Stats> > hm::stat_buffer {nullptr}
static

◆ svc_gmst_def

const mysql_service_group_member_status_listener_t hm::svc_gmst_def
static
Initial value:
= {
GR_Status_Listener::notify_member_role_change,
GR_Status_Listener::notify_member_state_change}

◆ sysvar_prefix

constexpr auto hm::sysvar_prefix {"health_monitor"}
staticconstexpr

◆ table_share [1/8]

PFS_engine_table_share_proxy hm::table_share
static

◆ table_share [2/8]

PFS_engine_table_share_proxy hm::table_share
static

◆ table_share [3/8]

PFS_engine_table_share_proxy hm::table_share
static

◆ table_share [4/8]

PFS_engine_table_share_proxy hm::table_share
static

◆ table_share [5/8]

PFS_engine_table_share_proxy hm::table_share
static

◆ table_share [6/8]

PFS_engine_table_share_proxy hm::table_share
static

◆ table_share [7/8]

PFS_engine_table_share_proxy hm::table_share
static

◆ table_share [8/8]

PFS_engine_table_share_proxy hm::table_share
static

◆ tib

constexpr uint64_t hm::tib {1024 * gib}
staticconstexpr