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 985980 - virsh vcpuinfo output is difficult to read with large cpu counts
Summary: virsh vcpuinfo output is difficult to read with large cpu counts
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-18 16:30 UTC by Dave Allan
Modified: 2016-04-26 14:51 UTC (History)
7 users (show)

Fixed In Version: libvirt-1.2.7-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 07:20:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

Description Dave Allan 2013-07-18 16:30:17 UTC
Description of problem:
When large numbers of CPUs are present, virsh vcpuinfo's linear representation of affinity is not very useful.  (See example output below)  I'd like to see an option for a representation based on ranges.  I'm not a UI guy, but I'd prefer something along the lines of:

virsh vcpuinfo --affinityranges someguest
VCPU:           0
CPU:            0
State:          running
CPU time:       5.6s
CPU Affinity:   y: 0-3
                -: 4-127

Current output:

virsh vcpuinfo someguest
VCPU:           0
CPU:            0
State:          running
CPU time:       5.6s
CPU Affinity: yyyy----------------------------------------------------------------------------------------------------------------------------

Comment 1 Eric Blake 2013-07-18 19:06:57 UTC
For back-compat reason, we'd have to provide the new compressed output only when the user adds a flag, but the idea has merit.

Comment 2 Ján Tomko 2014-06-05 11:26:35 UTC
Upstream patch:
https://www.redhat.com/archives/libvir-list/2014-June/msg00259.html

Comment 3 Ján Tomko 2014-06-06 12:42:38 UTC
Now pushed upstream:
commit a3173fef9dde49d7577e283109281e43d399b3a2
Author:     Ján Tomko <jtomko>
CommitDate: 2014-06-06 14:35:19 +0200

    Implement pretty flag for vcpuinfo and nodecpumap
    
    Report CPU affinities / online CPUs in human-readable form when
    this flag is present:
    
    Before:
    CPU Affinity:   y-yy
    
    After:
    CPU Affinity:   0,2-3 (out of 4)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=985980

git describe: v1.2.5-68-ga3173fe

Comment 6 hongming 2014-11-28 07:03:45 UTC
verify it as follows. The result is expected. Move its status to VERIFIED.

[root@localhost ~]# virsh vcpupin r7 1 0,2-3

[root@localhost ~]# virsh vcpuinfo r7
VCPU:           0
CPU:            0
State:          running
CPU time:       8.1s
CPU Affinity:   yyyy

VCPU:           1
CPU:            0
State:          running
CPU time:       1.6s
CPU Affinity:   y-yy

VCPU:           2
CPU:            1
State:          running
CPU time:       1.7s
CPU Affinity:   yyyy

VCPU:           3
CPU:            2
State:          running
CPU time:       2.1s
CPU Affinity:   yyyy

[root@localhost ~]# virsh vcpuinfo r7 --pretty
VCPU:           0
CPU:            3
State:          running
CPU time:       8.1s
CPU Affinity:   0-3 (out of 4)

VCPU:           1
CPU:            0
State:          running
CPU time:       1.7s
CPU Affinity:   0,2-3 (out of 4)

VCPU:           2
CPU:            0
State:          running
CPU time:       1.7s
CPU Affinity:   0-3 (out of 4)

VCPU:           3
CPU:            1
State:          running
CPU time:       2.1s
CPU Affinity:   0-3 (out of 4)

Comment 8 errata-xmlrpc 2015-03-05 07:20:56 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, 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://rhn.redhat.com/errata/RHSA-2015-0323.html


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