aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_admin_telnet.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-04-25 00:14:19 +0200
committerKim Alvefur <zash@zash.se>2017-04-25 00:14:19 +0200
commit681b9a640594907c822fabfc673424a2096792f1 (patch)
tree7f0d1c0d71e3a3dd777f986892bd6d811c7f755c /plugins/mod_admin_telnet.lua
parent68985af22031ad9bb33b9a7b7978996f800b59f2 (diff)
downloadprosody-681b9a640594907c822fabfc673424a2096792f1.tar.gz
prosody-681b9a640594907c822fabfc673424a2096792f1.zip
mod_admin_telnet: Output human-friendly memory usage when meminfo is unavailable (thanks nbastin)
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-rw-r--r--plugins/mod_admin_telnet.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index 04e93d7e..293f6320 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -325,7 +325,7 @@ end
function def_env.server:memory()
if not has_pposix or not pposix.meminfo then
- return true, "Lua is using "..collectgarbage("count");
+ return true, "Lua is using "..human(collectgarbage("count"));
end
local mem, lua_mem = pposix.meminfo(), collectgarbage("count");
local print = self.session.print;