|
ATLAS Offline Software
|
Go to the documentation of this file.
5 _proc_status =
'/proc/%d/status' % os.getpid()
7 _scale = {
'kB': 1024.0,
'mB': 1024.0*1024.0,
8 'KB': 1024.0,
'MB': 1024.0*1024.0}
13 global _proc_status, _scale
16 t =
open(_proc_status)
19 except (OSError,ValueError):
23 v = v[i:].
split(
None, 3)
27 return float(v[1]) * _scale[v[2]]
31 '''Return memory usage in bytes.
33 return _VmB(
'VmSize:') - since
37 '''Return resident memory usage in bytes.
39 return _VmB(
'VmRSS:') - since
43 '''Return stack size in bytes.
45 return _VmB(
'VmStk:') - since