mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-29 04:04:03 +03:00
Fix wrong display in memory and swap
This commit is contained in:
parent
3687321b30
commit
6c3ea7f293
@ -103,7 +103,7 @@ class Plugin(GlancesPlugin):
|
||||
msg = "{0:5} ".format(_("MEM"))
|
||||
ret.append(self.curse_add_line(msg, "TITLE"))
|
||||
# Percent memory usage
|
||||
msg = "{0:>6}%".format(format(self.stats['percent'] / 100, '.1'))
|
||||
msg = "{0:>7.1%}".format(self.stats['percent'] / 100)
|
||||
ret.append(self.curse_add_line(msg))
|
||||
# Active memory usage
|
||||
if 'active' in self.stats:
|
||||
@ -116,7 +116,7 @@ class Plugin(GlancesPlugin):
|
||||
# Total memory usage
|
||||
msg = "{0:6}".format(_("total:"))
|
||||
ret.append(self.curse_add_line(msg))
|
||||
msg = "{0:>7}".format(self.auto_unit(format(self.stats['total']), '.1%'))
|
||||
msg = "{0:>7}".format(self.auto_unit(self.stats['total']))
|
||||
ret.append(self.curse_add_line(msg))
|
||||
# Inactive memory usage
|
||||
if 'inactive' in self.stats:
|
||||
|
@ -86,7 +86,7 @@ class Plugin(GlancesPlugin):
|
||||
msg = "{0:7} ".format(_("SWAP"))
|
||||
ret.append(self.curse_add_line(msg, "TITLE"))
|
||||
# Percent memory usage
|
||||
msg = "{0}".format(format(self.stats['percent'] / 100, '>6.1%'))
|
||||
msg = "{0:>6.1%}".format(self.stats['percent'] / 100)
|
||||
ret.append(self.curse_add_line(msg))
|
||||
# New line
|
||||
ret.append(self.curse_new_line())
|
||||
|
Loading…
Reference in New Issue
Block a user