: virt-manager: add sparcline to vm/connection overview
Finally display a combined sparcline for rx & tx (network) and input &
output (disk) in the Network I/O and Disk I/O columns in the vm machine
overview.
-- Guido
diff -r 134368ad3def src/virtManager/connection.py
--- a/src/virtManager/connection.py Sat Oct 04 17:04:56 2008 +0200
+++ b/src/virtManager/connection.py Sat Oct 04 17:27:01 2008 +0200
@@ -1056,6 +1056,14 @@
def disk_io_rate(self):
return self.disk_read_rate() + self.disk_write_rate()
+
+ def disk_io_vector_limit(self, dummy):
+ """No point to accumulate unnormalized I/O for a conenction"""
+ return [ 0.0 ]
+
+ def network_traffic_vector_limit(self, dummy):
+ """No point to accumulate unnormalized Rx/Tx for a conenction"""
+ return [ 0.0 ]
def uuidstr(self, rawuuid):
hex = ['0','1','2','3','4','5','6','7','8','9','a','b','c ','d','e','f']
diff -r 134368ad3def src/virtManager/domain.py
--- a/src/virtManager/domain.py Sat Oct 04 17:04:56 2008 +0200
+++ b/src/virtManager/domain.py Sat Oct 04 17:27:01 2008 +0200
@@ -422,6 +422,14 @@
vector.append(0)
return vector
+ def in_out_vector_limit(self, data, limit):
+ l = len(data)/2
+ end = [l, limit][l > limit]
+ if l > limit:
+ data = data[0:end] + data[l:l+end]
+ d = map(lambda x,y: (x + y)/2, data[0:end], data[l:l+end])
+ return d
+
def network_traffic_vector(self):
vector = []
stats = self.record
@@ -434,6 +442,9 @@
vector.append(0.0)
return vector
@@ -997,7 +1006,18 @@
if model.get_value(iter, ROW_HANDLE) is None:
return
data = model.get_value(iter, ROW_HANDLE).cpu_time_vector_limit(40)
- data.reverse()
+ cell.set_property('data_array', data)
+
+ def disk_io_img(self, column, cell, model, iter, data):
+ if model.get_value(iter, ROW_HANDLE) is None:
+ return
+ data = model.get_value(iter, ROW_HANDLE).disk_io_vector_limit(40)
+ cell.set_property('data_array', data)
+
+ def network_traffic_img(self, column, cell, model, iter, data):
+ if model.get_value(iter, ROW_HANDLE) is None:
+ return
+ data = model.get_value(iter, ROW_HANDLE).network_traffic_vector_limit(40)
cell.set_property('data_array', data)
def start_vm(self, ignore):
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
10-06-2008, 11:04 AM
"Daniel P. Berrange"
: virt-manager: add sparcline to vm/connection overview
On Sat, Oct 04, 2008 at 10:30:46PM +0200, Guido G?nther wrote:
> Finally display a combined sparcline for rx & tx (network) and input &
> output (disk) in the Network I/O and Disk I/O columns in the vm machine
> overview.
ACK
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
10-09-2008, 04:45 PM
Cole Robinson
: virt-manager: add sparcline to vm/connection overview
Guido Günther wrote:
> Finally display a combined sparcline for rx & tx (network) and input &
> output (disk) in the Network I/O and Disk I/O columns in the vm machine
> overview.
> -- Guido
>
> diff -r 134368ad3def src/virtManager/connection.py
> --- a/src/virtManager/connection.py Sat Oct 04 17:04:56 2008 +0200
> +++ b/src/virtManager/connection.py Sat Oct 04 17:27:01 2008 +0200
> @@ -1056,6 +1056,14 @@
>
> def disk_io_rate(self):
> return self.disk_read_rate() + self.disk_write_rate()
> +
> + def disk_io_vector_limit(self, dummy):
> + """No point to accumulate unnormalized I/O for a conenction"""
> + return [ 0.0 ]
> +
> + def network_traffic_vector_limit(self, dummy):
> + """No point to accumulate unnormalized Rx/Tx for a conenction"""
> + return [ 0.0 ]
>
> def uuidstr(self, rawuuid):
> hex = ['0','1','2','3','4','5','6','7','8','9','a','b','c ','d','e','f']
> diff -r 134368ad3def src/virtManager/domain.py
> --- a/src/virtManager/domain.py Sat Oct 04 17:04:56 2008 +0200
> +++ b/src/virtManager/domain.py Sat Oct 04 17:27:01 2008 +0200
> @@ -422,6 +422,14 @@
> vector.append(0)
> return vector
>
> + def in_out_vector_limit(self, data, limit):
> + l = len(data)/2
> + end = [l, limit][l > limit]
> + if l > limit:
> + data = data[0:end] + data[l:l+end]
This piece here was giving me some trouble. If we
shrink data here, then the line below will try to
grab an out of bound index.
Maybe this should be ... data[0:end], data[end:end*2] or
similar.
Also, the scaling problems with the disk polling can be
_really_ bad (though it's no fault of the code). If I have
polling going once a second, and single guest running with
six disks and a nic, the UI is completely locked up.
So I'd like to hold off on committing the actual polling
work until we put the gconf values in to disable this. It
doesn't even need to wired up to the gui for now, I can
do that after this its committed if you'd like (the prefs
dialog needs an overhaul anyways, but that can come after).
Thanks,
Cole
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
10-18-2008, 07:51 PM
Guido Günther
: virt-manager: add sparcline to vm/connection overview
Hi,
Display a combined sparcline for rx & tx (network) and input & output
(disk) in the Network I/O and Disk I/O columns in the vm machine
overview. Bounds fixed as suggested by Cole.
-- Guido
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools