diff options
author | nicolargo <nicolas@nicolargo.com> | 2020-03-03 22:10:42 +0100 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2020-03-03 22:10:42 +0100 |
commit | 2c9e80b4a5d29b6c99ecfd94d6c186d5fa6cbc21 (patch) | |
tree | 4137cb98ec8cae6ac92a5da33fa305ba027f3e36 | |
parent | 62dbeb369efe8bb6c09b719835463ba71d2cec09 (diff) |
[diskio] Aliases Display Incorrectly/Not at All, and Glances Throws Error on Exit #1618
-rw-r--r-- | conf/glances.conf | 2 | ||||
-rw-r--r-- | glances/plugins/glances_diskio.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/conf/glances.conf b/conf/glances.conf index 9ffe1713..d5cf291e 100644 --- a/conf/glances.conf +++ b/conf/glances.conf @@ -170,7 +170,7 @@ disable=False #hide=sda2,sda5,loop.* hide=loop.*,/dev/loop* # Alias for sda1 -#sda1_alias=IntDisk +#sda1_alias=InternalDisk [fs] disable=False diff --git a/glances/plugins/glances_diskio.py b/glances/plugins/glances_diskio.py index eb339d2d..52ddfebc 100644 --- a/glances/plugins/glances_diskio.py +++ b/glances/plugins/glances_diskio.py @@ -162,7 +162,7 @@ class Plugin(GlancesPlugin): return ret # Max size for the interface name - name_max_width = max_width - 12 + name_max_width = max_width - 13 # Header msg = '{:{width}}'.format('DISK I/O', width=name_max_width) @@ -188,9 +188,9 @@ class Plugin(GlancesPlugin): ret.append(self.curse_new_line()) if len(disk_name) > name_max_width: # Cut disk name if it is too long - disk_name = '_' + disk_name[-name_max_width:] + disk_name = '_' + disk_name[-name_max_width+1:] msg = '{:{width}}'.format(nativestr(disk_name), - width=name_max_width) + width=name_max_width+1) ret.append(self.curse_add_line(msg)) if args.diskio_iops: # count |