Fixed bug in realmem option

This commit is contained in:
Hynek Cernoch 2010-12-13 22:33:05 +01:00
commit 455466fb67

4
smem
View file

@ -178,7 +178,9 @@ def fromunits(x):
M=2**20, MB=2**20, G=2**30, GB=2**30)
for k,v in s.items():
if x.endswith(k):
return int(float(x[:len(k)])*v)
return int(float(x[:-len(k)])*v)
sys.stderr.write("Memory size should be written with units, for example 1024M\n")
sys.exit(-1)
def pidusername(pid):
return src.username(src.piduser(pid))