|
8 | 8 | parent: CLIs
|
9 | 9 | name: influxdb3
|
10 | 10 | weight: 200
|
11 |
| -source: /shared/influxdb3-cli/_index.md |
12 | 11 | ---
|
13 | 12 |
|
14 |
| -<!-- |
15 |
| -The content of this file is at content/shared/influxdb3-cli/_index.md |
16 |
| ---> |
| 13 | +The `influxdb3` CLI runs and interacts with the {{< product-name >}} server. |
| 14 | + |
| 15 | +## Usage |
| 16 | + |
| 17 | +<!--pytest.mark.skip--> |
| 18 | + |
| 19 | +```bash |
| 20 | +influxdb3 [GLOBAL-OPTIONS] [COMMAND] |
| 21 | +``` |
| 22 | + |
| 23 | +## Commands |
| 24 | + |
| 25 | +| Command | Description | |
| 26 | +| :--------------------------------------------------------------| :---------------------------------- | |
| 27 | +| [create](/influxdb3/enterprise/reference/cli/influxdb3/create/) | Create resources | |
| 28 | +| [delete](/influxdb3/enterprise/reference/cli/influxdb3/delete/) | Delete resources | |
| 29 | +| [disable](/influxdb3/enterprise/reference/cli/influxdb3/disable/) | Disable resources | |
| 30 | +| [enable](/influxdb3/enterprise/reference/cli/influxdb3/enable/) | Enable resources | |
| 31 | +| [query](/influxdb3/enterprise/reference/cli/influxdb3/query/) | Query {{% product-name %}} | |
| 32 | +| [serve](/influxdb3/enterprise/reference/cli/influxdb3/serve/) | Run the {{% product-name %}} server | |
| 33 | +| [show](/influxdb3/enterprise/reference/cli/influxdb3/show/) | List resources | |
| 34 | +| [test](/influxdb3/enterprise/reference/cli/influxdb3/test/) | Test plugins | |
| 35 | +| [write](/influxdb3/enterprise/reference/cli/influxdb3/write/) | Write to {{% product-name %}} | |
| 36 | + |
| 37 | +## Global options |
| 38 | + |
| 39 | +| Option | | Description | |
| 40 | +| :----- | :------------------------------------ | :------------------------------------------------------------------------------------------------ | |
| 41 | +| | `--num-threads` | Maximum number of IO runtime threads to use | |
| 42 | +| | `--io-runtime-type` | IO tokio runtime type (`current-thread`, `multi-thread` _(default)_, or `multi-thread-alt`) | |
| 43 | +| | `--io-runtime-disable-lifo-slot` | Disable LIFO slot of IO runtime | |
| 44 | +| | `--io-runtime-event-interval` | Number of scheduler ticks after which the IOtokio runtime scheduler will poll for external events | |
| 45 | +| | `--io-runtime-global-queue-interval` | Number of scheduler ticks after which the IO runtime scheduler will poll the global task queue | |
| 46 | +| | `--io-runtime-max-blocking-threads` | Limit for additional threads spawned by the IO runtime | |
| 47 | +| | `--io-runtime-max-io-events-per-tick` | Maximum number of events to be processed per tick by the tokio IO runtime | |
| 48 | +| | `--io-runtime-thread-keep-alive` | Custom timeout for a thread in the blocking pool of the tokio IO runtime | |
| 49 | +| | `--io-runtime-thread-priority` | Set thread priority tokio IO runtime workers | |
| 50 | +| `-h` | `--help` | Print help information | |
| 51 | +| `-V` | `--version` | Print version | |
| 52 | + |
| 53 | +### Option environment variables |
| 54 | + |
| 55 | +You can use the following environment variables to set `influxdb3` global options: |
| 56 | + |
| 57 | +| Environment Variable | Option | |
| 58 | +| :-------------------------------------------- | :------------------------------------ | |
| 59 | +| `INFLUXDB3_NUM_THREADS` | `--num-threads` | |
| 60 | +| `INFLUXDB3_IO_RUNTIME_TYPE` | `--io-runtime-type` | |
| 61 | +| `INFLUXDB3_IO_RUNTIME_DISABLE_LIFO_SLOT` | `--io-runtime-disable-lifo-slot` | |
| 62 | +| `INFLUXDB3_IO_RUNTIME_EVENT_INTERVAL` | `--io-runtime-event-interval` | |
| 63 | +| `INFLUXDB3_IO_RUNTIME_GLOBAL_QUEUE_INTERVAL` | `--io-runtime-global-queue-interval` | |
| 64 | +| `INFLUXDB3_IO_RUNTIME_MAX_BLOCKING_THREADS` | `--io-runtime-max-blocking-threads` | |
| 65 | +| `INFLUXDB3_IO_RUNTIME_MAX_IO_EVENTS_PER_TICK` | `--io-runtime-max-io-events-per-tick` | |
| 66 | +| `INFLUXDB3_IO_RUNTIME_THREAD_KEEP_ALIVE` | `--io-runtime-thread-keep-alive` | |
| 67 | +| `INFLUXDB3_IO_RUNTIME_THREAD_PRIORITY` | `--io-runtime-thread-priority` | |
| 68 | + |
| 69 | + |
| 70 | +## Examples |
| 71 | + |
| 72 | +In the examples below, replace the following: |
| 73 | + |
| 74 | +- {{% code-placeholder-key %}}`my-host-01`{{% /code-placeholder-key %}}: |
| 75 | +a unique identifier for your {{< product-name >}} server. |
| 76 | +- {{% code-placeholder-key %}}`my-cluster-01`{{% /code-placeholder-key %}}: |
| 77 | +a unique identifier for your {{< product-name >}} cluster. |
| 78 | +The value you use must be different from `--node-id` values in the cluster. |
| 79 | + |
| 80 | +{{% code-placeholders "my-host-01|my-cluster-01" %}} |
| 81 | + |
| 82 | +### Run the InfluxDB 3 server |
| 83 | + |
| 84 | +<!--pytest.mark.skip--> |
| 85 | + |
| 86 | +```bash |
| 87 | +influxdb3 serve \ |
| 88 | + --object-store file \ |
| 89 | + --data-dir ~/.influxdb3 \ |
| 90 | + --node-id my-host-01 \ |
| 91 | + --cluster-id my-cluster-01 |
| 92 | +``` |
| 93 | + |
| 94 | +### Display short-form help for all commands |
| 95 | + |
| 96 | +<!--pytest.mark.skip--> |
| 97 | + |
| 98 | +```bash |
| 99 | +influxdb3 -h |
| 100 | +``` |
| 101 | + |
| 102 | +### Display long-form help for all commands |
| 103 | + |
| 104 | +<!--pytest.mark.skip--> |
| 105 | + |
| 106 | +```bash |
| 107 | +influxdb3 --help |
| 108 | +``` |
| 109 | + |
| 110 | +### Run the {{< product-name >}} server with extra verbose logging |
| 111 | + |
| 112 | +<!--pytest.mark.skip--> |
| 113 | + |
| 114 | +```bash |
| 115 | +influxdb3 serve -v \ |
| 116 | + --object-store file \ |
| 117 | + --data-dir ~/.influxdb3 \ |
| 118 | + --node-id my-host-01 \ |
| 119 | + --cluster-id my-cluster-01 |
| 120 | +``` |
| 121 | + |
| 122 | +### Run {{< product-name >}} with debug logging using LOG_FILTER |
| 123 | + |
| 124 | +<!--pytest.mark.skip--> |
| 125 | + |
| 126 | +```bash |
| 127 | +LOG_FILTER=debug influxdb3 serve \ |
| 128 | + --object-store file \ |
| 129 | + --data-dir ~/.influxdb3 \ |
| 130 | + --node-id my-host-01 \ |
| 131 | + --cluster-id my-cluster-01 |
| 132 | +``` |
| 133 | + |
| 134 | +{{% /code-placeholders %}} |
0 commit comments