installneeded command

Use the installneeded command to update IBM® Flex System Manager servers and agents or to install other types of updates.

Synopsis

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

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

smcli installneeded [-v] [-t system_type] [-f file_name | -w query | -i {ip_address | host_name} | -N group_list | -n {system_oid | system_name}] [-F] [-u update_type_list [-l | -c | import_path | -I]

Description

The installneeded command imports or acquires update information and installable files for updates into the update library on the management system. This command also conducts a software inventory of the target systems and installs any needed updates to them.

The default behavior is to install only those updates that are needed by the base product. However, you can use the -u option to override this behavior and specify the update types that you want to install instead.

The installneeded command performs the entire update process, including the following steps:
  1. Collect inventory on the target system
  2. Import or acquire updates
  3. Verify compliance
  4. Install needed updates
  5. Collect inventory and verify compliance again

Operands

This command uses the optional path import_path as an operand. The import_path is a path to a directory that contains updates that are already downloaded and ready to import. The import path must be to a local drive; it cannot be to a shared network drive. You cannot specify this path if the -c, -I, or -l options are also used.

The path must be the full path of the directory that contains one or more update descriptor files. This command searches all subdirectories of the path for update descriptor files and update information.
Tip: If the directory or file name in the path contains spaces, enclose the path in quotation marks.

If the -u option is used, one or more update_type values must be specified. However, if the -u option is not used, the update type defaults to Director.

Options

-c | --check
Specifies that updates must be acquired from the Internet. This option is used by default if no other option is specified.
-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
Forces the installation of needed updates. If this option is not specified, the command displays a list of needed updates and prompts for confirmation to continue before installing them.
-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}
Targets one system, specified by IP address or host name.
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.
Note: Passing multiple systems is not supported with the -i option. However, you can use the -N option to pass a group name to the command.
-I | --install
Installs existing updates that were previously imported or acquired from the Internet and place in the updates repository. The default behavior is to install only those updates that are needed by the base product. However, you can use the -u option to override this behavior and specify the update types that you want to install instead.
This option is not valid when used with the -c option or the import_path operand.
-l | --list
Lists available update types that can be used with the -u option.
-n | --names {system_oid | system_name}
Targets one system specified by name or ID.

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.
Note: Passing multiple systems is not supported with the -n option. However, you can use the -N option to pass a group name to the command.
-N | --groups {group_oid | group_name}
Targets all systems in one specified group that is identified by name or OID.
Tip: 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.
-t | --type system_type
Discovers one or more 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 option 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.
-u | --updatetypes {update_type}[,{update_type}...]
Specifies the types of updates to install. If the -c is used, the -u option also specifies the types of updates to acquire from the Internet. If the -u option is used, one or more update_type values must be specified. However, if the -u option is not used, the update_type defaults to Director.
Tip: To determine a list of valid update types, use the installneeded command with the -l option.
Notes:
  • When using the installneeded command to install updates for update types other than Director, ensure that you use the -u option with the correct update_type. Otherwise, the updates for that update type are not acquired and are not installed.
  • When using -u in combination with import_path to import updates, -u does not restrict the update types that are imported; all updates in the supplied path are imported.
-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.

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.
  • 25: A number-formatting error occurred.
  • 26: A specified system type is not valid.
  • 29: The specified locale is not valid or not supported.
  • 60: An error occurred during installation.
  • 65: Software inventory could not be initiated, or failed.
  • 86: A server representing the local machine could not be found.
  • 110: A general failure occurred.
  • 125: A general failure occurred.

Examples

  1. Import and install needed updates to the local management server

    This example illustrates how to import and install needed updates to the local management server. The -v option writes messages to allow you to track progress. The -F option forces the installation of needed updates without prompting for confirmation to continue before installing them.

    smcli installneeded -v -F
  2. Import and install needed updates to the local management server with an import path

    This example illustrates how to import and install needed updates to the local management server, with an import_path specified. The import_path d:\\myupdates is a path to a directory that contains updates to import. The -v option writes messages to allow you to track progress. Because the -F option is not used, you are prompted for confirmation to continue before installing needed updates.

    smcli installneeded -v d:\\myupdates
  3. Import updates to the local management server and install needed updates to a specified system

    This example illustrates how to import updates to the local management server and install needed updates to the system named mysystem.

    smcli installneeded -v -n mysystem d:\\myupdates
  4. Use the Internet to check for updates, acquire updates, and install needed updates to the local management server

    This example illustrates how to use the Internet to check for updates, acquire the updates, and install needed updates to the local management server. Note that -c is used by default if -l, -c, -I, or import_path are not specified.

    smcli installneeded -v
  5. Use the Internet to check for updates, acquire updates, and install needed updates to a specified system

    This example illustrates how use the Internet to check for updates, acquire the updates, and install needed updates to the system named mysystem. Note that -c is used by default if -l, -c, -I, or import_path are not specified.

    smcli installneeded -v -n mysystem
  6. List update types that can be used with the -u option

    This example illustrates how to list update types that can be used with the -u option.

    smcli installneeded -l
  7. Use the Internet to check for IBM Flex System Manager updates, acquire updates, and install needed IBM Flex System Managerupdates to a specified system

    This example illustrates how to check for IBM Flex System Manager updates using the Internet, acquire the updates, and install needed IBM Flex System Manager updates to the system named mysystem. This example deals only with updates that have an update type of "Director". Note that -c is used by default if -l, -c, -I, or import_path are not specified.

    smcli installneeded -v -n mysystem -u Director
  8. Import and install updates to the local management server without previewing or confirming the updates

    This example illustrates how to import and install updates to the local management server. It uses the –force option so that no preview of needed updates is shown and no confirmation is needed to install the updates.

    smcli installneeded -v -F d:\\myupdates
  9. Install needed updates to the local management server

    This example illustrates how to install only those existing updates that are needed by the base product and were previously imported or acquired from the Internet.

    smcli installneeded -v -F -I
  10. Install updates for Linux with IP address

    This example illustrates how to install Linux updates to the system with IP address 10.11.9.165.

    smcli installneeded -v -t OperatingSystem -i 10.11.9.165 -F -u Linux