artdaq_utilities
v1_05_09a
|
Collects metrics from the system, using proc filesystem or kernel API calls More...
#include <artdaq-utilities/Plugins/SystemMetricCollector.hh>
Public Member Functions | |
SystemMetricCollector (bool processMetrics, bool systemMetrics) | |
SystemMetricCollector Constructor More... | |
double | GetSystemCPUUsagePercent () |
Return the current overall system CPU usage in % More... | |
double | GetProcessCPUUsagePercent () |
Return the current amount of CPU usage for the current process, % More... | |
uint64_t | GetAvailableRAM () |
Get the amount of available RAM in the system More... | |
uint64_t | GetBufferedRAM () |
Get the amount of RAM currently being used for cache More... | |
uint64_t | GetTotalRAM () |
Get the total amount of RAM in the system More... | |
double | GetAvailableRAMPercent (bool buffers) |
Get the percentage of available RAM More... | |
uint64_t | GetProcessMemUsage () |
Get the amount of RAM being used by this process More... | |
double | GetProcessMemUsagePercent () |
Get the amount of RAM being used by this process More... | |
uint64_t | GetNetworkReceiveBytes () |
Get the amount of data received from the network in the last network collection interval (1.0 s) More... | |
uint64_t | GetNetworkSendBytes () |
Get the amount of data sent to the network in the last network collection interval (1.0 s) More... | |
uint64_t | GetNetworkReceiveErrors () |
Get the number of network receive errors in the last network collection interval (1.0 s) More... | |
uint64_t | GetNetworkSendErrors () |
Get the number of network send errors in the last network collection interval (1.0 s) More... | |
std::list< std::unique_ptr < MetricData > > | SendMetrics () |
Send the configured metrics More... | |
Collects metrics from the system, using proc filesystem or kernel API calls
Definition at line 11 of file SystemMetricCollector.hh.
artdaq::SystemMetricCollector::SystemMetricCollector | ( | bool | processMetrics, |
bool | systemMetrics | ||
) |
SystemMetricCollector Constructor
processMetrics | Whether to collect process-level metrics (i.e. process CPU/RAM) |
systemMetrics | Whether to collect system-level metrics (i.e. System CPU/RAM/Network) |
Definition at line 15 of file SystemMetricCollector.cc.
uint64_t artdaq::SystemMetricCollector::GetAvailableRAM | ( | ) |
Get the amount of available RAM in the system
Definition at line 52 of file SystemMetricCollector.cc.
double artdaq::SystemMetricCollector::GetAvailableRAMPercent | ( | bool | buffers | ) |
Get the percentage of available RAM
buffers | Whether cache RAM should be counted as available |
Definition at line 85 of file SystemMetricCollector.cc.
uint64_t artdaq::SystemMetricCollector::GetBufferedRAM | ( | ) |
Get the amount of RAM currently being used for cache
Definition at line 63 of file SystemMetricCollector.cc.
uint64_t artdaq::SystemMetricCollector::GetNetworkReceiveBytes | ( | ) |
Get the amount of data received from the network in the last network collection interval (1.0 s)
Definition at line 113 of file SystemMetricCollector.cc.
uint64_t artdaq::SystemMetricCollector::GetNetworkReceiveErrors | ( | ) |
Get the number of network receive errors in the last network collection interval (1.0 s)
Definition at line 125 of file SystemMetricCollector.cc.
uint64_t artdaq::SystemMetricCollector::GetNetworkSendBytes | ( | ) |
Get the amount of data sent to the network in the last network collection interval (1.0 s)
Definition at line 119 of file SystemMetricCollector.cc.
uint64_t artdaq::SystemMetricCollector::GetNetworkSendErrors | ( | ) |
Get the number of network send errors in the last network collection interval (1.0 s)
Definition at line 131 of file SystemMetricCollector.cc.
double artdaq::SystemMetricCollector::GetProcessCPUUsagePercent | ( | ) |
Return the current amount of CPU usage for the current process, %
Definition at line 33 of file SystemMetricCollector.cc.
uint64_t artdaq::SystemMetricCollector::GetProcessMemUsage | ( | ) |
Get the amount of RAM being used by this process
Definition at line 97 of file SystemMetricCollector.cc.
double artdaq::SystemMetricCollector::GetProcessMemUsagePercent | ( | ) |
Get the amount of RAM being used by this process
Definition at line 106 of file SystemMetricCollector.cc.
double artdaq::SystemMetricCollector::GetSystemCPUUsagePercent | ( | ) |
Return the current overall system CPU usage in %
Definition at line 24 of file SystemMetricCollector.cc.
uint64_t artdaq::SystemMetricCollector::GetTotalRAM | ( | ) |
Get the total amount of RAM in the system
Definition at line 74 of file SystemMetricCollector.cc.
std::list< std::unique_ptr< artdaq::MetricData > > artdaq::SystemMetricCollector::SendMetrics | ( | ) |
Send the configured metrics
Definition at line 137 of file SystemMetricCollector.cc.