Status: @cpu was giving a wrong value for the memory use (1024 times lower).

This commit is contained in:
Valentin Lorentz 2012-01-22 11:33:23 +01:00
parent 6b0e5303b4
commit 41e5c26e52

View File

@ -163,7 +163,8 @@ class Status(callbacks.Plugin):
mem = int(out.splitlines()[1]) mem = int(out.splitlines()[1])
elif sys.platform.startswith('netbsd'): elif sys.platform.startswith('netbsd'):
mem = int(os.stat('/proc/%s/mem' % pid)[7]) mem = int(os.stat('/proc/%s/mem' % pid)[7])
response += format(_(' I\'m taking up %S of memory.'), mem) response += format(_(' I\'m taking up %S of memory.'),
mem*1024)
except Exception: except Exception:
self.log.exception('Uncaught exception in cpu.memory:') self.log.exception('Uncaught exception in cpu.memory:')
irc.reply(utils.str.normalizeWhitespace(response)) irc.reply(utils.str.normalizeWhitespace(response))