RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2157094 - Backport the qemuDomainGetStatsCpu fallback Implementation [rhel-9.1.0.z]
Summary: Backport the qemuDomainGetStatsCpu fallback Implementation [rhel-9.1.0.z]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Luyao Huang
URL:
Whiteboard:
Depends On: 2148266
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-30 16:26 UTC by RHEL Program Management Team
Modified: 2023-05-14 10:28 UTC (History)
15 users (show)

Fixed In Version: libvirt-8.5.0-7.3.el9_1
Doc Type: Enhancement
Doc Text:
Feature: When fetching statistics for a running QEMU guest, libvirt looks into CGroups and fetches some statistics from there (e.g. on CPU usage). However, this is not possible for session mode because there libvirt does not have permissions to even place QEMU into CGroups. Therefore, a workaround needs to be implemented where stats are fetched from a different source (procfs). Reason: Result:
Clone Of: 2148266
Environment:
Last Closed: 2023-01-23 15:18:08 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker LIBVIRTAT-14023 0 None None None 2023-05-14 10:27:36 UTC
Red Hat Issue Tracker RHELPLAN-143409 0 None None None 2022-12-30 16:29:26 UTC
Red Hat Product Errata RHBA-2023:0311 0 None None None 2023-01-23 15:18:17 UTC

Comment 5 Luyao Huang 2023-01-06 06:57:12 UTC
Verify this bug with libvirt-8.5.0-7.3.el9_1.x86_64:

1. switch to a unprivileged user:

# su - test

2. start a guest
$ virsh start vm1
Domain 'vm1' started

3. use domstats get vm cpu.time, cpu.user and cpu.system and compare the value in /proc/pid/stat:

$ virsh domstats vm1; cat /proc/`pidof qemu-kvm`/stat
Domain: 'vm1'
  state.state=1
  state.reason=1
  cpu.time=550000000
  cpu.user=230000000
  cpu.system=320000000
  cpu.cache.monitor.count=0
  balloon.current=2097152
  balloon.maximum=2097152
  balloon.last-update=0
  balloon.rss=89508
  vcpu.current=2
  vcpu.maximum=2
  vcpu.0.state=1
  vcpu.0.time=240000000
  vcpu.0.wait=0
  vcpu.0.delay=512171
  vcpu.1.state=1
  vcpu.1.time=0
  vcpu.1.wait=0
  vcpu.1.delay=5245
  net.count=0
  block.count=0
  dirtyrate.calc_status=0
  dirtyrate.calc_start_time=0
  dirtyrate.calc_period=0
  dirtyrate.calc_mode=page-sampling

53941 (qemu-kvm) S 1 53940 53940 0 -1 138428544 10554 0 0 0 **32 23** 0 0 20 0 6 0 8063226 2664464384 22377 18446744073709551615 94791831449600 94791837966397 140737053288768 0 0 0 268444224 4096 16963 0 0 0 17 39 0 0 0 9 0 94791842521976 94791844707810 94791856136192 140737053291518 140737053294351 140737053294351 140737053294562 0

Comment 9 errata-xmlrpc 2023-01-23 15:18:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (libvirt bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:0311


Note You need to log in before you can comment on or make changes to this bug.