Commit 0b4b2113 authored by Luc Didry's avatar Luc Didry

Merge branch 'master' into 'master'

Change meminfo. Use MemAvailable instead of MemFree (without cached)

Hello,

I changed the sysinfo to have the memory informations without the cached mem. 
Instead, it use the available memory.

Maxence.

See merge request !3
parents 6336cd32 3765df20
......@@ -64,7 +64,7 @@ statfs = proc_mount()
iStatfs = inode_proc_mount()
users = utmp_count()
meminfo = proc_meminfo()
memperc = "%d%%" % (100-100.*meminfo['MemFree:']/(meminfo['MemTotal:'] or 1))
memperc = "%d%%" % (100-100.*meminfo['MemAvailable:']/(meminfo['MemTotal:'] or 1))
swapperc = "%d%%" % (100-100.*meminfo['SwapFree:']/(meminfo['SwapTotal:'] or 1))
if meminfo['SwapTotal:'] == 0: swapperc = '---'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment