34 std::shared_ptr<Stat_Buffer<System_Disk_Stats>>;
36 std::shared_ptr<Stat_Buffer<System_Process_Stats>>;
38 std::shared_ptr<Stat_Buffer<System_Memory_Stats>>;
73 static int get_cpu_stats(std::vector<System_CPU_Stats> &sys_cpu_stats);
74 static int get_cpu_stats(std::vector<System_CPU_Stats> &sys_cpu_stats,
82 static int get_disk_stats(std::vector<System_Disk_Stats> &sys_disk_stats);
83 static int get_disk_stats(std::vector<System_Disk_Stats> &sys_disk_stats,
Definition: health_monitor_collector.h:41
System Collector.
Definition: health_monitor_system.h:47
ss::Normal_State m_normal_state
Definition: health_monitor_system.h:116
std::shared_ptr< Stat_Buffer< System_Memory_Stats > > sys_memory_buffer()
Definition: health_monitor_system.h:88
bool m_cpu_stats_error
Definition: health_monitor_system.h:144
std::shared_ptr< Stat_Buffer< System_CPU_Stats > > sys_cpu_buffer()
Definition: health_monitor_system.h:70
void set_state(ss::System_State &new_state)
Set the next state.
Definition: health_monitor_system.cc:553
bool m_disk_stats_history
Definition: health_monitor_system.h:130
std::string format_status_info() override
System Collector status formatted string.
Definition: health_monitor_system.cc:489
void log_warning_error_condition()
Error condition warning.
Definition: health_monitor_system.cc:516
void set_memory_buffer_size()
Definition: health_monitor_system.cc:183
std::shared_ptr< Stat_Buffer< System_Memory_Stats > > m_sys_memory_buffer
Definition: health_monitor_system.h:152
void set_disk_buffer_size()
Definition: health_monitor_system.cc:173
int get_process_stats(std::vector< System_Process_Stats > &sys_process_stats)
Get the mysqld process stats.
Definition: health_monitor_system.cc:414
void set_cpu_buffer_size()
Definition: health_monitor_system.cc:163
void log_resource_status() override
System status, depending on state.
Definition: health_monitor_system.cc:525
PSI_memory_key m_memory_key_memory_stats_history
Definition: health_monitor_system.h:166
PSI_rwlock_key m_rwlock_key
Definition: health_monitor_system.h:157
void pre_process() override
Tasks before starting the collection loop.
Definition: health_monitor_system.cc:79
System_Collector()
Definition: health_monitor_system.cc:42
void set_normal_state()
Definition: health_monitor_system.h:109
bool set_rows_per_sample()
Set the number of rows per sample for each statistic type.
Definition: health_monitor_system.cc:208
PSI_memory_key m_memory_key_process_stats
Definition: health_monitor_system.h:167
void set_params() final
Set collection parameters from the system variables.
Definition: health_monitor_system.cc:247
void set_buffer_size() final
Resize the stat buffers if necessary.
Definition: health_monitor_system.cc:156
PSI_memory_key m_memory_key_cpu_stats
Definition: health_monitor_system.h:161
bool m_disk_stats_error
Definition: health_monitor_system.h:145
bool m_sysinfo_error
Definition: health_monitor_system.h:142
std::string format_settings() override
System Collector settings formatted string.
Definition: health_monitor_system.cc:477
std::shared_ptr< Stat_Buffer< System_Process_Stats > > m_sys_process_buffer
Definition: health_monitor_system.h:154
static int get_cpu_stats(std::vector< System_CPU_Stats > &sys_cpu_stats)
Get the system CPU stats.
Definition: health_monitor_system.cc:271
std::shared_ptr< Stat_Buffer< System_Disk_Stats > > m_sys_disk_buffer
Definition: health_monitor_system.h:151
std::shared_ptr< Stat_Buffer< System_CPU_Stats > > get_cpu_stats_buffer()
Get the system CPU statistics and return them in a local stat buffer.
Definition: health_monitor_system.cc:294
bool m_sysinfo_warning
Definition: health_monitor_system.h:143
ss::Stop_State m_stop_state
Definition: health_monitor_system.h:115
std::atomic< bool > m_settings_changed
Definition: health_monitor_system.h:132
static int get_memory_stats(System_Memory_Stats &mem_stats)
Get the system memory stats.
Definition: health_monitor_system.cc:369
PSI_memory_key m_memory_key_process_stats_history
Definition: health_monitor_system.h:168
std::shared_ptr< Stat_Buffer< System_Memory_Stats > > get_memory_stats_buffer()
Get the system memory statistics and return them in a local stat buffer.
Definition: health_monitor_system.cc:391
bool settings_changed() override
Return true if the collector settings have changed.
Definition: health_monitor_system.cc:231
ss::System_State * m_current_state
Definition: health_monitor_system.h:113
std::string tag_collector_state() override
Collector state tag.
Definition: health_monitor_system.cc:498
bool m_memory_stats_error
Definition: health_monitor_system.h:146
std::shared_ptr< Stat_Buffer< System_CPU_Stats > > m_sys_cpu_buffer
Definition: health_monitor_system.h:150
std::shared_ptr< Stat_Buffer< System_Disk_Stats > > get_disk_stats_buffer()
Get the system disk statistics and return them in a local stat buffer.
Definition: health_monitor_system.cc:344
uint32_t m_disk_rows_per_sample
Definition: health_monitor_system.h:137
ss::Error_State m_error_state
Definition: health_monitor_system.h:118
void set_process_buffer_size()
Definition: health_monitor_system.cc:193
void process() override
Collect the current system stats and write to the stat buffer.
Definition: health_monitor_system.cc:87
bool m_cpu_stats_history
Definition: health_monitor_system.h:129
static int get_disk_stats(std::vector< System_Disk_Stats > &sys_disk_stats)
Get storage device stats.
Definition: health_monitor_system.cc:319
void set_stop_state()
Definition: health_monitor_system.h:108
ss::Warning_State m_warning_state
Definition: health_monitor_system.h:117
PSI_memory_key m_memory_key_cpu_stats_history
Definition: health_monitor_system.h:162
void post_process() override
Final tasks before exiting the thread.
Definition: health_monitor_system.cc:147
PSI_memory_key m_memory_key_memory_stats
Definition: health_monitor_system.h:165
std::shared_ptr< Stat_Buffer< System_Process_Stats > > get_process_stats_buffer()
Get the mysqld process statistics and return them in a local stat buffer.
Definition: health_monitor_system.cc:454
std::shared_ptr< Stat_Buffer< System_Process_Stats > > sys_process_buffer()
Definition: health_monitor_system.h:97
bool running() const override
Return health_monitor.system_running.
Definition: health_monitor_system.cc:262
PSI_memory_key m_memory_key_disk_stats
Definition: health_monitor_system.h:163
void set_start_state()
Definition: health_monitor_system.h:107
PSI_memory_key m_memory_key_disk_stats_history
Definition: health_monitor_system.h:164
uint32_t m_process_rows_per_sample
Definition: health_monitor_system.h:139
void set_warning_state()
Definition: health_monitor_system.h:110
ss::Start_State m_start_state
Definition: health_monitor_system.h:114
bool m_process_stats_error
Definition: health_monitor_system.h:147
uint32_t m_memory_rows_per_sample
Definition: health_monitor_system.h:138
std::shared_ptr< Stat_Buffer< System_Disk_Stats > > sys_disk_buffer()
Definition: health_monitor_system.h:79
PSI_rwlock_info m_rwlock_info
Definition: health_monitor_system.h:158
bool m_process_stats_history
Definition: health_monitor_system.h:128
bool m_rows_per_sample_set
Definition: health_monitor_system.h:135
uint32_t m_cpu_rows_per_sample
Definition: health_monitor_system.h:136
void set_error_state()
Definition: health_monitor_system.h:111
bool m_memory_stats_history
Definition: health_monitor_system.h:131
Error State.
Definition: health_monitor_system_state.h:108
Normal State.
Definition: health_monitor_system_state.h:83
Start State.
Definition: health_monitor_system_state.h:61
Stop State.
Definition: health_monitor_system_state.h:72
Definition: health_monitor_system_state.h:34
Warning State.
Definition: health_monitor_system_state.h:95
#define PSI_DOCUMENT_ME
Definition: component_common.h:29
#define PSI_FLAG_SINGLETON
Singleton flag.
Definition: component_common.h:35
unsigned int PSI_memory_key
Instrumented memory key.
Definition: psi_memory_bits.h:49
unsigned int PSI_rwlock_key
Instrumented rwlock key.
Definition: psi_rwlock_bits.h:44
#define PSI_VOLATILITY_PROVISIONING
Definition: psi_bits.h:155
constexpr value_type timestamp
Definition: classic_protocol_constants.h:278
Definition: component_command.h:29
std::shared_ptr< Stat_Buffer< System_CPU_Stats > > System_CPU_Stats_Buffer
Definition: health_monitor_system.h:32
std::shared_ptr< Stat_Buffer< System_Memory_Stats > > System_Memory_Stats_Buffer
Definition: health_monitor_system.h:38
std::shared_ptr< Stat_Buffer< System_Disk_Stats > > System_Disk_Stats_Buffer
Definition: health_monitor_system.h:34
std::shared_ptr< Stat_Buffer< System_Process_Stats > > System_Process_Stats_Buffer
Definition: health_monitor_system.h:36
Rwlock information.
Definition: psi_rwlock_bits.h:162
Definition: health_monitor_system_bits.h:72