whatsup man page
whatsup — list up and/or down nodes in a cluster
whatsup [OPTION]... [NODES]...
whatsup lists which nodes are currently up or down in a cluster. It determines which nodes are up or down based on information provided by the nodeupdown(3) library. Configuration of backend components or clusterlists for the nodeupdown(3) library may be needed. Please see libnodeupdown(3).
whatsup will check on the status of every node in the cluster unless specific nodes are listed at the command line. If the first node listed is "-", nodes will be read in from standard input. The nodes can be listed in hostrange format, comma separated lists, or space separated lists. See the section below on Host Ranges for instructions on how to list hosts in hostrange format. The hostnames listed must be the shortened names of hostnames.
The exit value of whatsup depends on the options performed on the command line. If the default --updown option is used, the exit value will be 0 if the command succeeds without error. If the --up option is used and no nodes are specified via the command line or standard input, the exit value will be 0 if all cluster nodes are up. If nodes are specified via the command line or standard input, the exit value wil be 0 if all the specified nodes are up. The behavior is similar for the --down option.
- -h, --help
Print help and exit
- -v, --version
Print version and exit
- -o STRING, --hostname=STRING
server hostname (default=localhost)
- -p INT, --port=INT
server port (default=8649)
- -b, --updown
List both up and down nodes (default)
- -u, --up
List only up nodes
- -d, --down
List only down nodes
- -t, --count
List only node counts
- -q, --hostrange
List nodes in hostrange format (default)
- -c, --comma
List nodes in comma separated list
- -n, --newline
List nodes in newline separated list
- -s, --space
List nodes in space separated list
- -m, --module
Use a specific backend module for up-down calculations.
- -r, --last-up-time
Output last known up time of nodes and their current up or down state. This option may not be available on some configurations.
- -l, --log
Enter whatsup logging mode. Whatsup will regularly poll the backend tool to calculate up-down state changes and output them to the appropriate output.
- -f, --log-file
Specify the log file Whatsup should output logging information to. If not specified, defaults to stdout.
- -e, --log-poll
Specify the length in seconds the log mode of whatsup should regularly poll. Default is 30 seconds.
- -M, --monitor
Monitor up-down state changes through event monitoring.
As noted in sections above, whatsup accepts ranges of hostnames in the general form: prefix[n-m,l-k,...], where n < m and l < k, etc., as an alternative to explicit lists of hosts. This form should not be confused with regular expression character classes (also denoted by “”). For example, foo does not represent foo1 or foo9, but rather represents a degenerate range: foo19.
This range syntax is meant only as a convenience on clusters with a prefixNN naming convention and specification of ranges should not be considered necessary -- the list foo1,foo9 could be specified as such, or by the range foo[1,9].
Some examples of range usage follow:
List all nodes among foo01,foo02,...,foo05 that are up and down
List all nodes among foo7,foo9,foo10 that are up and down
As a reminder to the reader, some shells will interpret brackets ('[' and ']') for pattern matching. Depending on your shell, it may be necessary to enclose ranged lists within quotes. For example, in tcsh, the above two examples should be executed as:
List all nodes that are up and down.
List all nodes that are down
List all nodes among foo[0-20] that are down
whatsup -d foo[0-20]
List all nodes that are up and down by their alternate names
List all nodes among foo[5-25] that are up by their alternate names
whatsup -u -a foo[5-25]
List all nodes that are up in comma separated lists.
whatsup -u -c
List all nodes that are up among the nodes foo2, foo4, and foo8
whatsup -u foo2,foo4,foo8
Only output the number of nodes that are up and down
Only output the number of up nodes
whatsup -u -t
Only output the number of up nodes among foo[5-25]
whatsup -u -t foo[5-25]
Developed by Albert Chu <email@example.com> on LLNL's Linux clusters. This software is open source and distributed under the terms of the Gnu GPL.