src/linux_parser.cpp
// DONE: Read and return the system memory utilization
Read and return the system memory utilization
Read and return the system memory utilization
float LinuxParser::MemoryUtilization() {
  string mem_total = "MemTotal:";
  string mem_free = "MemFree:";
  string buffers = "buffers";
  float Free = findValueByKey<float>(mem_free, kMeminfoFilename);
  float Total = findValueByKey<float>(mem_total, kMeminfoFilename);
  return (Total - Free) / Total;
}
float LinuxParser :: MemoryUtilization ( ) { string mem_total = " " ; string mem_free = " " ; string buffers = " " ; float Free = findValueByKey < float > ( mem_free , kMeminfoFilename ) ; float Total = findValueByKey < float > ( mem_total , kMeminfoFilename ) ; return ( Total - Free ) / Total ; }
DONE: Read and return the system memory utilization
DONE : Read and return the system memory utilization