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

Alexandre DERUMIER aderumier at odiso.com
Tue Jun 16 08:38:13 CEST 2015


> + $d->{memory} = $info; 

>>Why? We already copied all data? 
currently we send

max_mem
actual
free_mem
mem = total_mem - free_mem

ballon info return more counters

actual
max_mem
total_mem (great to have it without doing reverse mem+free_mem)
free_mem
mem_swapped_in
mem_swapped_out
major_page_faults
minor_page_faults



>>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}).

That's a good idea. Like this if we change from virtio to scsi, we keep the same stats.
Have the storageid too can be usefull to do aggreated stats for a specific storage

{vmid}->{disks}->{storageid}->{volumename}


>>Also, this 
>>only works 
>>with qemu, so what about LXC? 

I don't have checked how you get counters for lxc. 
We also have counters in cgroups.

----- Mail original -----
De: "dietmar" <dietmar at proxmox.com>
À: "aderumier" <aderumier at odiso.com>, "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Mardi 16 Juin 2015 06:29:47
Objet: Re: [pve-devel] [PATCH] qemuserver : vm_status : add extended stats (disks, nics, memory).

> 
> 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