Diff

plugins/mod_admin_telnet.lua @ 8126:60f6f7ddd2ce

mod_admin_telnet: Output human-friendly memory usage when meminfo is unavailable (thanks nbastin)
author Kim Alvefur <zash@zash.se>
date Tue, 25 Apr 2017 00:14:19 +0200
parent 7977:01d6298de991
child 8128:c14513401d65
child 8192:4354f556c5db
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua	Mon Apr 24 23:27:21 2017 +0200
+++ b/plugins/mod_admin_telnet.lua	Tue Apr 25 00:14:19 2017 +0200
@@ -325,7 +325,7 @@
 
 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;