installupd command

Use the installupd command to install one or more updates on one or more systems.

Synopsis

smcli [-c] [-prompt] [-user user_name] [-pw password] installupd options

smcli installupd [-h | -? | --help]

smcli installupd [-v] [-s function] [-F] [-W seconds] [-t system_type] {-f file_name | -w query | -i ip_address_list | -N group_list | -n system_list} {-P query | -U update_group_list | [-u] update_list}

Description

By default, this command:
  1. Downloads the specified and requisite installable files if they do not exist in the update library.
  2. Distributes the installable files to the systems.
  3. Installs requisite updates and restarts the systems, operating system, or software if necessary.
  4. Installs the specified update and restarts the systems, operating system, or software if necessary.
  5. Performs an inventory discovery on the systems after installation completes. Inventory discovery obtains the latest software levels on the systems.

You can use the --skip option to skip one or more of these steps.

Important: The systems, operating system, or software might be restarted, even if you specify the --skip restart option, if the native installation mechanism performs the restart independent of the IBM® Flex System Manager's control.

Operands

This command uses a list of update IDs and fix IDs as an operand. The list can optionally be preceded by the -u | --update option.

Options

-f | --file {file_name | -}
Retrieves data either from the input file file_name or from input piped from another command.

To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks.

The input data is the list of system names and IDs, separated by commas or line breaks.
-F | --force
Attempts to install the updates regardless of whether they apply to the target systems.

Only the specified updates are forced. Requisite updates that are not explicitly specified will be installed only if they apply to the target systems.

Attention: Use this option with care. Installing updates that do not apply to the target system can cause the system to become unstable.
-h | -?
Displays the syntax and a brief description of the command.
Tip: If you specify additional options other than -h | -? | --help, the options are ignored.
--help
Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples.
Tips:
  • If you specify additional options other than -h | -? | --help, the options are ignored.
  • You can also display detailed help in the form of man pages using the man command_name command.
-i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...]
Targets one or more systems, specified by IP address or host name.

The list can be a mixture of IP addresses and host names, separated by a comma.

ip_address
The IP address of the system.
Tips:
  • You can enter lssys -A IP_address to list the IP address of each discovered system.
  • You can use either the IPv4 or IPv6 format to specify the IP address.
host_name
Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).
Tips:
  • You can enter lssys -A HostName to list the host name of each discovered system.
  • The host names are not locale specific.
  • A given IP address or host name might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely.
-n | --names {system_oid | system_name}[,{system_oid | system_name}...]
Targets one or more systems specified by name or ID.

The list can be a mixture of system names and IDs, separated by a comma and containing no blank spaces.

If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created.

system_oid
The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123).
Tip: Use the lssys -o command to list all system IDs.
system_name
The name of the system. If the system name contains a comma, prefix the comma with a backslash (\).
Tips:
  • The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection.
  • Use the lssys command without any options to list all system names.
  • The system names are not locale specific.
-N | --groups {group_oid | group_name}[,{group_oid | group_name}...]
Targets all systems in one or more specified groups that are identified by name or ID.

The list can be a mixture of group names and IDs, separated by a comma.

Tips:
  • If the same systems are members of more than one group, they are targeted only once.

  • To target all systems, specify the "All Systems" group.
group_oid
The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7).
Tip: Use the lsgp -o command to list all group IDs.
group_name
The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.
Tips:
  • Group names are unique.
  • Use the lsgp command without any options to list all group names.
  • The group names are not locale specific.
-P | --patchfilter "query"
Targets one or more updates (patches) based on update attributes specified by query.
The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key='value' [{AND | OR} attribute_key='value'...]"

Where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type string, a string must be specified.

Tips:
  • Use the logical operators =, !=, >, <, >=, or >= between the key and value
  • Use logical operators AND or OR to combine attributes.
  • Use parenthesis to create nested logical constructs.
  • Only update attributes can be specified. Use the lsupd -l command to list the available update attributes.
  • Always enclose query in double quotation marks (for example, "Severity=0"). Do not use quotation marks within the query.
  • Enclose the value in single quotation marks if it contain special characters, including space, =, <, >, !, ), and (.
  • Only update attributes can be specified. Use the lsupd -l command to list the available update attributes.
-s | --skip {function}[,{function}...]
Skips one or more default steps during installation. You can specify one or more of these values, separated by a comma:
  • distribution - Does not download or distribute the specified or requisite installable files. If you specify this function, the installable files must already exist on the targeted systems.
  • discovery - Does not perform an inventory discovery after the installation completes. Inventory discovery should be run on the targeted system when all updates are complete to obtain the latest software levels on the systems.
  • requisites - Does not install requisite updates.
  • restart - Does not restart the systems, operating system, or software during the installation.
-t | --type system_type

Narrows the specified targeted systems to all systems of the specified type.

The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted.

Tips:
  • This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress.
  • You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options.
  • Use the lssys -T command to obtain a list of valid system types.
  • The system types are not locale specific.
-u | --updates {update_oid | update_fix_id}[,{update_oid | update_fix_id}...]
Targets one or more valid updates, specified by ID or fix ID (also called update ID).

The list can be a mixture of IDs and fix IDs, separated by a comma. The list is delimited by the end-of-line character when read from a file.

update_oid
Specifies the unique ID of an update, specified as a hexadecimal value prefixed with 0x (for example, 0x37).
Tip: Use the lsupd -o command to list all update IDs.
update_fix_id
Specifies the unique fix ID of an update (for example, SF99001G-47).
Tip: Use lsupd -A DisplayName,UpdateId to list the current fix IDs.
-U | --updategroups {update_group_oid | update_group_name}[,{update_group_oid | update_group_name}...]
Targets updates in one or more update groups, specified by name or ID.

The list can be a mixture of names and ID, separated by a comma. The list is delimited by the end-of-line character when read from a file.

update_group_oid
Specifies the unique hexadecimal ID of an update group.
Tip: Use the lsgp -o -m Update command to list all group IDs.
update_group_name
Specifies the name of an update group. Enclose the user name in quotation marks if it contains a space character.
Tips:
  • The update-group names not locale specific.
  • Use the lsgp command without any options to list all group names.
-v | --verbose
Writes verbose messages to standard output.

If this option is not specified, this command suppresses noncritical messages.

-w | --where "query"
Targets one or more systems based on system attributes specified by query.
The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified.

Tips:
  • Use logical operators AND or OR to combine attributes.
  • Use parentheses to create nested logical constructs.
  • The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query.
  • If the value contains spaces, enclose it in single quotation marks.
  • Only system attributes can be specified. Use the lssys -l command to list the available system attributes.
-W | --wait seconds

Displays the results of the command after waiting the specified number of seconds, regardless of whether or not the task has been completed.

Possible values for seconds are:
  • -1: Waits indefinitely for the task to finish before exiting and displaying the results. This value is the default if this option is not specified.
  • 0: Exits immediately, and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status.
  • 1 or greater: Exits after the specified number of seconds. If the task is completed before the specified wait period, this command displays the results. If the task is not completed before the specified wait period, the command exits and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status.

Exit status

The following codes are returned by this command
  • 0: The operation completed.
  • 1: A usage error occurred.
  • 2: The command or bundle was not found.
  • 3: The command was not performed because either authentication failed or you are not authorized to perform the action.
  • 10: The file was not found.
  • 20: A specified system is not valid.
  • 21: A specified system group is not valid.
  • 22: The specified update group is not valid.
  • 26: A specified system type is not valid.
  • 29: The specified locale is not valid or not supported.
  • 50: The specified update is not valid.
  • 59: The installable files have not been downloaded.
  • 60: An error occurred during installation.
  • 63: A required restart could not be completed.
  • 65: Discovery could not be initiated.
  • 126: The task did not complete before the specified wait time. The command is still running in the background.

Examples

  1. Install an update
    This example illustrates how to download, distribute, and install the update fix ID of com.ibm.foo_1.0.0 and any requisite updates on the system named system1, and then restart and perform an inventory discovery on the system.
    smcli installupd -n system1 -u com.ibm.foo_1.0.0
  2. Install an update, but skip distribution
    This example illustrates how to install the update with ID 0x83 and any requisite updates on the system with ID 0x92, and then restart and perform an inventory discovery on the system. The installable files are not downloaded or distributed.
    smcli installupd -s distribution -n 0x92 0x83
  3. Install an update and skip distribution, requisite updates, and restart
    This example illustrates how to install only the update with ID 0x83 on systems of type OperatingSystem with IP address 9.10.111.100, and then perform an inventory discovery on the system. The installable files are not downloaded or distributed, requisite updates are not installed, and the system is not restarted.
    smcli installupd -s distribution,requisites,restarts -i 9.10.111.100
    -t OperatingSystem -u 0x83