CLI Overview
This page provides an overview of the Weka system CLI.
Available Top-Level Commands
The Weka CLI is installed on each Weka host and is available through the weka
command. Running this command will display a list of all available top-level commands:
Note: There are a number of options which are common to many commands:
-J|--json
flag prints the raw JSON value returned by the cluster.
-H|--hostname
flag directs the CLI to communicate with the cluster through the given hostname.
--raw-units
flag causes units such as capacity and bytes to be printed in their raw format, as returned by the cluster.
--UTC
flag causes timestamps to be printed in the UTC timezone, rather than in the local time of the machine running the CLI command.
-f|--format
flag specifies the format to output the result (view, csv, markdown, or JSON)
-o|--output
flag specifies the columns of the output to be included.
-s|--sort
flag specifies the order to sort the output. May include a '+' or '-' before the column name to sort by ascending or descending order.
-F| --filter
flag specifies the filter values for a member (without forcing it to be in the output).
--no-header
flag indicates that the column header should not be shown when printing the output.
-C|--CONNECT-TIMEOUT
flag can be used to change the default timeout used for connecting to the system via the JRPC protocol.
-T|--TIMEOUT
flag can be used to change the default timeout for which the commands waits for a response before giving up.
Command Hierarchy
Most Weka system top-level commands are the default list command for their own collection. Additional sub-commands may be available under them.
For Example: The weka fs
command displays a list of all filesystems and is also the top-level command for all filesystems, filesystem groups, and snapshot-related operations. It is possible to use the -h
/--help
flags or the help
command to display a list of available commands at each level, as shown below:
Connecting to Another Host
Most Weka system commands deliver the same result on all cluster hosts. However, it is sometimes necessary to execute a command on a specific host. This is performed using the -H
/--hostname
option and specifying the hostname or IP address of the target host.
CLI Auto-completion
Using bash
you can use auto-completion for CLI commands and parameters. The auto-completion script is automatically installed.
To disable the auto-completion script, run weka agent autocomplete uninstall
To (re-)install the script on a host, run weka agent autocomplete install
and re-enter your shell session.
You can also use weka agent autocomplete export
to get the bash completions script and write it to any desired location.
Cluster Status
The weka status
command displays the overall status of the Weka system.
For Example: If the cluster is healthy, a result similar to the following should be displayed:
For Example: If the cluster has one failed host, a result similar to the following should be displayed:
Last updated