add used memory percentage

This commit is contained in:
Roman Saldygashev 2016-07-25 16:30:27 +05:00
parent 1744c45790
commit ebd506d693
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ local function worker(args)
mem_now.used = mem_now.total - (mem_now.free + mem_now.buf + mem_now.cache) mem_now.used = mem_now.total - (mem_now.free + mem_now.buf + mem_now.cache)
mem_now.swapused = mem_now.swap - mem_now.swapf mem_now.swapused = mem_now.swap - mem_now.swapf
mem_now.perc = math.floor(mem_now.used / mem_now.total * 100)
widget = mem.widget widget = mem.widget
settings() settings()