Changeset

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
parents 8125:5f0c642a41a1
children 8127:3e443d6791e6
files plugins/mod_admin_telnet.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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;