def disk_io_counters(perdisk=False):
 rawdict = _psplatform.disk_io_counters()
 if (not rawdict):
  raise RuntimeError("couldn't find any physical disk")
 nt = getattr(_psplatform, 'sdiskio', _common.sdiskio)
 if perdisk:
  for (disk, fields) in rawdict.items():
   rawdict[disk] = nt(*fields)
  return rawdict
 else:
  return nt(*[sum(x) for x in zip(*rawdict.values())])

def disk_io_counters ( perdisk = False ) : rawdict = _psplatform . disk_io_counters ( ) if ( not rawdict ) : raise RuntimeError ( "couldn't find any physical disk" ) nt = getattr ( _psplatform , 'sdiskio' , _common . sdiskio ) if perdisk : for ( disk , fields ) in rawdict . items ( ) : rawdict [ disk ] = nt ( * fields ) return rawdict else : return nt ( * [ sum ( x ) for x in zip ( * rawdict . values ( ) ) ] )
return disk i/o statistics .