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
This commit is contained in:
Luc Didry 2016-08-05 22:38:57 +02:00
commit 0b4b21132f
1 changed files with 1 additions and 1 deletions

View File

@ -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 = '---'