From nobody Mon Feb 9 16:50:43 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=fail(p=none dis=none) header.from=git.sr.ht ARC-Seal: i=1; a=rsa-sha256; t=1691423798; cv=none; d=zohomail.com; s=zohoarc; b=OnGsiWj5aP/Igd6VaAAMge7TyWnGZaAhWv8z8LrypCU/tMAs1EujXIBoGNlzvQOe7BngzmXMcTl6L4Giwe7JPECzDgSk/MGyy5IVSmYVDLeBRZNCdFJJ9NZQlvrcv1bFhAa+E8DYI+2DB2aY23ggC40DF4Hmxi4a2fKYf68qumE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691423798; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=FpSj/8g0rkLfnJN933uGbDAMz1d7xFMxSM0PAhzcORM=; b=i07udN69Gh08Vl1Xdzx0VPo44kC1DaMRBcsZSfXSOHapwXFbBQS202bV4OnON+dDo0UgNyuU08TXfU19MnQHTupMEzwxSfS71WLK1WUBRDEWF/kRqBiVe5NTkCeYUV+qnf+8om78fKLT2BCDCuomyd6IPJX9okgWeKBCNwekt6w= 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=fail 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 1691423798898738.4472835835323; Mon, 7 Aug 2023 08:56:38 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-665-Hf6eJS-FPLOT--iGcf4yxg-1; Mon, 07 Aug 2023 11:56:34 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 239B31C05145; Mon, 7 Aug 2023 15:56:32 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0BF492026D68; Mon, 7 Aug 2023 15:56:32 +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 DB6FA1947208; Mon, 7 Aug 2023 15:56:17 +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 9AF3A1946587 for ; Mon, 7 Aug 2023 15:56:14 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8AA9D40C2077; Mon, 7 Aug 2023 15:56:14 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 83F4F40C2076 for ; Mon, 7 Aug 2023 15:56:14 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6ABFC185A7A3 for ; Mon, 7 Aug 2023 15:56:14 +0000 (UTC) Received: from mail-b.sr.ht (mail-b.sr.ht [173.195.146.151]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-358-zyzbZuxLMvCqDcT7zNxbLQ-1; Mon, 07 Aug 2023 11:56:11 -0400 Received: from git.sr.ht (unknown [173.195.146.142]) by mail-b.sr.ht (Postfix) with ESMTPSA id 40F4411F00F; Mon, 7 Aug 2023 15:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691423797; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=FpSj/8g0rkLfnJN933uGbDAMz1d7xFMxSM0PAhzcORM=; b=UPj1n7BOZuD+dJMCJR8A/hCVJQcEFiYOtM0okPL0bs9BYNuMFwOiWM1Gg4KV95Zce+n78N uejQo9I4ROOUlRkZlnCLqtmWEaCcLKoia3Xo2ZMGMO+qeRoXSnaflPduc1uEPD7/lh37i7 OcDf/16V+69Kn9Y/tEV7WUy8TtMgkbg= X-MC-Unique: Hf6eJS-FPLOT--iGcf4yxg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: zyzbZuxLMvCqDcT7zNxbLQ-1 From: ~hyman Date: Sun, 06 Aug 2023 16:17:14 +0800 Subject: [PATCH Libvirt v2 10/10] virsh: Introduce command 'virsh domstats --dirtylimit' MIME-Version: 1.0 Message-ID: <169142376567.1452.17600824269401067909-10@git.sr.ht> In-Reply-To: <169142376567.1452.17600824269401067909-0@git.sr.ht> To: libvir-list@redhat.com X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false 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: , Reply-To: ~hyman Cc: Peter Krempa , yong.huang@smartx.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: git.sr.ht Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1691423800720100001 From: Hyman Huang(=E9=BB=84=E5=8B=87) Introduce command 'virsh domstats --dirtylimit' for reporting dirty page rate upper limit infomation. The info is listed as follows: Domain: 'vm' dirtylimit.vcpu.0.limit=3D10 dirtylimit.vcpu.0.current=3D16 dirtylimit.vcpu.1.limit=3D10 dirtylimit.vcpu.1.current=3D0 ... Signed-off-by: Hyman Huang(=E9=BB=84=E5=8B=87) --- docs/manpages/virsh.rst | 12 ++++++++++-- tools/virsh-domain-monitor.c | 7 +++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 59eecbcef0..ac619b7697 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -2317,7 +2317,7 @@ domstats domstats [--raw] [--enforce] [--backing] [--nowait] [--state] [--cpu-total] [--balloon] [--vcpu] [--interface] [--block] [--perf] [--iothread] [--memory] [--dirtyrate] [--vm] - [[--list-active] [--list-inactive] + [--dirtylimit] [[--list-active] [--list-inactive] [--list-persistent] [--list-transient] [--list-running]y [--list-paused] [--list-shutoff] [--list-other]] | [domain ...] =20 @@ -2336,7 +2336,7 @@ The individual statistics groups are selectable via s= pecific flags. By default all supported statistics groups are returned. Supported statistics groups flags are: *--state*, *--cpu-total*, *--balloon*, *--vcpu*, *--interface*, *--block*, *--perf*, *--iothread*, *--memory*, -*--dirtyrate*, *--vm*. +*--dirtyrate*, *--vm*, *--dirtylimit*. =20 Note that - depending on the hypervisor type and version or the domain sta= te - not all of the following statistics may be returned. @@ -2579,6 +2579,14 @@ not available for statistical purposes. The *--vm* option enables reporting of hypervisor-specific statistics. Nam= ing and meaning of the fields is entirely hypervisor dependent. =20 + +*--dirtylimit* returns: + +* ``dirtylimit.vcpu..limit`` - the upper limit of dirty page rate for= a + virtual CPU in MiB/s +* ``dirtylimit.vcpu..current`` - the dirty page rate for a virtual CPU + currently in MiB/s + The statistics in this group have the following naming scheme: =20 ``vm.$NAME.$TYPE`` diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 89fdc7a050..efa2609719 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -2063,6 +2063,10 @@ static const vshCmdOptDef opts_domstats[] =3D { .type =3D VSH_OT_BOOL, .help =3D N_("report hypervisor-specific statistics"), }, + {.name =3D "dirtylimit", + .type =3D VSH_OT_BOOL, + .help =3D N_("report domain dirty page rate upper limit infomation"), + }, {.name =3D "list-active", .type =3D VSH_OT_BOOL, .help =3D N_("list only active domains"), @@ -2187,6 +2191,9 @@ cmdDomstats(vshControl *ctl, const vshCmd *cmd) if (vshCommandOptBool(cmd, "vm")) stats |=3D VIR_DOMAIN_STATS_VM; =20 + if (vshCommandOptBool(cmd, "dirtylimit")) + stats |=3D VIR_DOMAIN_STATS_DIRTYLIMIT; + if (vshCommandOptBool(cmd, "list-active")) flags |=3D VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE; =20 --=20 2.38.5