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. You can pass a single command, a string of semicolon-separated commands, or the path to a command file.Since ; separates commands, if the command contains a literal ;, such as in asinfo -v 'set-config:context=service;proto-fd-max=9999', you must quote the entire command. Otherwise, the ; is treated as a command separator. |
--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, --log-analyzer | Start in Log-analyzer mode and work from Aerospike log files. --log-analyzer is an alias for --log-analyser. |
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. On busy clusters, combine -flip, like, for, with, trid, and -where to filter and project output; see show jobs. |
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. |
show jobs queries | Show query jobs in namespace test on set demo. | show jobs queries for test demo | Accepts one pattern (namespace only) or two patterns (namespace and set). Also supported on legacy show jobs scans and show jobs sindex-builder subcommands. |
-flip
The -flip and --flip flags transpose tabular output. On show jobs queries, the default view lists each field as a row and each job as a column; with -flip, each job is a row and each field is a column.
| Command | Purpose | Example | Additional Notes |
|---|---|---|---|
show config | Show namespace configuration with nodes as rows. | show config namespace like partition -flip | Also supported on show statistics and other show config subcommands. |
show jobs queries | Show one row per job instead of one column per job. | show jobs queries -flip | Combine with like to limit which fields appear as columns. |
like
The like modifier shows only results that contain the specified string or regex pattern.
| Command | Purpose | Example | Additional Notes |
|---|---|---|---|
show statistics | Show namespace statistics with substring object. | show statistics namespace like object | |
show jobs queries | After -flip, add metric columns whose names match the pattern. | show jobs queries -flip like set | Core identity fields are always shown. Without -flip, like adds matching field rows to the pivoted view. |
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. |
show jobs queries | Show query jobs only on nodes whose address matches the pattern. | show jobs queries with aerospike_a_1.test-runner:4333 | Use a resolvable node prefix, FQDN, or host:port. The with modifier is not supported in collectinfo-analyzer mode. |
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: 3-where
The -where and --where flags filter the output of show jobs queries to jobs whose field value matches a pattern. Repeat the flag to combine multiple filters together.
| Command | Purpose | Example | Additional Notes |
|---|---|---|---|
show jobs queries | Show only active jobs. | show jobs queries -where status=active | Plain text matches as a substring, so active matches active(ok). Node is not valid; use with for node filtering. |
show jobs queries | Show completed background-UDF jobs whose function name matches incre. | show jobs queries -where status=done -where udf-function=incre | Combine with -flip, like, for, with, and trid. |
show jobs queries | Match job type with a regex. | show jobs queries -where Type=back.*udf$ | Quote the clause when the pattern contains shell metacharacters. |
Execute 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;