src/linux_parser.cpp
// Read and return memory utilization in percent format
Read and return memory utilization in percent format
Read and return memory utilization in percent format
float LinuxParser::MemoryUtilization() { 
  string memTotal = "MemTotal:";
  string memFree = "MemFree:";
  float Total = findValueByKey<float>(memTotal, kMeminfoFilename);
  float Free = findValueByKey<float>(memFree, kMeminfoFilename);
  return (Total - Free) / Total;
}
float LinuxParser :: MemoryUtilization ( ) { string memTotal = " " ; string memFree = " " ; float Total = findValueByKey < float > ( memTotal , kMeminfoFilename ) ; float Free = findValueByKey < float > ( memFree , kMeminfoFilename ) ; return ( Total - Free ) / Total ; }
Read and return memory utilization in percent format
Read and return memory utilization in percent format
// "/proc/memInfo"