lsupd command

Use the lsupd command to list updates and their attributes.

Synopsis

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

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

smcli lsupd [-v] [-a ] [-d symbol] [-o | -p] [-A attribute_list [-s] | [{-l [-e]} | -m] [-f file_name | -P query | -U update_group_list | [-u] update_list]

Description

You can use this command list the update files, requisite updates, and superseding updates.

If you do not specify any options, this command lists all fix ID (update IDs).

By default, updates are listed one per update per line, and only the update ID is displayed. You can list additional attributes using the -A | --attribute options or list all attributes using the -l | --long option.

Operands

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

Options

-a | --all
Lists information about the update in addition to the specified update attributes, including:
  • The documentation files (such as readme files) and installable files that make up the update
  • Requisite updates and software
  • Superseding updates
  • Restart actions
-A | --attribute key[,key ... ]

Displays values for one or more specified attributes, where key is the attribute key.

Tip:
  • The attributes and attributes values can be locale specific.
  • You can use the lsupd -l command to list all attributes associated with the targeted updates.
-d | --delimiter symbol

Specifies the character or set of characters that separates output data, where symbol is a string of one or more characters.

The behavior of this option depends on the use of other options in the command, as shown below.
  • If you specify this option without the -A | --attribute option, this command separates data fields in a record by a comma followed by a space. Data records are separated by the specified delimiter symbol.
  • If you specify this option with the -A | --attribute option, this command separates data fields in a record by the specified delimiter symbol. Data records are separated by a line break.
  • If you specify this option with the -l | --long option, the delimiter option is ignored.
-e | --expand
Expands the long listing to also display a description of the attribute keys.
Note: If you specify this option, you must also specify the -l | --long option.
The information is displayed in this format:
     key1 (key_string) : value1
     key2 (key_string) : value2
     ...
-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 IDs or fix IDs for the update, separated by commas or line breaks.
-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.
-l | --long
Display detailed information about each targeted update.

This option lists these values for each update:

  • DisplayName: The displayable name of the update
  • Description: The description of the update
  • Version: The version of the update. The version is not applicable to patches or temporary fixes.
  • UpdateID: The unique fix ID of all updates of the same provider type.
  • Severity: The severity of the update, which helps determine the importance of the update. Possible values are Critical, High, Medium, Low and None.
  • ComponentName: The identifier of the product that would be updated.
  • Vendor: The organization that created the update.
  • RestartType: The kind of restart required if the update is installed.
  • Superseded: A flag indicating whether this update has been superseded by another update.
  • Platform: The hardware platform to which the update applies.
  • Uninstallable: A flag indicating whether this update can be uninstalled.
  • BuildDate: The build date for the update as stated in the update's descriptor (SDD).
  • BuildNumber: The build number for this update as stated in the update's descriptor (SDD).
  • FixType: The type of fix, such as an individual update, a collection of updates, or an information-only update.
  • PackageType: The update package type as defined by the Solution Deployment Descriptor standard (for example, base installation or maintenance)
  • SoftwareID: The identifier of the software product to which the update applies
  • Category : The category (type) of update as defined by the vendor
  • ImpactStatement: The affect of this update after it is installed
  • AcquiredDate: The date when the update was downloaded
  • TotalSize: The total size, in bytes, of all files that belong to this update
  • Downloaded: A flag that indicates whether all installable files for the update have been downloaded
  • Filenames: The names of the files that belong to the update
-m | --members
Lists all updates that are members of each targeted update collection.
Note: This option cannot be used with the -l | --long, -e | --expand, or --a | --all option.
-o | --oid
Displays the unique IDs associated with the targeted updates in addition to other information. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e).
Tips:
  • This option cannot be used with the -p | --pipe option.
  • You can combine this option with the -l | --long and -A | --attribute options.
-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.
-p | --pipe

Displays only the unique IDs for the targeted systems instead of the name.

Tips:
  • IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x37).
  • When used alone, this option enables the output to be piped to other smcli commands.
  • This option cannot be used with the -o | --oid options.
  • You can combine this option with the -l | --long and -A | --attribute options.
-s | --sort
Sorts the output by the first specified attribute.
Tip: If you specify this option, you must also specify the -A | --attribute option. Otherwise, this option is ignored.
-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.

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.
  • 21: The specified update group is not valid.
  • 25: A number-formatting error occurred.
  • 29: The specified locale is not valid or not supported.
  • 50: The specified update is not valid.

Examples

  1. List all fix IDs
    This example illustrates how to list all update fix IDs (also called updates IDs).
    smcli lsupd
    
    SA12345
    com.ibm.usmi.services.updates_1.0.2
    systemx_1.0.5
  2. List all information of an update
    This example illustrates how to list all information for the update with fix ID SA12345.
    smcli lsupd -l -a SA12345
  3. List expanded attributes of an update
    This example illustrates how to list all attributes for the update with fix ID SA12345 and a description of those attributes.
    smcli lsupd -l -e SA12345
  4. List update that match a query
    This example illustrates how to list the fix IDs (also called updates IDs) of all updates with version 1.2 or 1.3.
    smcli lsupd -P "Version=='1.2' OR Version=='1.3'"
  5. Sort output by update name
    This example illustrates how to list the update name and version and sort the output by update name.
    smcli lsupd -sA Name,Version
  6. List all update collections
    This example illustrates how to list the names of all updates that are collections containing multiple updates.
    smcli lsupd -P "FixType=Collection"