mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-30 21:49:37 +03:00
[diskio] Aliases Display Incorrectly/Not at All, and Glances Throws Error on Exit #1618
This commit is contained in:
parent
62dbeb369e
commit
2c9e80b4a5
@ -170,7 +170,7 @@ disable=False
|
|||||||
#hide=sda2,sda5,loop.*
|
#hide=sda2,sda5,loop.*
|
||||||
hide=loop.*,/dev/loop*
|
hide=loop.*,/dev/loop*
|
||||||
# Alias for sda1
|
# Alias for sda1
|
||||||
#sda1_alias=IntDisk
|
#sda1_alias=InternalDisk
|
||||||
|
|
||||||
[fs]
|
[fs]
|
||||||
disable=False
|
disable=False
|
||||||
|
@ -162,7 +162,7 @@ class Plugin(GlancesPlugin):
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
# Max size for the interface name
|
# Max size for the interface name
|
||||||
name_max_width = max_width - 12
|
name_max_width = max_width - 13
|
||||||
|
|
||||||
# Header
|
# Header
|
||||||
msg = '{:{width}}'.format('DISK I/O', width=name_max_width)
|
msg = '{:{width}}'.format('DISK I/O', width=name_max_width)
|
||||||
@ -188,9 +188,9 @@ class Plugin(GlancesPlugin):
|
|||||||
ret.append(self.curse_new_line())
|
ret.append(self.curse_new_line())
|
||||||
if len(disk_name) > name_max_width:
|
if len(disk_name) > name_max_width:
|
||||||
# Cut disk name if it is too long
|
# 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),
|
msg = '{:{width}}'.format(nativestr(disk_name),
|
||||||
width=name_max_width)
|
width=name_max_width+1)
|
||||||
ret.append(self.curse_add_line(msg))
|
ret.append(self.curse_add_line(msg))
|
||||||
if args.diskio_iops:
|
if args.diskio_iops:
|
||||||
# count
|
# count
|
||||||
|
Loading…
Reference in New Issue
Block a user