#include <cstdio>
#include <cstring>
#include <sys/sysinfo.h>
#include <Os/SystemResources.hpp>
#include <Fw/Types/Assert.hpp>
Go to the source code of this file.
|
U64 | Os::getCpuUsed (U32 cpu_data[4]) |
|
U64 | Os::getCpuTotal (U32 cpu_data[4]) |
|
SystemResources::SystemResourcesStatus | Os::openProcStatFile (FILE *&fp) |
|
SystemResources::SystemResourcesStatus | Os::readProcStatLine (FILE *fp, char proc_stat_line[LINE_SIZE]) |
|
SystemResources::SystemResourcesStatus | Os::getCpuDataLine (FILE *fp, U32 cpu_index, char proc_stat_line[LINE_SIZE]) |
|
SystemResources::SystemResourcesStatus | Os::parseCpuData (char proc_stat_line[LINE_SIZE], U32 cpu_data[4]) |
|
SystemResources::SystemResourcesStatus | Os::getCpuData (U32 cpu_index, U32 cpu_data[4]) |
|
U64 | Os::getMemoryTotal (FwSizeType total_ram, FwSizeType memory_unit) |
|
U64 | Os::getMemoryUsed (FwSizeType total_ram, FwSizeType free_ram, FwSizeType memory_unit) |
|
bool | Os::checkCastingAndTypeErrors (FwSizeType total_ram, FwSizeType free_ram, FwSizeType memory_unit, const struct sysinfo &memory_info) |
|
bool | Os::checkInvalidMemoryCalculation (FwSizeType total_ram, FwSizeType free_ram) |
|
bool | Os::checkMultiplicationOverflow (FwSizeType total_ram, FwSizeType memory_unit) |
|
◆ LINE_SIZE
constexpr int LINE_SIZE = 256 |
|
constexpr |
◆ proc_stat_line
◆ PROC_STAT_PATH
constexpr char PROC_STAT_PATH[] = "/proc/stat" |
|
constexpr |
◆ READ_ONLY
constexpr char READ_ONLY[] = "r" |
|
constexpr |