From cdab656112f2106fcac746e6253cc46433a0415c Mon Sep 17 00:00:00 2001 From: Gaspard d'Hautefeuille Date: Thu, 18 Jun 2020 17:51:18 +0100 Subject: Reflect "used percent" user disk space `psutill` [says the following](https://github.com/giampaolo/psutil/blob/master/psutil/_psposix.py): > Note: UNIX usually reserves 5% disk space which is not accessible by user. In this function "total" and "used" values reflect the total and used disk space whereas "free" and "percent" represent the "free" and "used percent" user disk space. To fix the alert value that has been notified in this issue https://github.com/nicolargo/glances/issues/1658 where the alert has not been fixed. The issue https://github.com/nicolargo/glances/issues/644 has fixed it one way, this PR is completing the fix for the alert feature of the `fs` plugin. --- glances/plugins/glances_fs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glances/plugins/glances_fs.py b/glances/plugins/glances_fs.py index bc0a981d..6c1e618a 100644 --- a/glances/plugins/glances_fs.py +++ b/glances/plugins/glances_fs.py @@ -199,7 +199,7 @@ class Plugin(GlancesPlugin): # Alert for i in self.stats: self.views[i[self.get_key()]]['used']['decoration'] = self.get_alert( - i['used'], maximum=i['size'], header=i['mnt_point']) + current=i['size'] - i['free'], maximum=i['size'], header=i['mnt_point']) def msg_curse(self, args=None, max_width=None): """Return the dict to display in the curse interface.""" -- cgit v1.2.3