def swap_memory():
 if (psutil.version_info < (0, 6, 0)):
  msg = 'swap_memory is only available in psutil 0.6.0 or greater'
  raise CommandExecutionError(msg)
 return dict(psutil.swap_memory()._asdict())

def swap_memory ( ) : if ( psutil . version_info < ( 0 , 6 , 0 ) ) : msg = 'swap_memory is only available in psutil 0.6.0 or greater' raise CommandExecutionError ( msg ) return dict ( psutil . swap_memory ( ) . _asdict ( ) )
return system swap memory statistics as a namedtuple including the following fields: - total: total swap memory in bytes - used: used swap memory in bytes - free: free swap memory in bytes - percent: the percentage usage - sin: no .