• J
    virsh: Add 'iothreadsinfo' command · f41a5b84
    John Ferlan 提交于
    Add the 'iothreadsinfo' command to display IOThread Info data. Allow for
    [--live] or [--config] options in order to display live or config data
    for an active domain.
    
    $ virsh iothreadsinfo --help
      NAME
        iothreadsinfo - view domain IOThreads
    
      SYNOPSIS
        iothreadsinfo <domain> [--config] [--live] [--current]
    
      DESCRIPTION
        Returns basic information about the domain IOThreads.
    
      OPTIONS
        [--domain] <string>  domain name, id or uuid
        --config         affect next boot
        --live           affect running domain
        --current        affect current domain
    
    An active domain may return:
    
    $ virsh iothreads $dom
     IOThread ID     CPU Affinity
    ---------------------------------------------------
      1               2
      2               3
      3               0
    
    $ echo $?
    0
    
    For domains which don't have IOThreads the following is returned:
    
    $ virsh iothreads $dom
    No IOThreads found for the domain
    
    $ echo $?
    0
    
    For domains which are not running the following is returned:
    
    $ virsh iothreads $dom --live
    error: Unable to get domain IOThreads information
    error: Requested operation is not valid: domain is not running
    
    $ echo $?
    1
    
    Editing a domains configuration and modifying the iothreadpin data for
    thread 3 from nothing provided to setting a cpuset of '0-1' and then
    displaying using --config would display:
    
    $ virsh iothreads f18iothr --config
     IOThread ID     CPU Affinity
     ----------------------------
      1               2
      2               3
      3               0-1
    
    $
    Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
    f41a5b84
virsh.pod 175.2 KB