Skip to content

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_PORT

When 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 nodes
Online: 172.18.0.2:3003
Connected 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.

FlagPurpose
-h, --hostSeed host IP or hostname. Starts an interactive session connected to the cluster.
-p, --portService or admin port on the seed host. Use with -h for the admin port.
-e, --executeRun one or more asadm commands and exit. Pass a semicolon-separated command string or a path to a command file.
--enableRun privileged manage and asinfo commands with -e. Not available in interactive mode.
-o, --out-fileWrite -e output to a file instead of stdout.
--single-nodeConnect only to the seed node instead of discovering the full cluster.
-c, --collectinfoStart in Collectinfo-analyzer mode instead of live cluster mode. Use with -f.
-f, --log-pathPath to a collectinfo archive or directory. Used with --collectinfo or --log-analyser.
-l, --log-analyserStart in Log-analyzer mode and work from Aerospike log files.

Common launch options:

asadm -h 10.0.0.1
asadm -e 'info network; show pmap'
asadm --enable -e 'manage config service param proto-fd-max to 15000'
asadm --collectinfo -f /tmp/collect_info_20260123_231419

Run asadm commands

At the Admin prompt, all commands except enable support shortest-prefix execution and tab completion. For example:

  • i<tab> completes to info.
  • s<tab> suggests show and summary.
  • You can execute commands using their shortest unambiguous prefix. For example:
    • To run info, enter i.
    • To run info network, enter i net. Note that i n is ambiguous with info namespace and info network.
Example: Running short form commands
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:59
bob-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:59
Number of rows: 2
Admin> i n
ERR: 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.

CommandPurpose
info networkList every node in the cluster with IP addresses, client connection counts, and uptime.
info namespaceSummarize memory use, record counts, and in-progress migrations for each namespace.
show pmapSee partition distribution across nodes and whether any are unavailable or dead. Surfaces the server’s partition-info data.
show jobs queriesList 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-agentsSee which client libraries are connected and how many connections each App ID has.
show config namespace like strong-consistencyCheck whether a namespace is configured for strong consistency.
show sindexList secondary indexes and confirm each index is built and ready for queries.
show config xdrReview XDR datacenter, namespace, and filter settings. Use info xdr to monitor throughput, lag, and retries.
show latencies like queryView latency histograms for queries, reads, writes, and other operations.
show statistics namespace like migrateCheck migration progress and related namespace statistics during rebalancing.

List of asadm commands

The following commands are available with the asadm tool:

CommandPurpose
asinfoProvides raw access to the info protocol.
collectinfoCollects cluster info, system stats, and the Aerospike configuration file for the local node.
collectlogsCollects cluster logs.
disableExits privileged mode.
enableEnters privileged mode.
exitTerminate session.
featuresLists the features in use in a running Aerospike cluster.
infoProvides summary tables for various aspects of Aerospike functionality.
manageAdministrative tasks like managing users, roles, UDFs, and sindexes.
pagerTurn terminal pager on or off.
showA collection of commands used to display information about the Aerospike cluster.
summaryDisplays a summary of the Aerospike cluster, including the amount of unique data.
watchRuns 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.

CommandPurposeExampleAdditional Notes
show configShow differences in service configurations.show config service diffOnly 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:

CommandPurposeExampleAdditional Notes
show distributionShow distribution for namespace that has the substring test.show distribution for test
show latenciesShow latency for namespace that has substrings test or bar.show latencies for test bar
show statistics setShow 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 sindexShow 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 dcShow statistics for XDR datacenters DC1 and DC2show statistics xdr dc for DC1 DC2The two commands accept multiple for modifiers to filter by datacenter.
show statistics xdr namespace and show config xdr namespaceShow statistics for XDR namespace test on DC1show statistics xdr namespace for test DC1The two commands accept two patterns after for: first value for namespace, and second value for datacenter.
show stop-writesShow configured stop-writes for namespace test and set testset.show stop-writes for test testsetThis 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.

CommandPurposeExampleAdditional Notes
show statisticsShow 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.

CommandPurposeExampleAdditional Notes
manage configSet 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|Response
10.0.0.1:3000|ok
10.0.0.2:3000|ok
10.0.0.3:3000|ok
Number of rows: 3

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 */.
Command file example
show config;
info namespace;
// This is a single-line comment
show
statistics;
/* This is a multiple-line comment - line 1
This is multiple-line comment - line 2 */
show statistics like obj;
Feedback

Was this page helpful?

What type of feedback are you giving?

What would you like us to know?

+Capture screenshot

Can we reach out to you?