2023-09-22 17:46:30 -04:00
---
layout: default
title: Command flags
nav_order: 51
parent: Command reference
2023-10-26 15:04:57 -04:00
redirect_from: /benchmark/commands/command-flags/
grand_parent: OpenSearch Benchmark Reference
2023-09-22 17:46:30 -04:00
---
# Command flags
OpenSearch Benchmark uses command line flags to change Benchmark's behavior. Not all flags can be used with each command. To find out which flags are supported by a specific command, enter `opensearch-benchmark <command> --h` .
All command flags are added to a command using the following syntax:
```bash
opensearch-benchmark < command > --< command-flag >
```
Flags that accept comma-separated values, such `--telemetry` , can also accept a JSON array. This can be defined by passing a file path ending in `.json` or inline as a JSON string.
- Comma-seperated values: `opensearch-benchmark ... --test-procedure="ingest-only,search-aggregations"`
- JSON file: `opensearch-benchmark ... --workload-params="params.json"`
- JSON inline string: `opensearch-benchmark ... --telemetry='["node-stats", "recovery-stats"]'`
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## workload-path
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
This can be either a directory that contains a `workload.json` file or a `.json` file with an arbitrary name that contains a workload specification. `--workload-path` and `--workload-repository` as well as `--workload` are mutually exclusive.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
## workload-repositor
<!-- vale on -->
2023-09-22 17:46:30 -04:00
This defines the repository from which OpenSearch Benchmark loads workloads. `--workload-path` and `--workload-repository` as well as `--workload` are mutually exclusive.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## workload-revision
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines a specific revision from the workload source tree that OpenSearch Benchmark should use.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## workload
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines the workload to use based on the workload's name. You can find a list of preloaded workloads using `opensearch-benchmark list workloads` . `--workload-path` and `--workload-repository` as well as `--workload` are mutually exclusive.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## workload-params
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines which variables to inject into the workload. Variables injected must be available in the workload. To see which parameters are valid in the official workloads, select the workload from [the workloads repository ](https://github.com/opensearch-project/opensearch-benchmark-workloads ).
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## test-procedure
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
2023-11-21 14:03:10 -05:00
Defines the test procedures to use with each workload. You can find a list of test procedures that the workload supports by specifying the workload in the `info` command, for example, `opensearch-benchmark info --workload=<workload_name>` . To look up information on a specific test procedure, use the command `opensearch-benchmark info --workload=<workload_name> --test-procedure=<test-procedure>` .
2023-09-22 17:46:30 -04:00
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## test-execution-id
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines a unique ID for the test run.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## include-tasks
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines a comma-separated list of test procedure tasks to run. By default, all tasks listed in a test procedure array are run.
Tests are executed in the order they are defined in `test-procedure` ---not in the order they are defined in the command.
All task filters are case sensitive.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## exclude-tasks
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines a comma-separated list of test procedure tasks not to run.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## baseline
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
The baseline TestExecution ID used to compare the contender TestExecution.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## contender
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
The TestExecution ID for the contender being compared to the baseline.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## results-format
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines the output format for the command line results, either `markdown` or `csv` . Default is `markdown` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## results-number-align
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines the column number alignment for when the `compare` command outputs results. Default is `right` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## results-file
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
When provided a file path, writes the compare results to the file indicated in the path.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## show-in-results
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Determines whether or not to include the comparison in the results file.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## provision-config-repository
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines the repository from which OpenSearch Benchmark loads `provision-configs` and `provision-config-instances` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## provision-config-revision
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines the specific Git revision in the `provision-config` that OpenSearch Benchmark should use.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## provision-config-path
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines the path to the `--provision-config-instance` and any OpenSearch plugin configurations to use.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## distribution-version
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Downloads the specified OpenSearch distribution based on version number. For a list of released OpenSearch versions, see [Version history ](https://opensearch.org/docs/version-history/ ).
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## distribution-repository
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines the repository from which the OpenSearch distribution should be downloaded. Default is `release` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## provision-config-instance
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines the `--provision-config-instance` to use. You can view possible configuration instances by using the command `opensearch-benchmark list provision-config-instances` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## provision-config-instance-params
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
A comma-separated list of key-value pairs injected verbatim as variables for the `provision-config-instance` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## target-hosts
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines a comma-separated list of host-port pairs that should be targeted if using the pipeline `benchmark-only` . Default is `localhost:9200` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## target-os
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
The target operating system (OS) for which the OpenSearch artifact should be downloaded. Default is the current OS.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## target-arch
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
The name of the CPU architecture for which an artifact should be downloaded.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## revision
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines the current source code revision to use for running a benchmark test. Default is `current` .
This command flag can use the following options:
- `current` : Uses the source tree's current revision based on your OpenSearch distribution.
- `latest` : Fetches the latest revision from the main branch of the source tree.
You can also use a timestamp or commit ID from the source tree. When using a timestamp, specify `@ts` , where "ts" is a valid ISO 8601 timestamp, for example, `@2013-07-27T10:37:00Z` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## opensearch-plugins
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines which [OpenSearch plugins ]({{site.url}}{{site.baseurl}}/install-and-configure/plugins/ ) to install. By default, no plugins are installed.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## plugin-params
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines a comma-separated list of key-value pairs that are injected verbatim into all plugins as variables.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## runtime-jdk
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
The major version of JDK to use.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## client-options
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines a comma-separated list of clients to use. All options are passed to the OpenSearch Python client. Default is `timeout:60` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## load-worker-coordinator-hosts
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Defines a comma-separated list of hosts that coordinate loads. Default is `localhost` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## enable-worker-coordinator-profiling
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Enables a performance analysis of OpenSearch Benchmark's worker coordinator. Default is `false` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## pipeline
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
The `--pipeline` option selects a pipeline to run. You can find a list of pipelines supported by OpenSearch Benchmark by running `opensearch-benchmark list pipelines` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## telemetry
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Enables the provided telemetry devices when the devices are provided using a comma-separated list. You can find a list of possible telemetry devices by using `opensearch-benchmark list telemetry` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## telemetry-params
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Enables setting parameters for telemetry devices. Accepts a list of comma-separated key-value pairs, each of which are delimited by a colon or a JSON file name.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## on-error
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Controls how OpenSearch Benchmark responds to errors. Default is `continue` .
You can use the following options with this command flag:
- `continue` : Continues to run the test despite the error.
- `abort` : Aborts the test when an error occurs.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## preserve-install
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Keeps the Benchmark candidate and its index. Default is `false` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## kill-running-processes
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
When set to `true` , stops any OpenSearch Benchmark processes currently running and allows Benchmark to continue to run. Default is `false` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## chart-spec-path
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Sets the path to the JSON files containing chart specifications that can be used to generate charts.
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## chart-type
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Generates the indicated chart type, either `time-series` or `bar` . Default is `time-series` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## output-path
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
The name and path used for the chart's output. Default is `stdout` .
2024-01-03 11:30:46 -05:00
<!-- vale off -->
2023-09-22 17:46:30 -04:00
## limit
2024-01-03 11:30:46 -05:00
<!-- vale on -->
2023-09-22 17:46:30 -04:00
Limits the number of search results for recent test runs. Default is `10` .