[PATCH/RFC]: virt-manager: display disk and network I/O statistics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
attached is a more complete version of the net/disk I/O statistics
patch. Screenshots are here:

 http://honk.sigxcpu.org/misc/vm-overview.png
 http://honk.sigxcpu.org/misc/vm-detail.png

There's certainly lots of room for improvement.

 * all units are KBytes/s, that should be changeable
 * the GtkSparkline graphs display input only. I'd be nice to have in
   and out in one graph in different colors
 * the overview looks a bit boring, should we add sparklines there too,
   like for cpu usage?

I've not cleaned up the disk_usage vs disk_io naming mess yet, since I'd
wanted to get some feedback first.
Cheers,
 -- Guido
# HG changeset patch
# User "Guido Günther <agx@xxxxxxxxxxx>"
# Date 1223040670 -7200
# Node ID de9d6daefd5ae9b6122ec316816787122d56fc1d
# Parent  0b86cdc80b2cbeb73fddccf3ea9bcbe72ef94375

diff -r 0b86cdc80b2c -r de9d6daefd5a src/virt-manager.schemas.in
--- a/src/virt-manager.schemas.in	Thu Oct 02 19:43:42 2008 +0200
+++ b/src/virt-manager.schemas.in	Fri Oct 03 15:31:10 2008 +0200
@@ -66,28 +66,28 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/::PACKAGE::/vmlist-fields/disk_usage</key>
+      <key>/schemas/apps/::PACKAGE::/vmlist-fields/disk_io</key>
       <applyto>/apps/::PACKAGE::/vmlist-fields/disk_usage</applyto>
       <owner>::PACKAGE::</owner>
       <type>bool</type>
       <default>0</default>
 
       <locale name="C">
-        <short>Show disk usage in summary</short>
-        <long>Show the disk usage field in the domain list summary view</long>
+        <short>Show disk I/O in summary</short>
+        <long>Show the disk I/O field in the domain list summary view</long>
       </locale>
     </schema>
 
     <schema>
-      <key>/schemas/apps/::PACKAGE::/vmlist-fields/network_traffic</key>
-      <applyto>/apps/::PACKAGE::/vmlist-fields/network_traffic</applyto>
+      <key>/schemas/apps/::PACKAGE::/vmlist-fields/network_io</key>
+      <applyto>/apps/::PACKAGE::/vmlist-fields/network_io</applyto>
       <owner>::PACKAGE::</owner>
       <type>bool</type>
       <default>0</default>
 
       <locale name="C">
-        <short>Show network traffic in summary</short>
-        <long>Show the network traffic field in the domain list summary view</long>
+        <short>Show network I/O in summary</short>
+        <long>Show the network I/O field in the domain list summary view</long>
       </locale>
     </schema>
 
diff -r 0b86cdc80b2c -r de9d6daefd5a src/virtManager/config.py
--- a/src/virtManager/config.py	Thu Oct 02 19:43:42 2008 +0200
+++ b/src/virtManager/config.py	Fri Oct 03 15:31:10 2008 +0200
@@ -110,10 +110,10 @@
         return self.conf.get_bool(self.conf_dir + "/vmlist-fields/memory_usage")
 
     def is_vmlist_disk_usage_visible(self):
-        return self.conf.get_bool(self.conf_dir + "/vmlist-fields/disk_usage")
+        return self.conf.get_bool(self.conf_dir + "/vmlist-fields/disk_io")
 
     def is_vmlist_network_traffic_visible(self):
-        return self.conf.get_bool(self.conf_dir + "/vmlist-fields/network_traffic")
+        return self.conf.get_bool(self.conf_dir + "/vmlist-fields/network_io")
 
 
 
@@ -133,10 +133,10 @@
         self.conf.set_bool(self.conf_dir + "/vmlist-fields/memory_usage", state)
 
     def set_vmlist_disk_usage_visible(self, state):
-        self.conf.set_bool(self.conf_dir + "/vmlist-fields/disk_usage", state)
+        self.conf.set_bool(self.conf_dir + "/vmlist-fields/disk_io", state)
 
     def set_vmlist_network_traffic_visible(self, state):
-        self.conf.set_bool(self.conf_dir + "/vmlist-fields/network_traffic", state)
+        self.conf.set_bool(self.conf_dir + "/vmlist-fields/network_io", state)
 
 
 
@@ -156,10 +156,10 @@
         self.conf.notify_add(self.conf_dir + "/vmlist-fields/memory_usage", callback)
 
     def on_vmlist_disk_usage_visible_changed(self, callback):
-        self.conf.notify_add(self.conf_dir + "/vmlist-fields/disk_usage", callback)
+        self.conf.notify_add(self.conf_dir + "/vmlist-fields/disk_io", callback)
 
     def on_vmlist_network_traffic_visible_changed(self, callback):
-        self.conf.notify_add(self.conf_dir + "/vmlist-fields/network_traffic", callback)
+        self.conf.notify_add(self.conf_dir + "/vmlist-fields/network_io", callback)
 
 
 
diff -r 0b86cdc80b2c -r de9d6daefd5a src/virtManager/connection.py
--- a/src/virtManager/connection.py	Thu Oct 02 19:43:42 2008 +0200
+++ b/src/virtManager/connection.py	Fri Oct 03 15:31:10 2008 +0200
@@ -936,13 +936,20 @@
 
         mem = 0
         cpuTime = 0
+        rdRate = 0
+        wrRate = 0
+        rxRate = 0
+        txRate = 0
 
         for uuid in self.vms:
             vm = self.vms[uuid]
             if vm.get_id() != -1:
                 cpuTime = cpuTime + vm.get_cputime()
                 mem = mem + vm.get_memory()
-
+                rdRate += vm.disk_read_rate()
+                wrRate += vm.disk_write_rate()
+                rxRate += vm.network_rx_rate()
+                txRate += vm.network_tx_rate()
 
         pcentCpuTime = 0
         if len(self.record) > 0:
@@ -966,7 +973,11 @@
             "memory": mem,
             "memoryPercent": pcentMem,
             "cpuTime": cpuTime,
-            "cpuTimePercent": pcentCpuTime
+            "cpuTimePercent": pcentCpuTime,
+            "diskRdRate" : rdRate,
+            "diskWrRate" : wrRate,
+            "netRxRate" : rxRate,
+            "netTxRate" : txRate,
         }
 
         self.record.insert(0, newStats)
@@ -1019,6 +1030,32 @@
             else:
                 vector.append(0)
         return vector
+
+    def network_rx_rate(self):
+        if len(self.record) == 0:
+            return 0
+        return self.record[0]["netRxRate"]
+
+    def network_tx_rate(self):
+        if len(self.record) == 0:
+            return 0
+        return self.record[0]["netTxRate"]
+
+    def network_io_rate(self):
+        return self.network_tx_rate() + self.network_rx_rate()
+
+    def disk_read_rate(self):
+        if len(self.record) == 0:
+            return 0
+        return self.record[0]["diskRdRate"]
+
+    def disk_write_rate(self):
+        if len(self.record) == 0:
+            return 0
+        return self.record[0]["diskWrRate"]
+
+    def disk_io_rate(self):
+        return self.disk_read_rate() + self.disk_write_rate()
 
     def uuidstr(self, rawuuid):
         hex = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f']
diff -r 0b86cdc80b2c -r de9d6daefd5a src/virtManager/details.py
--- a/src/virtManager/details.py	Thu Oct 02 19:43:42 2008 +0200
+++ b/src/virtManager/details.py	Fri Oct 03 15:31:10 2008 +0200
@@ -168,9 +168,11 @@
         self.memory_usage_graph = sparkline.Sparkline()
         self.window.get_widget("graph-table").attach(self.memory_usage_graph, 1, 2, 1, 2)
 
-        self.network_traffic_graph = sparkline.Sparkline()
-        self.window.get_widget("graph-table").attach(self.network_traffic_graph, 1, 2, 3, 4)
+        self.disk_io_graph = sparkline.Sparkline()
+        self.window.get_widget("graph-table").attach(self.disk_io_graph, 1, 2, 2, 3)
 
+        self.network_io_graph = sparkline.Sparkline()
+        self.window.get_widget("graph-table").attach(self.network_io_graph, 1, 2, 3, 4)
 
         self.accel_groups = gtk.accel_groups_from_object(topwin)
         self.gtk_settings_accel = None
@@ -437,12 +439,6 @@
             dialog.present()
             return
         dialog.show_all()
-        self.window.get_widget("overview-network-traffic-text").hide()
-        self.window.get_widget("overview-network-traffic-label").hide()
-        self.window.get_widget("overview-disk-usage-bar").hide()
-        self.window.get_widget("overview-disk-usage-text").hide()
-        self.window.get_widget("overview-disk-usage-label").hide()
-        self.network_traffic_graph.hide()
         dialog.present()
         self.engine.increment_window_counter()
         self.update_widget_states(self.vm, self.vm.status())
@@ -763,9 +759,17 @@
         memory_vector.reverse()
         self.memory_usage_graph.set_property("data_array", memory_vector)
 
+        self.window.get_widget("overview-network-traffic-text").set_text("%d KBytes/s in\n%d KBypte/s out" %
+                                                                   (self.vm.network_rx_rate(), self.vm.network_tx_rate()))
         network_vector = self.vm.network_traffic_vector()
         network_vector.reverse()
-        self.network_traffic_graph.set_property("data_array", network_vector)
+        self.network_io_graph.set_property("data_array", network_vector)
+
+        self.window.get_widget("overview-disk-usage-text").set_text("%d KBytes/s in\n%d KBypte/s out" %
+                                                                   (self.vm.disk_read_rate(), self.vm.disk_write_rate()))
+        disk_vector = self.vm.disk_io_vector()
+        disk_vector.reverse()
+        self.disk_io_graph.set_property("data_array", disk_vector)
 
     def refresh_config_cpu(self):
         self.window.get_widget("state-host-cpus").set_text("%d" % self.vm.get_connection().host_active_processor_count())
diff -r 0b86cdc80b2c -r de9d6daefd5a src/virtManager/domain.py
--- a/src/virtManager/domain.py	Thu Oct 02 19:43:42 2008 +0200
+++ b/src/virtManager/domain.py	Fri Oct 03 15:31:10 2008 +0200
@@ -45,6 +45,12 @@
         self.uuid = uuid
         self.lastStatus = None
         self.record = []
+        self.maxRecord = { "diskRdRate" : 10.0,
+                           "diskWrRate" : 10.0,
+                           "netTxRate"  : 10.0,
+                           "netRxRate"  : 10.0,
+                         }
+
         self._update_status()
         self.xml = None
 
@@ -149,6 +155,34 @@
             self.lastStatus = status
             self.emit("status-changed", status)
 
+    def _network_io(self):
+        rx = 0
+        tx = 0
+        for netdev in self.get_network_devices():
+            io = self.vm.interfaceStats(netdev[2])
+            if io:
+                rx += io[0]
+                tx += io[4]
+        return rx, tx
+
+    def _disk_io(self):
+        rd = 0
+        wr = 0
+        for disk in self.get_disk_devices():
+            io = self.vm.blockStats(disk[3])
+            if io:
+                rd += io[1]
+                wr += io[3]
+        return rd, wr
+
+    def _get_cur_rate(self, what):
+        if len(self.record) > 1:
+            ret = float(self.record[0][what] - self.record[1][what]) / \
+                      float(self.record[0]["timestamp"] - self.record[1]["timestamp"])
+        else:
+            ret = 0.0
+        return ret
+
     def tick(self, now):
         if self.connection.get_state() != self.connection.STATE_ACTIVE:
             return
@@ -196,6 +230,9 @@
         pcentCurrMem = info[2] * 100.0 / self.connection.host_memory_size()
         pcentMaxMem = info[1] * 100.0 / self.connection.host_memory_size()
 
+        rdBytes, wrBytes = self._disk_io()
+        rxBytes, txBytes = self._network_io()
+
         newStats = { "timestamp": now,
                      "cpuTime": cpuTime,
                      "cpuTimeAbs": cpuTimeAbs,
@@ -205,6 +242,10 @@
                      "vcpuCount": info[3],
                      "maxMem": info[1],
                      "maxMemPercent": pcentMaxMem,
+                     "diskRdKB": rdBytes / 1024,
+                     "diskWrKB": wrBytes / 1024,
+                     "netRxKB": rxBytes / 1024,
+                     "netTxKB": txBytes / 1024,
                      }
 
         self.record.insert(0, newStats)
@@ -222,6 +263,19 @@
         else:
             self.record[0]["cpuTimeMovingAvg"] = (self.record[0]["cpuTimeAbs"]-startCpuTime) / nSamples
             self.record[0]["cpuTimeMovingAvgPercent"] = (self.record[0]["cpuTimeAbs"]-startCpuTime) * 100.0 / ((now-startTimestamp)*1000.0*1000.0*1000.0 * self.connection.host_active_processor_count())
+
+        self.record[0]["diskRdRate"] = self._get_cur_rate("diskRdKB")
+        if self.record[0]["diskRdRate"] > self.maxRecord["diskRdRate"]:
+            self.maxRecord["diskRdRate"] = self.record[0]["diskRdRate"]
+        self.record[0]["diskWrRate"] = self._get_cur_rate("diskWrKB")
+        if self.record[0]["diskWrRate"] > self.maxRecord["diskWrRate"]:
+            self.maxRecord["diskWrRate"] = self.record[0]["diskWrRate"]
+        self.record[0]["netRxRate"] = self._get_cur_rate("netRxKB")
+        if self.record[0]["netRxRate"] > self.maxRecord["netRxRate"]:
+            self.maxRecord["netRxRate"] = self.record[0]["netRxRate"]
+        self.record[0]["netTxRate"] = self._get_cur_rate("netTxKB")
+        if self.record[0]["netTxRate"] > self.maxRecord["netTxRate"]:
+            self.maxRecord["netTxRate"] = self.record[0]["netTxRate"]
 
         self._update_status(info[0])
         self.emit("resources-sampled")
@@ -297,17 +351,31 @@
     def cpu_time_pretty(self):
         return "%2.2f %%" % self.cpu_time_percentage()
 
-    def network_traffic(self):
-        return 1
+    def network_rx_rate(self):
+        if len(self.record) == 0:
+            return 0
+        return self.record[0]["netRxRate"]
 
-    def network_traffic_percentage(self):
-        return 1
+    def network_tx_rate(self):
+        if len(self.record) == 0:
+            return 0
+        return self.record[0]["netTxRate"]
 
-    def disk_usage(self):
-        return 1
+    def network_io_rate(self):
+        return self.network_tx_rate() + self.network_rx_rate()
 
-    def disk_usage_percentage(self):
-        return 1
+    def disk_read_rate(self):
+        if len(self.record) == 0:
+            return 0
+        return self.record[0]["diskRdRate"]
+
+    def disk_write_rate(self):
+        if len(self.record) == 0:
+            return 0
+        return self.record[0]["diskWrRate"]
+
+    def disk_io_rate(self):
+        return self.disk_read_rate() + self.disk_write_rate()
 
     def vcpu_count(self):
         if len(self.record) == 0:
@@ -358,14 +426,22 @@
         vector = []
         stats = self.record
         for i in range(self.config.get_stats_history_length()+1):
-            vector.append(0)
+            if i < len(stats):
+                vector.append(float(stats[i]["netRxRate"])/
+                              float(self.maxRecord["netRxRate"]))
+            else:
+                vector.append(0.0)
         return vector
 
-    def disk_usage_vector(self):
+    def disk_io_vector(self):
         vector = []
         stats = self.record
         for i in range(self.config.get_stats_history_length()+1):
-            vector.append(0)
+            if i < len(stats):
+                vector.append(float(stats[i]["diskRdRate"])/
+                              float(self.maxRecord["diskRdRate"]))
+            else:
+                vector.append(0.0)
         return vector
 
     def shutdown(self):
diff -r 0b86cdc80b2c -r de9d6daefd5a src/virtManager/manager.py
--- a/src/virtManager/manager.py	Thu Oct 02 19:43:42 2008 +0200
+++ b/src/virtManager/manager.py	Fri Oct 03 15:31:10 2008 +0200
@@ -52,6 +52,10 @@
 ROW_MEM_USAGE = 8
 ROW_KEY = 9
 ROW_HINT = 10
+ROW_DISK_RD = 11
+ROW_DISK_WR = 12
+ROW_NET_RX = 13
+ROW_NET_TX = 14
 
 # Columns in the tree view
 COL_NAME = 0
@@ -131,8 +135,6 @@
         self.window.get_widget("menu_view_memory_usage").set_active(self.config.is_vmlist_memory_usage_visible())
         self.window.get_widget("menu_view_disk_usage").set_active(self.config.is_vmlist_disk_usage_visible())
         self.window.get_widget("menu_view_network_traffic").set_active(self.config.is_vmlist_network_traffic_visible())
-        self.window.get_widget("menu_view_disk_usage").set_sensitive(False)
-        self.window.get_widget("menu_view_network_traffic").set_sensitive(False)
 
         self.window.get_widget("vm-view").set_active(0)
 
@@ -450,6 +452,10 @@
         row.insert(ROW_MEM, vm.get_memory_pretty())
         row.insert(ROW_MEM_USAGE, vm.current_memory_percentage())
         row.insert(ROW_KEY, vm.get_uuid())
+        row.insert(ROW_DISK_RD, vm.disk_read_rate())
+        row.insert(ROW_DISK_WR, vm.disk_write_rate())
+        row.insert(ROW_NET_RX, vm.network_rx_rate())
+        row.insert(ROW_NET_TX, vm.network_tx_rate())
         row.insert(ROW_HINT, None)
 
         iter = model.append(parent, row)
@@ -471,6 +477,10 @@
         row.insert(ROW_MEM_USAGE, conn.current_memory_percentage())
         row.insert(ROW_KEY, conn.get_uri())
         row.insert(ROW_HINT, conn.get_uri())
+        row.insert(ROW_DISK_RD, conn.disk_read_rate())
+        row.insert(ROW_DISK_WR, conn.disk_write_rate())
+        row.insert(ROW_NET_RX, conn.network_rx_rate())
+        row.insert(ROW_NET_TX, conn.network_tx_rate())
 
         iter = model.append(None, row)
         path = model.get_path(iter)
@@ -524,7 +534,7 @@
             return
 
         row = self.rows[vm.get_uuid()]
-        # Handle, name, ID, status, status icon, cpu, cpu graph, vcpus, mem, mem bar
+        # Handle, name, ID, status, status icon, cpu, cpu graph, vcpus, mem, mem bar, diskRead, diskWrite, netRx, netTx
         if vm.get_id() == -1:
             row[ROW_ID] = "-"
         else:
@@ -535,6 +545,10 @@
         row[ROW_VCPUS] = vm.vcpu_count()
         row[ROW_MEM] = vm.get_memory_pretty()
         row[ROW_MEM_USAGE] = vm.current_memory_percentage()
+        row[ROW_DISK_RD] = vm.disk_read_rate()
+        row[ROW_DISK_WR] = vm.disk_write_rate()
+        row[ROW_NET_RX] = vm.network_rx_rate()
+        row[ROW_NET_TX] = vm.network_tx_rate()
         model.row_changed(row.path, row.iter)
 
         if vm == self.current_vm():
@@ -559,6 +573,10 @@
         row[ROW_VCPUS] = conn.host_active_processor_count()
         row[ROW_MEM] = conn.pretty_current_memory()
         row[ROW_MEM_USAGE] = conn.current_memory_percentage()
+        row[ROW_DISK_RD] = conn.disk_read_rate()
+        row[ROW_DISK_WR] = conn.disk_write_rate()
+        row[ROW_NET_RX] = conn.network_rx_rate()
+        row[ROW_NET_TX] = conn.network_tx_rate()
         if conn.get_state() in [vmmConnection.STATE_DISCONNECTED, vmmConnection.STATE_CONNECTING]:
             # Connection went inactive, delete any VM child nodes
             parent = self.rows[conn.get_uri()].iter
@@ -787,8 +805,8 @@
     def prepare_vmlist(self):
         vmlist = self.window.get_widget("vm-list")
 
-        # Handle, name, ID, status, status icon, cpu, [cpu graph], vcpus, mem, mem bar, uuid
-        model = gtk.TreeStore(object, str, str, str, gtk.gdk.Pixbuf, str, int, str, int, str, str)
+        # Handle, name, ID, status, status icon, cpu, [cpu graph], vcpus, mem, mem bar, uuid, diskRead, diskWrite, netRx, netTx
+        model = gtk.TreeStore(object, str, str, str, gtk.gdk.Pixbuf, str, int, str, int, str, str, int, int, int, int)
         vmlist.set_model(model)
         try:
             vmlist.set_tooltip_column(ROW_HINT)
@@ -803,8 +821,10 @@
         cpuUsageCol = gtk.TreeViewColumn(_("CPU usage"))
         virtualCPUsCol = gtk.TreeViewColumn(_("VCPUs"))
         memoryUsageCol = gtk.TreeViewColumn(_("Memory usage"))
-        diskUsageCol = gtk.TreeViewColumn(_("Disk usage"))
-        networkTrafficCol = gtk.TreeViewColumn(_("Network traffic"))
+	# FIXME: add KBytes/s tooltip
+	# FIXME: rename diskUsage/networkTraffic to diskIO/networkIO everywhere
+        diskUsageCol = gtk.TreeViewColumn(_("Disk I/O"))
+        networkTrafficCol = gtk.TreeViewColumn(_("Network I/O"))
 
         vmlist.append_column(nameCol)
         vmlist.append_column(idCol)
@@ -826,12 +846,12 @@
 
         name_txt = gtk.CellRendererText()
         nameCol.pack_start(name_txt, True)
-        nameCol.add_attribute(name_txt, 'text', 1)
+        nameCol.add_attribute(name_txt, 'text', ROW_NAME)
         nameCol.set_sort_column_id(VMLIST_SORT_NAME)
 
         id_txt = gtk.CellRendererText()
         idCol.pack_start(id_txt, True)
-        idCol.add_attribute(id_txt, 'text', 2)
+        idCol.add_attribute(id_txt, 'text', ROW_ID)
         idCol.set_visible(self.config.is_vmlist_domain_id_visible())
         idCol.set_sort_column_id(VMLIST_SORT_ID)
 
@@ -839,44 +859,48 @@
         status_icon = gtk.CellRendererPixbuf()
         statusCol.pack_start(status_icon, False)
         statusCol.pack_start(status_txt, False)
-        statusCol.add_attribute(status_txt, 'text', 3)
-        statusCol.add_attribute(status_icon, 'pixbuf', 4)
+        statusCol.add_attribute(status_txt, 'text', ROW_STATUS)
+        statusCol.add_attribute(status_icon, 'pixbuf', ROW_STATUS_ICON)
         statusCol.set_visible(self.config.is_vmlist_status_visible())
 
         cpuUsage_txt = gtk.CellRendererText()
         cpuUsage_img = sparkline.CellRendererSparkline()
         cpuUsageCol.pack_start(cpuUsage_txt, False)
         cpuUsageCol.pack_start(cpuUsage_img, False)
-        cpuUsageCol.add_attribute(cpuUsage_txt, 'text', 5)
+        cpuUsageCol.add_attribute(cpuUsage_txt, 'text', ROW_CPU)
         cpuUsageCol.set_cell_data_func(cpuUsage_img, self.cpu_usage_img, None)
         cpuUsageCol.set_visible(self.config.is_vmlist_cpu_usage_visible())
         cpuUsageCol.set_sort_column_id(VMLIST_SORT_CPU_USAGE)
 
         virtualCPUs_txt = gtk.CellRendererText()
         virtualCPUsCol.pack_start(virtualCPUs_txt, False)
-        virtualCPUsCol.add_attribute(virtualCPUs_txt, 'text', 6)
+        virtualCPUsCol.add_attribute(virtualCPUs_txt, 'text', ROW_VCPUS)
         virtualCPUsCol.set_visible(self.config.is_vmlist_virtual_cpus_visible())
 
         memoryUsage_txt = gtk.CellRendererText()
         memoryUsage_img = gtk.CellRendererProgress()
         memoryUsageCol.pack_start(memoryUsage_txt, False)
         memoryUsageCol.pack_start(memoryUsage_img, False)
-        memoryUsageCol.add_attribute(memoryUsage_txt, 'text', 7)
-        memoryUsageCol.add_attribute(memoryUsage_img, 'value', 8)
+        memoryUsageCol.add_attribute(memoryUsage_txt, 'text', ROW_MEM)
+        memoryUsageCol.add_attribute(memoryUsage_img, 'value', ROW_MEM_USAGE)
         memoryUsageCol.set_visible(self.config.is_vmlist_memory_usage_visible())
         memoryUsageCol.set_sort_column_id(VMLIST_SORT_MEMORY_USAGE)
 
-        diskUsage_txt = gtk.CellRendererText()
-        diskUsage_img = gtk.CellRendererProgress()
-        diskUsageCol.pack_start(diskUsage_txt, False)
-        diskUsageCol.pack_start(diskUsage_img, False)
+        diskUsageIn_txt = gtk.CellRendererText()
+        diskUsageOut_txt = gtk.CellRendererText()
+        diskUsageCol.pack_start(diskUsageIn_txt, False)
+        diskUsageCol.pack_start(diskUsageOut_txt, False)
+        diskUsageCol.add_attribute(diskUsageIn_txt, 'text', ROW_DISK_RD)
+        diskUsageCol.add_attribute(diskUsageOut_txt, 'text', ROW_DISK_WR)
         diskUsageCol.set_visible(self.config.is_vmlist_disk_usage_visible())
         diskUsageCol.set_sort_column_id(VMLIST_SORT_DISK_USAGE)
 
-        networkTraffic_txt = gtk.CellRendererText()
-        networkTraffic_img = gtk.CellRendererProgress()
-        networkTrafficCol.pack_start(networkTraffic_txt, False)
-        networkTrafficCol.pack_start(networkTraffic_img, False)
+        networkTrafficIn_txt = gtk.CellRendererText()
+        networkTrafficOut_txt = gtk.CellRendererText()
+        networkTrafficCol.pack_start(networkTrafficIn_txt, False)
+        networkTrafficCol.pack_start(networkTrafficOut_txt, False)
+        networkTrafficCol.add_attribute(networkTrafficIn_txt, 'text', ROW_NET_RX)
+        networkTrafficCol.add_attribute(networkTrafficOut_txt, 'text', ROW_NET_TX)
         networkTrafficCol.set_visible(self.config.is_vmlist_network_traffic_visible())
         networkTrafficCol.set_sort_column_id(VMLIST_SORT_NETWORK_USAGE)
 
@@ -903,10 +927,10 @@
         return cmp(model.get_value(iter1, ROW_HANDLE).current_memory_percentage(), model.get_value(iter2, ROW_HANDLE).current_memory_percentage())
 
     def vmlist_disk_usage_sorter(self, model, iter1, iter2):
-        return cmp(model.get_value(iter1, ROW_HANDLE).disk_usage(), model.get_value(iter2, ROW_HANDLE).disk_usage())
+        return cmp(model.get_value(iter1, ROW_HANDLE).disk_io_rate(), model.get_value(iter2, ROW_HANDLE).disk_io_rate())
 
     def vmlist_network_usage_sorter(self, model, iter1, iter2):
-        return cmp(model.get_value(iter1, ROW_HANDLE).network_traffic(), model.get_value(iter2, ROW_HANDLE).network_traffic())
+        return cmp(model.get_value(iter1, ROW_HANDLE).network_io_rate(), model.get_value(iter2, ROW_HANDLE).network_io_rate())
 
     def toggle_domain_id_visible_conf(self, menu):
         self.config.set_vmlist_domain_id_visible(menu.get_active())
diff -r 0b86cdc80b2c -r de9d6daefd5a src/vmm-details.glade
--- a/src/vmm-details.glade	Thu Oct 02 19:43:42 2008 +0200
+++ b/src/vmm-details.glade	Fri Oct 03 15:31:10 2008 +0200
@@ -1248,23 +1248,6 @@
 				  <property name="column_spacing">3</property>
 
 				  <child>
-				    <widget class="GtkProgressBar" id="overview-disk-usage-bar">
-				      <property name="visible">True</property>
-				      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-				      <property name="fraction">0.119999997318</property>
-				      <property name="pulse_step">0.10000000149</property>
-				      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				    </widget>
-				    <packing>
-				      <property name="left_attach">1</property>
-				      <property name="right_attach">2</property>
-				      <property name="top_attach">2</property>
-				      <property name="bottom_attach">3</property>
-				      <property name="y_options"></property>
-				    </packing>
-				  </child>
-
-				  <child>
 				    <widget class="GtkLabel" id="label45">
 				      <property name="visible">True</property>
 				      <property name="label" translatable="yes">CPU usage:</property>
@@ -1323,7 +1306,7 @@
 				  <child>
 				    <widget class="GtkLabel" id="overview-disk-usage-label">
 				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Disk usage:</property>
+				      <property name="label" translatable="yes">Disk I/O:</property>
 				      <property name="use_underline">False</property>
 				      <property name="use_markup">False</property>
 				      <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -1351,7 +1334,7 @@
 				  <child>
 				    <widget class="GtkLabel" id="overview-network-traffic-label">
 				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Network usage:</property>
+				      <property name="label" translatable="yes">Network I/O:</property>
 				      <property name="use_underline">False</property>
 				      <property name="use_markup">False</property>
 				      <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -1435,7 +1418,7 @@
 				  <child>
 				    <widget class="GtkLabel" id="overview-disk-usage-text">
 				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">20 bits/sec</property>
+				      <property name="label" translatable="yes">20 KBytes/s</property>
 				      <property name="use_underline">False</property>
 				      <property name="use_markup">False</property>
 				      <property name="justify">GTK_JUSTIFY_LEFT</property>
diff -r 0b86cdc80b2c -r de9d6daefd5a src/vmm-manager.glade
--- a/src/vmm-manager.glade	Thu Oct 02 19:43:42 2008 +0200
+++ b/src/vmm-manager.glade	Fri Oct 03 15:31:10 2008 +0200
@@ -262,7 +262,7 @@
 		  <child>
 		    <widget class="GtkCheckMenuItem" id="menu_view_disk_usage">
 		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Disk usage</property>
+		      <property name="label" translatable="yes">Disk I/O</property>
 		      <property name="use_underline">True</property>
 		      <property name="active">True</property>
 		      <signal name="activate" handler="on_menu_view_disk_usage_activate" last_modification_time="Tue, 28 Mar 2006 16:35:00 GMT"/>
@@ -272,7 +272,7 @@
 		  <child>
 		    <widget class="GtkCheckMenuItem" id="menu_view_network_traffic">
 		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Network traffic</property>
+		      <property name="label" translatable="yes">Network I/O</property>
 		      <property name="use_underline">True</property>
 		      <property name="active">True</property>
 		      <signal name="activate" handler="on_menu_view_network_traffic_activate" last_modification_time="Tue, 28 Mar 2006 16:35:00 GMT"/>
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux