mem: provide mem.bcuse for Gabriel

This commit is contained in:
Adrian C. (anrxc) 2011-06-30 01:02:43 +02:00
parent 324563e51b
commit 1384b69384
1 changed files with 3 additions and 1 deletions

View File

@ -36,13 +36,15 @@ local function worker(format)
-- Calculate memory percentage -- Calculate memory percentage
mem.free = mem.buf.f + mem.buf.b + mem.buf.c mem.free = mem.buf.f + mem.buf.b + mem.buf.c
mem.inuse = mem.total - mem.free mem.inuse = mem.total - mem.free
mem.bcuse = mem.total - mem.buf.f
mem.usep = math.floor(mem.inuse / mem.total * 100) mem.usep = math.floor(mem.inuse / mem.total * 100)
-- Calculate swap percentage -- Calculate swap percentage
mem.swp.inuse = mem.swp.t - mem.swp.f mem.swp.inuse = mem.swp.t - mem.swp.f
mem.swp.usep = math.floor(mem.swp.inuse / mem.swp.t * 100) mem.swp.usep = math.floor(mem.swp.inuse / mem.swp.t * 100)
return {mem.usep, mem.inuse, mem.total, mem.free, return {mem.usep, mem.inuse, mem.total, mem.free,
mem.swp.usep, mem.swp.inuse, mem.swp.t, mem.swp.f} mem.swp.usep, mem.swp.inuse, mem.swp.t, mem.swp.f,
mem.bcuse }
end end
-- }}} -- }}}