Sun Update Connection - Enterprise 1.0 User's Guide

ProcedureTo Compare Inventories

The Inventory Comparison feature shows the differences of installed components between two hosts. The hosts must be of the same distribution-architecture, both in console and in CLI commands.

Comparing inventories offers the following features:

Before You Begin

Before comparing inventories, you should run the Check System profile on the host or group. This will ensure that the source inventory does not have dependency issues. If you will be managing Solaris hosts, you should run the Check Withdrawn Patches profile. This will replace withdrawn Solaris patches with appropriate operating software. See Chapter 7, System Management Profiles.

In addition, if you will be comparing Solaris machines, you should edit the PKG settings (see Host Preferences – PKGs) to ensure that the deployment operates as expected.

  1. Make sure the Inventory panel is open in the main window. From the View menu, choose Inventory.

  2. Do one of the following:

    • From the tool bar, click the Compare Inventories button.

    • Right-click in the Hosts list and choose Compare Inventories.

    • From the Hosts menu, choose Compare Inventories.

    The Inventory Comparison window opens.

    This screen capture shows the Inventory Compare window.
  3. Click the Host Select button to the right of the Target host field.

    The Host Selection window opens.

  4. Select the host you want to change and then click OK.

    The Host Selection window closes. The selected host name appears in the Target host field.

  5. From the Inventory drop-down list, select a stored inventory or the current inventory.

    If you want to create a job from the comparison, select Current Inventory.

  6. Click the Host Select button to the right of the Source field.

    The Host Selection window opens.

  7. Select the managed host you want to use as the source and then click OK.

    The Host Selection window closes. The selected host name appears in the Source field.

  8. From the Inventory drop-down list, select a saved inventory.

    (If the source host is different from the target host, you can select the current inventory.)

  9. In the Filter section, select the types of components you want to be in the comparison:

    • Software packages

    • Hardware drivers

    • Configuration Files

    • whether you want the comparison to ignore differences in Versions of the same packages

  10. Click Compare.

    The results of the inventory comparison are displayed.

  11. Under the See section of the Inventory Comparison window, select Tasks to Make Target like Source.

    If the results include at least one difference between the selected inventories which can be converted to an action (differences in configuration files cannot be converted), more features are available. See the following procedures.


Example 8–3 Comparing Inventories with the CLI

The compare host inventories CLI command outputs two lists: what is installed in the source inventory and not in the target inventory, and what is in the target inventory and not in the source inventory.

Both hosts must be of the same distribution. Both the source host and the target host may be the same host, but the inventories must be different.

If you do not use the -s or the -ts parameters, the current inventories are used by default. See Compare Hosts and Inventories (-chi) Command.


#! /bin/bash

echo -n “Enter your user name:” 
read user 
echo -n “Enter your password:” 
read password 

echo “What distribution are you working on?” 
uce_cli -ld -u “$user” -p “$password” 
echo -n “Copy the distribution name you want:” 
read distroGroup 
echo “The list of hosts in this distribution is:” 
uce_cli -lgh -g “$distroGroup hosts” -u “$user” -p “$password” 
echo -n “Copy the name of the source host:” 
read sourcehost 
echo -n “Copy the name of the target host:” 
read targethost 

echo “The list of saved inventories is:” 
uce_cli -lss -g “$distroGroup hosts” -u “$user” -p “$password” 
echo -n “Copy the name of the source inventory:” 
read sourceInven 
echo -n “Copy the name of the target inventory:” 
read targetInven 

uce_cli -chi -h “$sourcehost” -s “$sourceInven” -t “$targethost” -ts “$targetInven” \
-u “$user” -p “$password”