Inheritance diagram for lm::LoadMonitor::DriveStats:
Public Member Functions | |
DriveStats (void) | |
Constructor. | |
virtual | ~DriveStats (void) |
Destructor. | |
virtual bool | QueryData (LoadSample &target) |
Collect data and store them in the sample. | |
virtual bool | QueryData (HardwareDescription &target) |
Collect data and store their descriptions. | |
Private Attributes | |
int | kernel_version |
Kernel version code. | |
std::vector< std::pair< long, long > > | data |
Stats for the IDE drives. | |
unsigned long long | last_time |
Timestamp of the last measurement. | |
Data Structures | |
class | OneDriveStats |
Stores data about one disk drive from /proc/diskstats file. More... |
lm::LoadMonitor::DriveStats::DriveStats | ( | void | ) |
Constructor.
lm::LoadMonitor::DriveStats::~DriveStats | ( | void | ) | [virtual] |
Destructor.
bool lm::LoadMonitor::DriveStats::QueryData | ( | HardwareDescription & | description | ) | [virtual] |
Collect data and store their descriptions.
This will read names of all IDE drives from the /proc/diskstats file. Works on kernel newer than 2.5.69.
description | Structure which will receive data collected by this provider. |
Implements lm::LoadMonitor::StatsProvider.
bool lm::LoadMonitor::DriveStats::QueryData | ( | LoadSample & | sample | ) | [virtual] |
Collect data and store them in the sample.
Reads data from the /proc/diskstats file. This file is available only on kernels newer than 2.5.69. For older kernels no data is available.
sample | Structure which will receive data collected by this provider. |
Implements lm::LoadMonitor::StatsProvider.
std::vector< std::pair< long, long > > lm::LoadMonitor::DriveStats::data [private] |
Stats for the IDE drives.
First item of the pair is number of sectors read, second is number of sectors written.
int lm::LoadMonitor::DriveStats::kernel_version [private] |
Kernel version code.
unsigned long long lm::LoadMonitor::DriveStats::last_time [private] |
Timestamp of the last measurement.