[pve-devel] [PATCH pve-container 1/1] vmstatus: add pressure stats

Thomas Lamprecht t.lamprecht at proxmox.com
Sat Feb 6 15:12:27 CET 2021


sorry for the late reply!

On 04.11.20 02:42, Alexandre Derumier wrote:
> ---
>  src/PVE/LXC.pm | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index 5cfcf28..ad1460c 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -291,6 +291,24 @@ sub vmstatus {
>  	} else {
>  	    $d->{cpu} = 0;
>  	}
> +
> +	if (defined(my $pressure = $cgroups->get_pressure_stat())) {
> +	    $d->{pressure} = $pressure;
> +	} else {
> +	    $d->{pressure} = {
> +		cpu => {
> +		    some => { avg10 => 10, avg60 => 0, avg300 => 0 }

Setting avg10 to 10 seems wrong?


> +		},
> +		memory => {
> +		    some => { avg10 => 10, avg60 => 0, avg300 => 0 },
> +		    full => { avg10 => 10, avg60 => 0, avg300 => 0 }
> +		},
> +		io => {
> +		    some => { avg10 => 10, avg60 => 0, avg300 => 0 },
> +		    full => { avg10 => 10, avg60 => 0, avg300 => 0 }
> +		},
> +	    };
> +	}
>      }
>  
>      my $netdev = PVE::ProcFSTools::read_proc_net_dev();
> 





More information about the pve-devel mailing list