Aerospike Admin commands
For the complete documentation index see: llms.txt
All documentation pages available in markdown.
This page describes the supported asadm commands and command modifiers, how to launch asadm, and how to execute commands from a file.
Overview
asadm is Aerospike’s primary tool for managing Aerospike instances at the cluster level.
Some asadm commands support one or more modifiers that limit the command’s scope to a specific set of nodes, namespaces, configurations, or metric parameters.
All commands sort output based on the node name that asadm chooses for the node. The node name is the Fully Qualified Domain Name (FQDN) or IP if the FQDN cannot be resolved.
Launch asadm
Launch asadm from the shell to open an interactive Admin> session or to run commands non-interactively and exit.
Connect to the admin port
The admin port is a reserved communication channel that ensures cluster accessibility, even during application overload scenarios. It is available in Aerospike Database 8.1.0 and later.
Configure the admin port in aerospike.conf, as follows:
network { service { port 3000 address any } admin { port 3003 address any } ...}To connect to a specific node over the admin port, launch asadm with the host and port flags:
asadm -h HOST_IP -p ADMIN_PORTWhen using the admin port, cluster discovery is disabled and asadm connects only to the specified node. When connected, asadm confirms the admin port connection, and the Admin> prompt changes to uppercase.
asadm -h 172.18.0.2 -p 3003
Found 1 nodesOnline: 172.18.0.2:3003Connected via admin port. Note: Cluster discovery is disabled for admin ports.
ADMIN>Command-line flags
You can pass the following flags when you run asadm from the terminal.
| Flag | Purpose |
|---|---|
-h, --host | Seed host IP or hostname. Starts an interactive session connected to the cluster. |
-p, --port | Service or admin port on the seed host. Use with -h for the admin port. |
-e, --execute | Run one or more asadm commands and exit. Pass a semicolon-separated command string or a path to a command file. |
--enable | Run privileged manage and asinfo commands with -e. Not available in interactive mode. |
-o, --out-file | Write -e output to a file instead of stdout. |
--single-node | Connect only to the seed node instead of discovering the full cluster. |
-c, --collectinfo | Start in Collectinfo-analyzer mode instead of live cluster mode. Use with -f. |
-f, --log-path | Path to a collectinfo archive or directory. Used with --collectinfo or --log-analyser. |
-l, --log-analyser | Start in Log-analyzer mode and work from Aerospike log files. |
Common launch options:
asadm -h 10.0.0.1asadm -e 'info network; show pmap'asadm --enable -e 'manage config service param proto-fd-max to 15000'asadm --collectinfo -f /tmp/collect_info_20260123_231419Run asadm commands
At the Admin prompt, all commands except enable support shortest-prefix execution and tab completion. For example:
i<tab>completes toinfo.s<tab>suggestsshowandsummary.- You can execute commands using their shortest unambiguous prefix. For example:
- To run
info, enteri. - To run
info network, enteri net. Note thati nis ambiguous withinfo namespaceandinfo network.
- To run
Admin> i net~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Network Information (2020-12-18 18:15:50 UTC)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cluster| Node| Node ID| IP| Build|Migrations|~~~~~~~~~~~~~~~~~~Cluster~~~~~~~~~~~~~~~~~~|Client| Uptime | | | | | |Size| Key|Integrity| Principal| Conns|bob-cluster-a| 10-0-0-1.heln.qwest.net:3000| BB9010016AE4202| 10.0.0.1:3000|E-4.9.0.18| 0.000 | 2|C3F2BCB417C3|True |BB9020016AE4202| 4|00:04:59bob-cluster-a| 10-0-0-2.heln.qwest.net:3000|*BB9020016AE4202| 10.0.0.2:3000|E-4.9.0.18| 0.000 | 2|C3F2BCB417C3|True |BB9020016AE4202| 3|00:04:59Number of rows: 2
Admin> i nERR: Ambiguous command: 'n' may be namespace or network.Common diagnostic commands
Use the following commands for common cluster-inspection questions around job tracking, partition health, client connectivity, and XDR. Run these commands at the Admin> prompt in live cluster mode. Several examples use command modifiers such as like; for modifier syntax, see Command modifiers.
| Command | Purpose |
|---|---|
info network | List every node in the cluster with IP addresses, client connection counts, and uptime. |
info namespace | Summarize memory use, record counts, and in-progress migrations for each namespace. |
show pmap | See partition distribution across nodes and whether any are unavailable or dead. Surfaces the server’s partition-info data. |
show jobs queries | List query and scan jobs on Database 6.0 and later (replaces legacy show jobs scans and server scan-show). Short primary-index queries are not listed; use show statistics namespace like pi_query_short for those counts. Add trid <transaction-id> to inspect one job. |
show user-agents | See which client libraries are connected and how many connections each App ID has. |
show config namespace like strong-consistency | Check whether a namespace is configured for strong consistency. |
show sindex | List secondary indexes and confirm each index is built and ready for queries. |
show config xdr | Review XDR datacenter, namespace, and filter settings. Use info xdr to monitor throughput, lag, and retries. |
show latencies like query | View latency histograms for queries, reads, writes, and other operations. |
show statistics namespace like migrate | Check migration progress and related namespace statistics during rebalancing. |
List of asadm commands
The following commands are available with the asadm tool:
| Command | Purpose |
|---|---|
| asinfo | Provides raw access to the info protocol. |
| collectinfo | Collects cluster info, system stats, and the Aerospike configuration file for the local node. |
| collectlogs | Collects cluster logs. |
| disable | Exits privileged mode. |
| enable | Enters privileged mode. |
| exit | Terminate session. |
| features | Lists the features in use in a running Aerospike cluster. |
| info | Provides summary tables for various aspects of Aerospike functionality. |
| manage | Administrative tasks like managing users, roles, UDFs, and sindexes. |
| pager | Turn terminal pager on or off. |
| show | A collection of commands used to display information about the Aerospike cluster. |
| summary | Displays a summary of the Aerospike cluster, including the amount of unique data. |
| watch | Runs a command for a specified pause and iterations. |
Command modifiers
The following sections describe the supported asadm command modifiers.
diff
The diff modifier shows the difference between the configurations in all nodes of the cluster.
| Command | Purpose | Example | Additional Notes |
|---|---|---|---|
show config | Show differences in service configurations. | show config service diff | Only the show config command supports diff. |
for
The for modifier shows the output for specific namespaces, sets, or datacenters. The following commands support the for modifier:
| Command | Purpose | Example | Additional Notes |
|---|---|---|---|
show distribution | Show distribution for namespace that has the substring test. | show distribution for test | |
show latencies | Show latency for namespace that has substrings test or bar. | show latencies for test bar | |
show statistics set | Show statistics for set that has substring ABCD or ends with XYZ for a namespace that starts with test. | show statistics set for ^test.* ABCD .*XYZ$ | This command accepts two patterns after for: first value is for namespace, and second value for set. |
show statistics sindex | Show statistics for sindex named ABCD for namespace test. | show statistics sindex for test ^ABCD$ | This command accepts two patterns after for: first value for namespace, and second value for sindex. |
show statistics xdr dc and show config xdr dc | Show statistics for XDR datacenters DC1 and DC2 | show statistics xdr dc for DC1 DC2 | The two commands accept multiple for modifiers to filter by datacenter. |
show statistics xdr namespace and show config xdr namespace | Show statistics for XDR namespace test on DC1 | show statistics xdr namespace for test DC1 | The two commands accept two patterns after for: first value for namespace, and second value for datacenter. |
show stop-writes | Show configured stop-writes for namespace test and set testset. | show stop-writes for test testset | This command accepts two patterns after for: first value for namespace, and second value for set. |
like
The like modifier shows only results that contain the specified string. Use this with show statistics and show config commands.
| Command | Purpose | Example | Additional Notes |
|---|---|---|---|
show statistics | Show namespace statistics with substring object. | show statistics namespace like object |
with
The with modifier specifies a list of nodes to be used with the given command.
| Command | Purpose | Example | Additional Notes |
|---|---|---|---|
manage config | Set the aggr logging context to info for nodes prefixed with 10.0. | See the following example. | Use the node’s IP, FQDN, or Node ID. If multiple nodes share the same IP, use IP:PORT instead of IP. Use the * wildcard to search for prefix matches. |
Admin+> manage config logging file /var/log/aerospike/aerospike.log param aggr to info with 10.0.*~Set Logging Param aggr to info~ Node|Response10.0.0.1:3000|ok10.0.0.2:3000|ok10.0.0.3:3000|okNumber of rows: 3Execute asadm commands from a file
You can execute multiple commands from a file with the -e option. The command file has the following syntax rules:
- Commands must end with
;. - Commands can be separated on multiple lines.
- The file contains commands for a single node only.
- Single-line comments start with
//. - Multiple-line comments start with
/*and end with*/.
show config;info namespace;// This is a single-line commentshow statistics;/* This is a multiple-line comment - line 1This is multiple-line comment - line 2 */show statistics like obj;