compare command

Use the compare command to compare the list of installed firmware and device drivers, generated by the query command, to the available update list, generated by the scan command, and recommend a set of updates to apply. The XML file that the compare command generates can then be used by the flash command.

Users can specify XML files generated by previously run scan and query commands using the --scanxml and --queryxml parameters. The compare command also checks the prerequisite requirements for all update packages and list updates in their required order for the flash command.

compare command syntax

Onecli.exe update compare {[--scanxml <filename>] [--noscan] [--backup] [ --imm <userid:password@IP[:port]>]
[--cmm <userid:password@IP[:port]>] [--esxi <userid:password@IP[:port]>] [--iobay <bay_number> ] [--disable-imm-lan]
[--mt <machine type>][--ostype <operating_system> --osarch <architecture>]} {[--queryxml <filename>]
[--scope <scope>] [--type <type>] [--includeid <includeids>] [--forceid <forceids>] [--excludeid <excludeids>] [--dir <folder>]} [--output <folder>]
Table 1. compare command parameters
Parameter Required/Optional Notes
--scanxml Optional

filename specifies a scan result file to control the compare command. If a scan result file is specified, the follow command parameters can not be used:

  • --noscan

  • --imm

  • --cmm

  • --iobay

  • --mt

  • --disable-imm-lan

  • --ostype

  • --osarch

--noscan Optional

If the --noscan parameter is specified, the compare command obtains query results directly for comparison without using the scan results.

If the --noscan parameter is specified, the follow command parameters are not required:

  • --scanxml

  • --imm

  • --cmm

For IMM targets, the --osarch parameter must also be specified.

If the --queryxml parameter is not specified when using the --noscan parameter, you must specify the --mt, --ostype, and --osarch parameters.

--backup Optional

If the --backup parameter is specified, the command compares backup IMM and UEFI firmware, instead of the default comparison of primary IMM and UEFI firmware.

The --backup parameter is not used for CMM and I/O module targets.

--imm Optional

userid:password@IP[:port] specifies access information for the target IMM.

If the --imm parameter is specified, the ToolsCenter Suite CLI runs in Out-of-Band (OOB) mode; otherwise, the ToolsCenter Suite CLI runs in In-Band (IB) mode.

If the --imm parameter is not required when using the --scanxml or --noscan parameters.

Note: Both IPv4 and IPv6 addresses are supported. Enclose IPv6 addresses in brackets. For example, [FE80::3BA7:94FF:FE07:CBD0]. If the IPv6 is LLA (Link Local IPV6), the format is [FE80::3BA7:94FF:FE07:CBD0%xxx]. Replace xxx with the name of the interface through which either the service processor or the sftp server (for the --sftp argument) can be reached on the local network of the OS on which the ToolsCenter Suite CLI runs.
--cmm Optional

userid:password@IP[:port] specifies access information for the target CMM.

The --cmm parameter specifies a CMM or I/O module for compare command scanning. It is required when scanning either of these targets. When scanning an I/O module target, the --iobay parameter must also be specified.

If the --cmm parameter is not required when using the --scanxml or --noscan parameters.

Note: Both IPv4 and IPv6 addresses are supported. Enclose IPv6 addresses in brackets. For example, [FE80::3BA7:94FF:FE07:CBD0]. If the IPv6 is LLA (Link Local IPV6), the format is [FE80::3BA7:94FF:FE07:CBD0%xxx]. Replace xxx with the name of the interface through which either the service processor or the sftp server (for the --sftp argument) can be reached on the local network of the OS on which the ToolsCenter Suite CLI runs.
--esxi Optional

userid:password@IP[:port] specifies access information for the target VMware ESXi Lenovo image.

The --esxi parameter specifies a VMware ESXi Lenovo image scan operation. It is required when scanning an ESXi target.

Note: Both IPv4 and IPv6 addresses are supported. Enclose IPv6 addresses in brackets. For example, [FE80::3BA7:94FF:FE07:CBD0]. If the IPv6 is LLA (Link Local IPV6), the format is [FE80::3BA7:94FF:FE07:CBD0%xxx]. Replace xxx with the name of the interface through which either the service processor or the sftp server (for the --sftp argument) can be reached on the local network of the OS on which the ToolsCenter Suite CLI runs.
--iobay Optional

bay_number specifies the I/O module bay number. Valid values are 1, 2, 3, or 4.

The --iobay parameter specifies an I/O module compare operation. When comparing an I/O module target, the --cmm parameter must also be specified.

--disable-imm-lan Optional The --disable-imm-lan parameter is used when scanning an IMM in IB mode. If this parameter is specified, the ToolsCenter Suite CLI disables the IMM Lan-over-USB channel after the command completes.
--mt Optional

machine_type specifies the four-digit machine type of target device (IMM or CMM).

The --mt parameter is required only when using the --noscan parameter (the system is not automatically obtaining the machine-type information).

For the I/O module target, the CMM machine type is specified.

--ostype Optional

operating_system specifies operating system where you are running the ToolsCenter Suite CLI. Valid choices are win2008, win2012, win2012r2, win2016, rhel5, rhel6, rhel7, sles10, sles11, sles12, esxi5.0, esxi5.1, esxi5.5, esxi6.0, and none.

The --ostype parameter is required only when using the --noscan parameter (the system is not automatically obtaining the operating system information).

None is the default setting and is used for operating system independent operations, such as xFW OOB updates.

The --ostype parameter is not required for CMM or I/O module targets.

--osarch Optional

architecture specifies operating system architecture where you are running the ToolsCenter Suite CLI. Valid choices are x86, x64, and none.

None is the default setting and is used for operating system independent operations, such as xFW OOB updates.

The --osarch parameter is needed only when the user is unable to determine their operating system information. It is used with the --noscan parameter.

The --osarch parameter is not used for CMM or I/O module targets.

--queryxml Optional

filename specifies a query result file to control the compare command. If a query result file is specified, the follow command parameters can not be used:

  • --mt

  • --includeid

  • --forceid

  • --excludeid

  • --dir

  • --ostype

  • --osarch

  • --scope

  • --type

--type Optional

type specifies the type of package to compare. Valid choices are:

  • fw|dd (default) to compare firmware and device drivers

  • fw to compare firmware

  • dd to compare device drivers

Packages are not compared for the CMM and I/O module targets.

--scope Optional

scope specifies the update scope. Valid choices are:

  • uxsp (default) to compare packages with UXSP.

  • latest to compare the latest package updates.

  • individual to compare packages specified by the --includeid or --forceid parameter. Packages specified by the --excludeid parameter are not compared.

The --scope parameter is not used when comparing the CMM or I/O module targets.

--includeid Optional

The ids can be a comma-separated list that specifies the package IDs which are usually the package file name without file extension for queries and comparison.

For example: lnvgy_dd_sraidmr_7.700.20.00_sles12_x86-64

By default: none is included.

For the IMM target, if the --includeid parameter is not specified, only the packages specified by the --scope parameter are queried and compared.

For the IMM target, if the --includeid parameter is specified, only the listed packages are queried and compared in addition to those specified by the --scope parameter: if no packages are listed, no additional packages are queried and compared.

For the CMM and I/O module targets the --scope parameter is not used, so only those packages specified by the --includeid parameter are queried and compared.

--excludeid Optional

excludeids is a comma-separated list that specifies the package IDs for the target device to exclude from compare queries.

If the --excludeid parameter is not specified, all the packages specified by the --scope parameter are queried and compared.

If the --excludeid parameter is specified, the listed packages are excluded from the list of compare queries specified by the --scope parameter, unless they are prerequisites for other packages: if no packages are listed, all the packages specified by the --scope parameter are queried and compared.

For the CMM and I/O module targets the --scope parameter is not used, so only those packages specified by the --includeid parameter are queried and compared.

--forceid Optional

The ids can be a comma-separated list that specifies the package IDs which are usually the package file name without file extension for queries and comparison. You can also specify an argument of all to force query and comparison of all listed packages.

For example: lnvgy_dd_sraidmr_7.700.20.00_sles12_x86-64

By default: none is included.

Use the --forceid parameter to force firmware or device driver queries and comparison that support package downgrades and in-box to out-of-box device driver updates. It works in the following cases:
  • Query and compare for downgrade packages.

  • Ignores the “never” tag in the package XML file. For example, when querying and comparing HBA updates for QLogic devices.

  • Forces out-of-box device driver updates to override in-box device drivers.

  • Ignores missing prerequisites, listing packages to install in all cases.

--dir Optional

folder specifies the path name location of the firmware package compare query directory.

If no directory is specified, the current directory is used for compare command queries.

--output Optional

folder specifies the path name location and file name for the log file.

By default, the log file output is saved to the ../Onecli-%PID%-%date%-%time%/ directory with a file name of ToolsCenter Suite CLI-update-compare.xml. Existing files are overwritten. Make sure that unique file names are specified, if multiple CLI commands are being run at the same time.

Example of the compare command

In this example, we are creating an update list (update compare command) of the latest updates (--scope latest argument) for an IMM that is accessed with a user ID of “USERID”, a password of “PASSW0RD”, and an IP address of “10.240.252.102” (--imm USERID:PASSW0RD@10.240.252.102 argument), storing it in the “.\packages\” directory (--dir .\packages\ argument) and storing the log file in the “.\787502cn03e\output\” directory (--output .\787502cn03e\output\ argument). In this example, the compare command performs its own scan and query functions, since no XML files are specified for the --scanxml and --queryxml parameters.
Onecli.exe update compare --scope latest --imm USERID:PASSW0RD@10.240.252.102 --dir .\packages\
--output .\787502cn03e\output\

Lenovo ToolsCenterSuite CLI tcliXXX-X.X.X
Based on module version X.X.X
Licensed Materials - Property of Lenovo
(C) Copyright Lenovo Corp. 2013-2016 All Rights Reserved
Invoking SHOW command ...
Connected to IMM by IP address 10.240.252.102
Start to scan the xFW.
Finish scan function, store the result in file .\787502cn03e\output\Onecli-update-scan.xml
Start to query the packages in the folder .\packages\
Finish query function, store the result in .\787502cn03e\output\Onecli-update-query.xml
Start to compare the query results with installed version
Finish the comparison
Save the compare result to .\787502cn03e\output\Onecli-update-compare.xml successfully