Software /
code /
prosody
Comparison
plugins/mod_admin_telnet.lua @ 6578:6f55db7afd3b
mod_admin_telnet: Require util.pposix (fixes #471)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 20 Feb 2015 22:53:12 +0000 |
parent | 6380:4220ffb87b22 |
child | 6580:74946f050209 |
child | 7029:b2d160baa957 |
comparison
equal
deleted
inserted
replaced
6575:bdaadf70a48f | 6578:6f55db7afd3b |
---|---|
311 end | 311 end |
312 return ("%0.2f%sB"):format(kb, unit); | 312 return ("%0.2f%sB"):format(kb, unit); |
313 end | 313 end |
314 | 314 |
315 function def_env.server:memory() | 315 function def_env.server:memory() |
316 local pposix = require("util.pposix"); | |
316 if not pposix.meminfo then | 317 if not pposix.meminfo then |
317 return true, "Lua is using "..collectgarbage("count"); | 318 return true, "Lua is using "..collectgarbage("count"); |
318 end | 319 end |
319 local mem, lua_mem = pposix.meminfo(), collectgarbage("count"); | 320 local mem, lua_mem = pposix.meminfo(), collectgarbage("count"); |
320 local print = self.session.print; | 321 local print = self.session.print; |