discover command

Use the discover command to discover resources on networks that are connected to the management server.

Synopsis

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

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

smcli discover [-v] [-W seconds] {-i ip_address_list | -H hostname_list} [-t resource_type]| -p {all | profile_list}

Description

The discover command discovers resources on networks that are connected to the management server. The IP address, host name, or profile ID is the necessary operand for discovery. When a resource type is specified, discovery is filtered based on that type.

If you do not specify the -i | --ipaddress or -p | --profile option, this command discovers resources using all available profiles.

Operands

None.

Options

-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.
-H | --hostname hostname [, hostname, ...]
Discovers one or more systems with the specified host names. The list must contain individual host names separated by a comma.
Host names must meet the following requirements:
  • The characters must consist of only alphanumeric characters, periods (.), and dashes (-).
  • The first character must be an alphanumeric character.
  • The last character cannot be a period (.) or dash (-).
  • The length must not exceed 63 characters.
--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_list_range}
Discovers one or more systems with the specified IP addresses. Specify the IP addresses as a comma-separated list or as a range of addresses (from highest to lowest) separated by a hyphen. You can specify the list of IP addresses in IPv4 format, IPv6 format, or both. You must specify the range of IP addresses only in IPv4 format.
-p | --profile {all | { profile_name}[,profile_name...]}
Discovers the systems associated with one or more discovery profiles that are specified by name and separated by a comma.
Tips:
  • You can create discovery profiles using the IBM® Flex System Manager Web interface. You cannot create, modify or delete profiles from the command line interface.
  • You can get a list of profile names from the IBM Flex System Manager Web interface.
  • To discover systems associated with all discovery profiles, specify all.
  • This option cannot be used with the -i | --ipaddress option.
all
All discovery profiles.
profile_name
The name of the discovery profile. If the discovery profile name contains a comma, prefix the comma with a backslash (\).
Tips:
  • Discovery-profile names might not be unique. This command acts on all discovery profiles with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple discovery profiles with the same name. To target a discovery profile that has a name that is not unique, identify the discovery profile by specifying its unique, hexadecimal group ID, or use additional target options to refine the selection.
  • The discovery profiles 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:
  • You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options.
  • Use the lssys -I command to obtain a list of valid system types.
-v | --verbose
Writes verbose messages to standard output.

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

-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.
  • 26: A specified system type is not valid.
  • 29: The specified locale is not valid or not supported.
  • 50: The specified system type does not support discovery.
  • 126: The task did not complete before the specified wait time. The command is still running in the background.
  • 127: The command timed out.

Examples

  1. Discover resources by IP address

    This command illustrates how to discover all resources with IP addresses 2002:0:0:0:10:10:18:17 and 10.10.18.173, and within the IP address range 10.10.18.0 - 10.10.18.100.

    smcli discover -i "2002:0:0:0:10:10:18:17", 10.10.18.173,10.10.18.0-10.10.18.100

  2. Discover resources by host name

    This command illustrates how to discover all resources with host name sumeet.kumar.com.

    smcli discover -H sumeet.kumar.com

  3. Discover resources associated with all profiles

    This command illustrates how to discover all resources that are associated with all profiles.

    smcli discover -p all