mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-24 17:51:49 +03:00
Try to correct a bug on OpenVZ / See Issue #141
This commit is contained in:
parent
9bc8746468
commit
10156275eb
@ -1819,9 +1819,12 @@ class glancesScreen:
|
|||||||
elapsed_time = max(1, self.__refresh_time)
|
elapsed_time = max(1, self.__refresh_time)
|
||||||
|
|
||||||
# network interface name
|
# network interface name
|
||||||
self.term_window.addnstr(
|
ifname = network[i]['interface_name'].encode('ascii', 'ignore').split(':')[0]
|
||||||
self.network_y + 1 + i, self.network_x,
|
if (len(ifname) > 8):
|
||||||
network[i]['interface_name'].encode('ascii', 'ignore') + ':', 8)
|
ifname = '_'+ifname[-8:]
|
||||||
|
self.term_window.addnstr(
|
||||||
|
self.network_y + 1 + i, self.network_x,
|
||||||
|
ifname, 8)
|
||||||
|
|
||||||
# Byte/s or bit/s
|
# Byte/s or bit/s
|
||||||
if self.net_byteps_tag:
|
if self.net_byteps_tag:
|
||||||
@ -1869,7 +1872,7 @@ class glancesScreen:
|
|||||||
for i in range(0, sensors_num):
|
for i in range(0, sensors_num):
|
||||||
self.term_window.addnstr(
|
self.term_window.addnstr(
|
||||||
self.sensors_y + 1 + i, self.sensors_x,
|
self.sensors_y + 1 + i, self.sensors_x,
|
||||||
sensors[i]['label'] + ':', 21)
|
sensors[i]['label'], 21)
|
||||||
self.term_window.addnstr(
|
self.term_window.addnstr(
|
||||||
self.sensors_y + 1 + i, self.sensors_x + 20,
|
self.sensors_y + 1 + i, self.sensors_x + 20,
|
||||||
format(sensors[i]['value'], '>3'), 3)
|
format(sensors[i]['value'], '>3'), 3)
|
||||||
@ -1909,7 +1912,7 @@ class glancesScreen:
|
|||||||
# partition name
|
# partition name
|
||||||
self.term_window.addnstr(
|
self.term_window.addnstr(
|
||||||
self.diskio_y + 1 + disk, self.diskio_x,
|
self.diskio_y + 1 + disk, self.diskio_x,
|
||||||
diskio[disk]['disk_name'] + ':', 8)
|
diskio[disk]['disk_name'], 8)
|
||||||
|
|
||||||
# in/s
|
# in/s
|
||||||
ins = diskio[disk]['write_bytes'] // elapsed_time
|
ins = diskio[disk]['write_bytes'] // elapsed_time
|
||||||
|
Loading…
Reference in New Issue
Block a user