powervc-diag command

The powervc-diag command collects diagnostic data from your IBM® Power® Virtualization Center installation. The diagnostic data is collected into a single compressed archive file. It is most commonly used during problem determination activities.

The powervc-diag command is located in the /usr/bin directory. It is not required to specify the path when you run the command.
Syntax
powervc-diag [ -h] [-u USER] [-r PROJECT] [-v] [-o OUTPUT_DIR] [-f ARCHIVE_FNAME] [-cur] [-n] [-w MAXWAIT] [-a ADDFILE] [-m] [-c HMCNAMELIST] [-l HOSTNAMELIST] [-s SERVICES]
Options
Table 1. powervc-diag Command options
Option Description
-h or --help Displays the help message for the powervc-diag command.
-u USER or --user USER Specifies the PowerVC user who must authenticate to capture certain diagnostics. If the username is not specified, it is obtained from the OS_USERNAME environment variable or is assumed to be the current user.
-r PROJECT or --project PROJECT Specifies the PowerVC project that must be used to authenticate to capture certain diagnostics. If the project name is not specified, it is obtained from the OS_PROJECT_NAME environment variable or is assumed to be the ibm-default project.
-v or --verbose Increases verbosity of the PowerVC diagnostics collection
-o OUTPUT_DIR or --output-dir OUTPUT_DIR Specifies the output directory where the collected diagnostic data must be stored. If the directory is not specified and the TMPDIR environment variable is set, the collected diagnostic data is stored in the directory that is specified by the TMPDIR environment variable. If the TMPDIR environment variable is not set, the collected diagnostic data is stored in the /tmp directory
-f ARCHIVE_FNAME or --archive-fname ARCHIVE_FNAME Specifies the archive file where the collected diagnostic data must be stored. The archive file is saved with the .tgz extension automatically. For example, if you run the command powervc-diag -f powervc-archive-file, a powervc-archive-file.tgz compressed archive is created that contains all the collected files and information.
-cur or --current-node-only Collect diagnostics only from the current node. This option is deprecated
-n or --noprompt Indicates that the command must run without any prompts. All the necessary input must be provided by using command line arguments or environment variables.
-w MAXWAIT or --maxwait MAXWAIT Specifies the number of seconds an individual diagnostics command, which is run by the powervc-diag command, must wait to complete. The default value is 120. In high scale environments or the environments where a large amount of diagnostic data needs to be collected, the wait time can be as high as 300.
-a ADDFILE or --addfile ADDFILE Specifies the additional file that must be included along with the other diagnostic data.
-m or --management-node-only Indicates that the log data must be collected only from the management node. If this option is used, powervc-diag command skips the HMC and NovaLink nodes
-c HMCNAMELIST or --hmcinfo HMCNAMELIST Collects the HMC information. You can specify one or multiple HMCs, separated by commas, by using the IP address, hostname, or display name of the HMC. If you specify all, data is collected from all the registered HMCs. This option also prompts for the password of the HMC service ID.
-l HOSTNAMELIST or --novalinkinfo HOSTNAMELIST Collects the NovaLink host information. You can specify one or multiple NovaLink hosts, separated by commas, by using the IP address, hostname, or display name of the NovaLink host. If you specify all, data is collected from all the registered NovaLink hosts. The powervc-diag command collects log data for all the registered NovaLink host by default.
-s SERVICES or --services SERVICES Specifies a comma-separated list of services from which powervc-diag command must collect data. The valid services are nova, cinder, glance, neutron, keystone, bumblebee, ceilometer, panko, placement, gnocchi, ttv-validation, swift, powervc-ui-server, pacemaker, blazar, and squall.
Important: The SSH service must be enabled on the HMC before you run this command.

When you run the command, all buffered log information is written to log files on disk. For a list of command options, run powervc-diag --help.

If authentication fails, the following files are not collected:
From the nova information folder
  • flavorlist.info
  • hypervisorstats.info
  • extensions.info
From the glance information folder
  • imagedetails.info

Examples

  • When you run powervc-diag without any other arguments, by default, logs from management node, all HMCs, all NovaLink, and all network nodes are collected.
    /usr/bin/powervc-diag

    When you use this command, consider increasing the wait time by using the -w option as HMC and NovaLink log collection takes more time.

  • To collect only management node logs, enter the following command:
     /usr/bin/powervc-diag --management-node-only
    or
    /usr/bin/powervc-diag --m
  • To collect specific logs for HMC and NovaLink node along with management node logs, enter the following command:
    /usr/bin/powervc-diag --hmcinfo [HMC IP] --novalinkinfo [NovaLink IP]
  • Option --management-node-only cannot be used with options --hmcinfo or --novalinkinfo as they contradict each other.
    powervc-diag -m -l -c
Notes:
  • NovaLink logs are collected by default unless -l or --novalinkinfo is used to collect individual NovaLink logs.
  • For larger logs, if powervc-diag fails with timeout error, specify the -w or --maxwait value more than 300 (up to 1800) and retry.
  • Starting with PowerVC 2.3.1, the powervc-diag command generates a report of all the commands it runs and all the files it collects.