streamtool checkhosts

Usage

checkhosts [--xclient] {[--hfile <host-file>] | [--hosts <host>,...]} [--connectivity-only] [--fmt <format-spec>] [-v,--verbose <level>] [-h,--help] [--trace <level>] [--zkconnect {<host>:<port>},... | --embeddedzk]

The streamtool checkhosts command verifies that you meet configuration and network connectivity requirements on one or more Streams hosts.

Authority

You do not need any authority to run this command.

Description

This command can check the hosts before they are allocated to domains or instances. The hosts must be configured to use Secure Shell (SSH). The command uses SSH to access each host and run the tests.

This command checks all the hosts that you specify in the --hosts or --hfile options.

The host where you run the streamtool checkhosts is used as the client host. By default, the client host is the reference that Streams uses to verify the configuration of the resources. To change the client host, specify the --xclient option.

You can perform the following checks with this command:

Connectivity-only check
Streams checks the network configuration of a single resource or connectivity between resources.
Environment checks
Streams performs the following checks:
  • SSH check: This check verifies that SSH connectivity is set up correctly for Streams.
  • Dependency check: This check verifies the RPM levels of all packages that are required by Streams.
  • Compatible operating system check: This check verifies that the resources have compatible operating systems.
  • Ulimit check: This check verifies that the ulimit settings on the resources are adequate to run Streams.
  • Compatible architecture check: This check verifies that the resources have compatible architectures.

Options

--connectivity-only
Specifies to run only the connectivity checks.
--embeddedzk

Specifies to use the embedded copy of ZooKeeper. This option is not supported within the interactive streamtool interface.

If you are not using the interactive streamtool interface and you do not specify either this option or the --zkconnect option, Streams uses the ZooKeeper connection that is associated with the active domain or the domain that is specified in the --domain-id option. Streams determines which connection maps to the domain by using cached information about the domains. In this scenario, if the domain identifier is not unique in the Streams configuration cache, the command fails.

--fmt <format-spec>
Specifies the presentation format. The command supports the following values:
  • %Mf: Multiline record format. One line per field.
  • %Nf: Name prefixed field table format. One line per processing element.
  • %Tf: Standard table format, which is the default. One line per host check result.
-h,--help
Specifies to show the command syntax.
--hfile <host-file>
Specifies the path to a file, which can contain host identifiers.

A host identifier can be a host name or IP address. The host name can be a simple or fully qualified domain name. Each host identifier must be on a separate line in the file. The host specification syntax is:

hostname

The file can also contain comment lines (blank lines or lines where the first non-whitespace character is a '#').

--hosts <host>
Specifies one or more host identifiers. A host identifier can be a host name or IP address. Each host identifier must be separated by a comma. For the command to run successfully on each host, SSH must be set up on the hosts.
--trace <level>
Specifies the trace setting. The following valid levels are listed in order of increasing verbosity, which is to say that the first level in the list generates the least amount of information:
  • off
  • error
  • warn
  • info
  • debug
  • trace
The default value is off.
-v,--verbose <level>
Specifies to provide more detailed command output. You must specify one of the following verbosity levels:
  • 0: This level disables detailed reporting.
  • 1: This level provides detailed information only for resources that have problems and for situations where checks fail.
  • 2: This level provides detailed information for each resource that is checked.
  • 3: This level provides detailed information for everything that the command checks.
--xclient
Specifies to use the first resource in the list of resources as the reference for operating system and architecture checks. If you do not specify this option, the resource where you run the command is used for the comparison checks.
--zkconnect <{<host>:<port>},...>

The name of one or more host and port pairs that specify the configured ZooKeeper servers. This option is not supported within the interactive streamtool interface.

If you are not using the interactive streamtool interface and you do not specify this option, Streams tries to use:

  1. The --embeddedzk option
  2. The value from the STREAMS_ZKCONNECT environment variable
  3. A ZooKeeper connection string that is derived from cached information about the current domain.

Examples

[streamtool <bsmith@StreamsDomain.StreamsInstance]
checkhosts --hosts host3,host4
Date: Fri Oct 31 14:47:54 EDT 2014
2 resources to check: [host3.teracloud.com, host4.teracloud.com]
Reference resource: host6.teracloud.com
=============================================================
Resource checks
=============================================================
  Resource Name Summary  Connectivity Check Environment Check
  host3.teracloud.com PASSED   PASSED             PASSED
  host4.teracloud.com PASSED   PASSED             PASSED
=============================================================
2 OK resources
0 problem resources
=============================================================
Overall Summary
=============================================================
2 resources checked
2 OK resources
0 problem resources