MySQL 26.10.0
Source Code Documentation
system_info_linux_procfs.h File Reference
#include <functional>
#include <istream>
#include <string>
#include <string_view>
#include <unordered_set>
#include <vector>
#include "mysql/components/library_mysys/system_info.h"

Go to the source code of this file.

Classes

struct  mysql::system_info::internal::Linux_block_device
 Linux block device identity parsed from /proc/partitions. More...
 
struct  mysql::system_info::internal::Linux_diskstats_snapshot
 Linux storage I/O capabilities parsed from /proc/diskstats. More...
 
struct  mysql::system_info::internal::Linux_storage_paths
 Linux procfs and sysfs roots used by storage collection. More...
 

Namespaces

namespace  mysql
 
namespace  mysql::system_info
 
namespace  mysql::system_info::internal
 

Functions

Storage_snapshot mysql::system_info::internal::query_linux_storage_devices (const Linux_storage_paths &paths, const std::function< void()> &after_metadata)
 Assemble Linux storage metadata from procfs and sysfs. More...
 
bool mysql::system_info::internal::valid_linux_storage_device_name (std::string_view name)
 Check that a Linux device name is one safe path component. More...
 
System_result< std::vector< Linux_block_device > > mysql::system_info::internal::read_linux_partitions (std::istream &input)
 Read the block device identity table from /proc/partitions. More...
 
System_result< Storage_device_capacity > mysql::system_info::internal::read_linux_storage_capacity (std::istream &size_input, std::istream &sector_size_input, std::string_view device)
 Read capacity metadata from /sys/class/block/<device>. More...
 
System_result< Storage_device_relationship > mysql::system_info::internal::linux_partition_relationship (std::string_view canonical_path, std::string_view device)
 Find the parent disk of a Linux partition from its canonical sysfs path. More...
 
System_result< std::string > mysql::system_info::internal::linux_storage_sector_size_path (std::string_view canonical_path, bool partition)
 Build the sysfs path for a device's hardware sector size. More...
 
Linux_diskstats_snapshot mysql::system_info::internal::read_linux_diskstats (std::istream &input, const std::unordered_set< std::string > &whole_devices)
 Read cumulative block I/O counters from /proc/diskstats. More...
 
System_result< Filesystem_identity > mysql::system_info::internal::read_linux_mount_info (std::istream &input, std::string_view device_id, std::string_view target_path)
 Find a filesystem in /proc/self/mountinfo. More...
 
Host_memory_snapshot mysql::system_info::internal::read_linux_meminfo (std::istream &input)
 Read labeled host memory values from /proc/meminfo. More...
 
System_result< Swap_activity_info > mysql::system_info::internal::read_linux_vmstat (std::istream &input)
 Read cumulative paging activity from /proc/vmstat. More...
 
Host_cpu_snapshot mysql::system_info::internal::read_linux_cpu_stat (std::istream &input, uint64_t ticks_per_second)
 Read CPU time rows from /proc/stat. More...
 
Process_memory_snapshot mysql::system_info::internal::read_linux_process_status (std::istream &input)
 Read process identity and memory from /proc/self/status. More...
 
Process_threads_snapshot mysql::system_info::internal::read_linux_thread_stat (std::istream &input, uint64_t expected_tid, uint64_t process_pid, uint64_t ticks_per_second, uint64_t page_size)
 Read one /proc/self/task/<tid>/stat record. More...
 
System_result< Thread_io_counters > mysql::system_info::internal::read_linux_thread_io (std::istream &input, uint64_t tid)
 Read /proc/self/task/<tid>/io. More...