Zigbee Protocol Controller 1.6.0
zigpc_diagnostics::util Namespace Reference

Functions

static long int get_pagesize_kb (void)
 Get system page size in KiloBytes. More...
 
static unsigned long get_mem_total (void)
 Get system total memory usage in KiloBytes. More...
 
static unsigned long get_resident_set_kb (void)
 Get the resident memory pages used by program. This number is in KiloBytes. More...
 

Variables

static constexpr char LOG_TAG [] = "zigpc_metric_ram_usage"
 
static constexpr char PATH_PROC_MEMINFO [] = "/proc/meminfo"
 
static constexpr char PATH_PROC_STATM [] = "/proc/self/statm"
 

Function Documentation

◆ get_mem_total()

static unsigned long zigpc_diagnostics::util::get_mem_total ( void  )
static

Get system total memory usage in KiloBytes.

Returns
unsigned long System total used memory in KB, 0 otherwise.

◆ get_pagesize_kb()

static long int zigpc_diagnostics::util::get_pagesize_kb ( void  )
static

Get system page size in KiloBytes.

Returns
long int system page size in KB, or -1 on error.

◆ get_resident_set_kb()

static unsigned long zigpc_diagnostics::util::get_resident_set_kb ( void  )
static

Get the resident memory pages used by program. This number is in KiloBytes.

Returns
unsigned long The resulting resident set retrieved, or 0 on error.

Variable Documentation

◆ LOG_TAG

constexpr char zigpc_diagnostics::util::LOG_TAG[] = "zigpc_metric_ram_usage"
staticconstexpr

◆ PATH_PROC_MEMINFO

constexpr char zigpc_diagnostics::util::PATH_PROC_MEMINFO[] = "/proc/meminfo"
staticconstexpr

◆ PATH_PROC_STATM

constexpr char zigpc_diagnostics::util::PATH_PROC_STATM[] = "/proc/self/statm"
staticconstexpr