[pve-devel] [PATCH] qemuserver : vm_status : add extended stats (disks, nics, memory).

Dietmar Maurer dietmar at proxmox.com
Tue Jun 16 06:29:47 CEST 2015


>  
>      my $ctime = gettimeofday;
> @@ -2415,6 +2421,7 @@ sub vmstatus {
>  	    $d->{freemem} = $info->{free_mem};
>  	}
>  
> +	$d->{memory} = $info;

Why? We already copied all data?

>      };
>  
>      my $blockstatscb = sub {
> @@ -2425,6 +2432,7 @@ sub vmstatus {
>  	for my $blockstat (@$data) {
>  	    $totalrdbytes = $totalrdbytes + $blockstat->{stats}->{rd_bytes};
>  	    $totalwrbytes = $totalwrbytes + $blockstat->{stats}->{wr_bytes};
> +	    $res->{$vmid}->{disks}->{$blockstat->{device}} = $blockstat->{stats};

I am quite unsure if we should directly pass qemu data. For example, I would
like
to have qemu-server device names (instead of blockstat->{device}). Also, this
only works
with qemu, so what about LXC?




More information about the pve-devel mailing list