def swapcached():
 mem_info = meminfo()
 for line in mem_info:
  swaped = re.search('SwapCached:\\s+(\\d+)\\w+', line)
  if swaped:
   return swaped.group(1)
 return 0

def swapcached ( ) : mem_info = meminfo ( ) for line in mem_info : swaped = re . search ( 'SwapCached:\\s+(\\d+)\\w+' , line ) if swaped : return swaped . group ( 1 ) return 0
get swapcache used .