[pve-devel] [PATCH manager 3/3] add disk iops to summary panel

Tobias Böhm tb at robhost.de
Mon Jun 19 12:10:21 CEST 2017


---
 www/manager6/data/RRDStore.js      |  2 ++
 www/manager6/data/ResourceStore.js | 14 ++++++++++++++
 www/manager6/lxc/Summary.js        |  7 +++++++
 www/manager6/panel/RRDChart.js     |  7 +++++++
 www/manager6/qemu/Summary.js       |  7 +++++++
 5 files changed, 37 insertions(+)

diff --git a/www/manager6/data/RRDStore.js b/www/manager6/data/RRDStore.js
index f9f80685..0a86b419 100644
--- a/www/manager6/data/RRDStore.js
+++ b/www/manager6/data/RRDStore.js
@@ -56,6 +56,8 @@ Ext.define('PVE.data.RRDStore', {
 	'disk',
 	'diskread',
 	'diskwrite',
+	'ioread',
+	'iowrite',
 	'maxdisk',
 
 	// missing storage fields
diff --git a/www/manager6/data/ResourceStore.js b/www/manager6/data/ResourceStore.js
index d17cffc0..78b43a21 100644
--- a/www/manager6/data/ResourceStore.js
+++ b/www/manager6/data/ResourceStore.js
@@ -177,6 +177,20 @@ Ext.define('PVE.data.ResourceStore', {
 		renderer: PVE.Utils.format_size,
 		width: 100
 	    },
+	    ioread: {
+		header: gettext('Total IO Read'),
+		type: 'integer',
+		hidden: true,
+		sortable: true,
+		width: 100
+	    },
+	    iowrite: {
+		header: gettext('Total IO Write'),
+		type: 'integer',
+		hidden: true,
+		sortable: true,
+		width: 100
+	    },
 	    netin: {
 		header: gettext('Total NetIn'),
 		type: 'integer',
diff --git a/www/manager6/lxc/Summary.js b/www/manager6/lxc/Summary.js
index e9292b2b..71aab8dd 100644
--- a/www/manager6/lxc/Summary.js
+++ b/www/manager6/lxc/Summary.js
@@ -133,6 +133,13 @@ Ext.define('PVE.lxc.Summary', {
 				    pveSelNode: me.pveSelNode,
 				    fields: ['diskread','diskwrite'],
 				    store: rrdstore
+				},
+				{
+				    xtype: 'pveRRDChart',
+				    title: gettext('Disk IOPS'),
+				    pveSelNode: me.pveSelNode,
+				    fields: ['ioread','iowrite'],
+				    store: rrdstore
 				}
 			    ]
 			}
diff --git a/www/manager6/panel/RRDChart.js b/www/manager6/panel/RRDChart.js
index 4cb6dcda..9815b8c1 100644
--- a/www/manager6/panel/RRDChart.js
+++ b/www/manager6/panel/RRDChart.js
@@ -49,6 +49,11 @@ Ext.define('PVE.widget.RRDChart', {
 	'diskwrite'
     ],
 
+    oppersArr: [
+	'ioread',
+	'iowrite'
+    ],
+
     percentArr: [
 	'cpu',
 	'iowait'
@@ -124,6 +129,8 @@ Ext.define('PVE.widget.RRDChart', {
 	    axisTitle = "Bytes";
 	} else if (me.bytespersArr.indexOf(me.fields[0]) != -1) {
 	    axisTitle = "Bytes/s";
+	} else if (me.oppersArr.indexOf(me.fields[0]) != -1) {
+	    axisTitle = "Operations/s";
 	}
 	me.axes[0].setTitle(axisTitle);
 
diff --git a/www/manager6/qemu/Summary.js b/www/manager6/qemu/Summary.js
index e0838b62..1fe2c64a 100644
--- a/www/manager6/qemu/Summary.js
+++ b/www/manager6/qemu/Summary.js
@@ -140,6 +140,13 @@ Ext.define('PVE.qemu.Summary', {
 				    pveSelNode: me.pveSelNode,
 				    fields: ['diskread','diskwrite'],
 				    store: rrdstore
+				},
+				{
+				    xtype: 'pveRRDChart',
+				    title: gettext('Disk IOPS'),
+				    pveSelNode: me.pveSelNode,
+				    fields: ['ioread','iowrite'],
+				    store: rrdstore
 				}
 			    ]
 			}
-- 
2.11.0




More information about the pve-devel mailing list