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 698521 - virsh freecell command help and man pages should be more clear
Summary: virsh freecell command help and man pages should be more clear
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.1
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: Dave Allan
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 727267 747123 747667 756082
TreeView+ depends on / blocked
 
Reported: 2011-04-21 06:18 UTC by Min Zhan
Modified: 2018-11-27 21:42 UTC (History)
12 users (show)

Fixed In Version: libvirt-0.9.10-7.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 06:27:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 19:31:38 UTC

Description Min Zhan 2011-04-21 06:18:49 UTC
Description of problem:
According to BZ 693963 Comment 14, virsh freecell command help page and man page should be more clear.

Version-Release number of selected component (if applicable):
libvirt-0.8.7-18.el6.x86_64

How reproducible:
Always

Steps to Reproduce:

From BZ 693963 Comment 14,

(In reply to comment #13)
> Test in below environment:
> libvirt-0.8.7-18.el6.x86_64
> 
> # man virsh
> ...
>  freecell optional { --cellno cellno | --all }
>      Prints the available amount of memory on the machine or within a
>      NUMA cell if cellno is provided.  If --all is provided instead of
>      --cellno, then show the information on all NUMA cells.

I'm not sure how to make the man page any clearer, other than maybe:

freecell [{ [--cellno] cellno | --all }]

That is, there are three commands, the last with three spellings:

freecell            => total
freecell --all      => breakdown of all NUMA nodes
freecell --cellno 0 => single NUMA node
freecell 0          => single NUMA node
freecell --cellno=0 => single NUMA node

> 
>   OPTIONS
>     --cellno <number>  NUMA cell number

Hmm, this line in 'virsh help freecell' could be improved to show [--cellno]
rather than --cellno.

> 
> # virsh freecell --cellno
> error: expected syntax: --cellno <number>

Correct behavior.  --cellno requires an argument to go with the option.

> 
> # virsh freecell  foo000
> error: cell number has to be a number

Correct behavior.  Without either --cellno or --all, the first operand is
mapped to the first argument that takes an option, so this is equivalent to
freecell --cellno foo000, and foo000 is not a number.

> 
> According to above test and bug description, I notice ’man virsh‘ make a
> distinction between I<--cellno> and B<cellno>,But I wonder the cellno should be
> B<cellno> in the setentence 'if cellno is provided'. 

Possibly, but at this point, it's just documentation wording, and we're awfully
late.  We've already done what we hope to be the final spin for snap5; can we
instead spawn a new bug targetted for 6.2 that recommends further improvements
for virsh help (properly documenting that --cellno is optional) and man virsh
(tweaking the sentence), now that the real bug for 6.1 (the regression in
'freecell 0') has been fixed?
  
Actual results:
As above

Expected results:

According to BZ 693963,

1. # virsh help freecell 
...
--cellno <number>  NUMA cell number

> this line in 'virsh help freecell' could be improved to show [--cellno]
rather than --cellno.

2. # man virsh
...
1) freecell optional { --cellno cellno | --all }
> this line should make sure --cellno is optional for cellno

2) ’man virsh‘ make a distinction between I<--cellno> and B<cellno>,But I wonder the cellno should be B<cellno> in the setentence 'if cellno is provided'. 

Additional info:

Comment 6 Eric Blake 2012-03-23 03:46:47 UTC
Upstream commit ready to be backported.

commit 350e6c5e66c0cbc14551a25a6ec1d77e3158a9ed
Author: Dave Allan <dallan>
Date:   Thu Mar 22 16:49:07 2012 -0400

    Clarify virsh freecell manpage entry

There's no way to make 'virsh help freecell' show the {} without radically altering virsh.c to enforce mutual exclusion; that is a syntactic notion only possible in the hand-written virsh.pod, so I think there's nothing further to do here.

Comment 10 yanbing du 2012-03-28 05:55:46 UTC
Test with libvirt-0.9.10-8.el6.x86_64, and bug can be VERIFIED.
# man virsh
 freecell [{ [--cellno] cellno | --all }]
           Prints the available amount of memory on the machine or within a
           NUMA cell.  The freecell command can provide one of three different
           displays of available memory on the machine depending on the
           options specified.  With no options, it displays the total free
           memory on the machine.  With the --all option, it displays the free
           memory in each cell and the total free memory on the machine.
           Finally, with a numeric argument or with --cellno plus a cell
           number it will display the free memory for the specified cell only.

# virsh help freecell
  NAME
    freecell - NUMA free memory

  SYNOPSIS
    freecell [--cellno <number>] [--all]

  DESCRIPTION
    display available free memory for the NUMA cell.

  OPTIONS
    --cellno <number>  NUMA cell number
    --all            show free memory for all NUMA cells

Comment 12 errata-xmlrpc 2012-06-20 06:27:15 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.

http://rhn.redhat.com/errata/RHSA-2012-0748.html


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