17 Base(iceMemory,
"LightweightSystemMonitor",
"MemoryUsage", nullptr, nullptr, 1000)
24 defs->optional(pollFrequencyHz, prefix +
"pollFrequencyHz",
"The poll frequency in Hz");
31 pollFrequencyHz =
std::clamp(pollFrequencyHz, 0.1f, 100.f);
39 void LightweightRamMonitorProviderSegment::loop()
45 long total = memoryMonitoring->getTotalMemoryInKB();
46 double usage = memoryMonitoring->getCurrentMemUsageInPercent();
48 auto data = std::make_shared<aron::data::Dict>();
49 data->addElement(
"total", std::make_shared<aron::data::Long>(total));
50 data->addElement(
"load", std::make_shared<aron::data::Double>(usage));
52 ARMARX_DEBUG <<
"RAM Usage is: " << usage <<
"% (of " << total <<
"KB max)";