code: def _get_mem(self):
          '''
          Get memory.
          '''
          out = __salt__['cmd.run_all']("vmstat -s")
          if out['retcode']:
              raise SIException("Memory info error: {0}".format(out['stderr']))
  
          ret = dict()
          for line in out['stdout'].split(os.linesep):
              line = line.strip()
              if not line:
                  continue
              size, descr = line.split(" ", 1)
              if descr.startswith("K "):
                  descr = descr[2:]
                  size = size + "K"
              ret[descr] = size
          return ref _get_mem(self):
          '''
          Get memory.
          '''
          out = __salt__['cmd.run_all']("vmstat -s")
          if out['retcode']:
              raise SIException("Memory info error: {0}".format(out['stderr']))
  
          ret = dict()
          for line in out['stdout'].split(os.linesep):
              line = line.strip()
              if not line:
                  continue
              size, descr = line.split(" ", 1)
              if descr.startswith("K "):
                  descr = descr[2:]
                  size = size + "K"
              ret[descr] = size
          return ret
docs: Get memory.