diff options
author | Gaspard d'Hautefeuille <github@dhautefeuille.eu> | 2020-06-18 17:51:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-18 17:51:18 +0100 |
commit | cdab656112f2106fcac746e6253cc46433a0415c (patch) | |
tree | f5c5472b385406d671769c70d0912aed4e87ba33 | |
parent | b0dc3ff54e04636cc5efba0d7600daaf5c1d9215 (diff) |
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.
-rw-r--r-- | glances/plugins/glances_fs.py | 2 |
1 files changed, 1 insertions, 1 deletions
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.""" |