[pve-devel] [PATCH 1/2] add diskread, diskwrite, netin, netout to ResourceStore grid stats

Dietmar Maurer dietmar at proxmox.com
Fri Jul 13 09:49:32 CEST 2012


committed

> -----Original Message-----
> From: pve-devel-bounces at pve.proxmox.com [mailto:pve-devel-
> bounces at pve.proxmox.com] On Behalf Of Alexandre Derumier
> Sent: Donnerstag, 05. Juli 2012 13:24
> To: pve-devel at pve.proxmox.com
> Subject: [pve-devel] [PATCH 1/2] add diskread, diskwrite, netin, netout to
> ResourceStore grid stats
> 
> 
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
>  PVE/API2Tools.pm                  |    4 ++++
>  www/manager/data/ResourceStore.js |   32
> ++++++++++++++++++++++++++++++++
>  2 files changed, 36 insertions(+), 0 deletions(-)
> 
> diff --git a/PVE/API2Tools.pm b/PVE/API2Tools.pm index e7f29e2..bdf20a8
> 100644
> --- a/PVE/API2Tools.pm
> +++ b/PVE/API2Tools.pm
> @@ -51,6 +51,10 @@ sub extract_vm_stats {
>  	$entry->{mem} = ($d->[6] || 0) + 0;
>  	$entry->{maxdisk} = ($d->[7] || 0) + 0;
>  	$entry->{disk} = ($d->[8] || 0) + 0;
> +	$entry->{netin} = ($d->[9] || 0) + 0;
> +	$entry->{netout} = ($d->[10] || 0) + 0;
> +	$entry->{diskread} = ($d->[11] || 0) + 0;
> +	$entry->{diskwrite} = ($d->[12] || 0) + 0;
>      };
> 
>      return $entry;
> diff --git a/www/manager/data/ResourceStore.js
> b/www/manager/data/ResourceStore.js
> index c67385b..34c0b72 100644
> --- a/www/manager/data/ResourceStore.js
> +++ b/www/manager/data/ResourceStore.js
> @@ -143,6 +143,38 @@ Ext.define('PVE.data.ResourceStore', {
>  		sortable: true,
>  		width: 60
>  	    },
> +	    diskread: {
> +		header: 'Total Disk Read',
> +		type: 'integer',
> +		hidden: true,
> +		sortable: true,
> +		renderer: PVE.Utils.format_size,
> +		width: 100
> +	    },
> +	    diskwrite: {
> +		header: 'Total Disk Write',
> +		type: 'integer',
> +		hidden: true,
> +		sortable: true,
> +		renderer: PVE.Utils.format_size,
> +		width: 100
> +	    },
> +	    netin: {
> +		header: 'Total NetIn',
> +		type: 'integer',
> +		hidden: true,
> +		sortable: true,
> +		renderer: PVE.Utils.format_size,
> +		width: 100
> +	    },
> +	    netout: {
> +		header: 'Total NetOut',
> +		type: 'integer',
> +		hidden: true,
> +		sortable: true,
> +		renderer: PVE.Utils.format_size,
> +		width: 100
> +	    },
>  	    uptime: {
>  		header: gettext('Uptime'),
>  		type: 'integer',
> --
> 1.7.2.5
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel





More information about the pve-devel mailing list