]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Add 'iothreadsinfo' command
authorJohn Ferlan <jferlan@redhat.com>
Wed, 11 Feb 2015 20:29:22 +0000 (15:29 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 6 Mar 2015 11:49:32 +0000 (06:49 -0500)
commitf41a5b844fa1840f201de4e2960c1caead3b01ec
tree3ae6d649c5bcdbbc2f53fc73d17e5c999fba1115
parent82649eb7f19bd8aa44556943136ee687b95d13dd
virsh: Add 'iothreadsinfo' command

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: John Ferlan <jferlan@redhat.com>
tools/virsh-domain.c
tools/virsh.pod