From nobody Mon Feb 9 11:53:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1669652224; cv=none; d=zohomail.com; s=zohoarc; b=ByDBt2TLjHfLfVE4TGF9SbWXWIiHbRiJKwXmrY0HsXgk+hMEVbuCS9nM0I75d3OXpkYsFh+OWQmAs2vucgAwB49lprHLTO7NFfx2NFCD9JehMxT5UTFtAmtgnd8Pg+J7nQwY8ptBi50quAloB4GmNPm8FsCwkVUXOYBArsJ9w0Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669652224; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=juBRB9fqd9UaXJKhW2tyi3K8GG0HwSm6D9cZUnv+ONM=; b=kGf4VT1B4EWLUc1ya6X3ICzNQK4C3OvYxsQrUE1iP4uErdyP6XJTFd2sDV3ODf2FwXhHf0WM1Y4AI7ylyh2pdNGosZlofjtrr9nJVdor8fBzvXZk2mYYW6X25403i93NWH8fhf3qXKyUVYVvCqeP4s5jJ0YG6sKYM8eMswVAAwA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1669652224128499.01835930377626; Mon, 28 Nov 2022 08:17:04 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-339-io4qsgTNMhCHpk4rReG9sw-1; Mon, 28 Nov 2022 11:16:57 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EE18286EB20; Mon, 28 Nov 2022 16:16:52 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D7D417582; Mon, 28 Nov 2022 16:16:50 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 673A01946594; Mon, 28 Nov 2022 16:16:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E8C2B194658C for ; Mon, 28 Nov 2022 16:16:48 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C3AC140C2140; Mon, 28 Nov 2022 16:16:48 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-20.brq.redhat.com [10.40.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1357540C2087 for ; Mon, 28 Nov 2022 16:16:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669652222; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=juBRB9fqd9UaXJKhW2tyi3K8GG0HwSm6D9cZUnv+ONM=; b=D0erdcjT0I0uY2Y71PXzDl8C0g4HKu+xRnkhdHCTvoWO/Ap5sSmN83+yCRRv+UB3icamK3 UIkgF7XkaVaBO4OELX+16MxpHB1G/2tJXogUDg70S1UV92i+JqKmiA67NOASqQIEiExuUV 6YaYKEt08fLppKf1wPrK5vKitbr2xYI= X-MC-Unique: io4qsgTNMhCHpk4rReG9sw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] Document caveats of hypervisor-specific stats in 'VIR_DOMAIN_STATS_VCPU' group Date: Mon, 28 Nov 2022 17:16:46 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1669652225383100001 Content-Type: text/plain; charset="utf-8" In commit c43718ef67944 I've added a disclaimer that the new stats which are fetched from qemu and passed directly to the user are not guaranteed by libvirt. I didn't notice that per-vcpu hypervisor specific stats are also snuck into the VIR_DOMAIN_STATS_VCPU group along with other pre-existing stats we do guarantee. Extend the disclaimer for VIR_DOMAIN_STATS_VCPU too. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- docs/manpages/virsh.rst | 22 ++++++++++++++++++++++ src/libvirt-domain.c | 17 +++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 5f5f48f83e..1e8a43bc55 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -2399,6 +2399,28 @@ When selecting the *--state* group the following fie= lds are returned: host scheduler, but was waiting in the queue instead of running. Exposed to the VM as a steal time. +This group of statistics also reports additional hypervisor-originating pe= r-vCPU +stats. The hypervisor-specific statistics in this group have the following +naming scheme: + + ``vcpu..$NAME.$TYPE`` + + ``$NAME`` + name of the statistics field provided by the hypervisor + + ``$TYPE`` + Type of the value. The following types are returned: + + ``cur`` + current instant value + ``sum`` + aggregate value + ``max`` + peak value + + The returned value may be either an unsigned long long or a boolean. Mean= ing + is hypervisor specific. Please see the disclaimer for the *--vm* group wh= ich + also consists of hypervisor-specific stats. *--interface* returns: diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 56c2abf3fa..78c26b2219 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -12270,6 +12270,23 @@ virConnectGetDomainCapabilities(virConnectPtr conn, * instead of running. Exposed to the VM as a ste= al * time. * + * This group of statistics also reports additional hypervisor-originat= ing + * per-vCPU stats. The hypervisor-specific statistics in this group hav= e the + * following naming scheme: + * + * "vcpu..$NAME.$TYPE" + * + * $NAME - name of the statistics field provided by the hypervisor + * + * $TYPE - Type of the value. The following types are returned: + * 'cur' - current instant value + * 'sum' - aggregate value + * 'max' - peak value + * + * The returned value may be either an unsigned long long or a boolea= n. + * Meaning is hypervisor specific. Please see the disclaimer for the + * VIR_DOMAIN_STATS_VM group below. + * * VIR_DOMAIN_STATS_INTERFACE: * Return network interface statistics (from domain point of view). * The typed parameter keys are in this format: --=20 2.38.1