On Mon, Jun 19, 2017 at 12:10:10PM +0200, Tobias Böhm wrote:
> Currently, only read/write bytes are extracted from cgroups stats.

s/bytes/operations/

> In order to provide IO operation stats these counters need to be
> read as well.
> 
> Signed-off-by: Tobias Böhm <t...@robhost.de>
> ---
>  src/PVE/LXC.pm | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index 32b0318..8e1043a 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -183,6 +183,9 @@ sub vmstatus {
>       $d->{diskread} = 0;
>       $d->{diskwrite} = 0;
>  
> +     $d->{ioread} = 0;
> +     $d->{iowrite} = 0;
> +
>       $d->{template} = PVE::LXC::Config->is_template($conf);
>      }
>  
> @@ -210,6 +213,15 @@ sub vmstatus {
>           }
>       }
>  
> +     my $blkio_opers = read_cgroup_value('blkio', $vmid, 
> 'blkio.throttle.io_serviced', 1);

The blkio cgroup is not really hierarchical. If a container creates a
subdirectory in its /sys/fs/cgroup/blkio and moves its processes into
it you won't see any updates here, and recursing through the entire
tree is a no-go. We need a better solution for this.

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to