public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Maximiliano Sandoval <m.sandoval@proxmox.com>
Subject: Re: [pve-devel] [PATCH container] fix #4765: lxc: report cpu usage correctly
Date: Fri, 23 Jun 2023 13:54:27 +0200	[thread overview]
Message-ID: <4ab17011-52ca-9bf5-05e6-7a5b8dadb6b3@proxmox.com> (raw)
In-Reply-To: <20230620154608.338825-1-m.sandoval@proxmox.com>

Am 20.06.23 um 17:46 schrieb Maximiliano Sandoval:
> When running `pct status VMID` the variable

Issue is only present with --verbose.

> $last_proc_vmid_stat->{$vmid} is not set and pct reports no cpu usage.
> 
> We address this by computing the used cpu time over the total uptime of
> the container.
> 

qm would have the same issue, but there, we don't even output a line for
"cpu:" ;)

IMHO, the average of the CPU usage across the whole uptime is not what
most people would expect this value to be. Maybe we should just remove
the line from the output like in qm (technically a breaking change) or
maybe query the CPU stats twice with a small time window in between?

No matter what approach we go for, the behavior of qm and pct should be
made consistent here (if no good reason against it pops up).




  reply	other threads:[~2023-06-23 11:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 15:46 Maximiliano Sandoval
2023-06-23 11:54 ` Fiona Ebner [this message]
2023-06-24 15:39   ` Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ab17011-52ca-9bf5-05e6-7a5b8dadb6b3@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=m.sandoval@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal