---
title: "Metrics Command Examples"
description: "Aerospike metrics command examples using asadm and asinfo for service, namespace, set, sindex, and XDR statistics."
---
# Metrics Command Examples
> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
>
> All documentation pages available in markdown.
See the full metrics reference [here](https://aerospike.com/docs/database/reference/metrics).
## Statistics
Statistics is a container for overall database health and service metrics, which can be displayed with [`asadm`](https://aerospike.com/docs/database/tools/asadm) or [`asinfo`](https://aerospike.com/docs/database/tools/asinfo):
- [asadm](#tab-panel-2382)
- [asinfo](#tab-panel-2383)
```plaintext
asadm -e 'show statistics service'
```
```plaintext
asinfo -v 'statistics' -l
```
### Namespace
Namespace contains health metrics for a particular namespace:
- [asadm](#tab-panel-2384)
- [asinfo](#tab-panel-2385)
All namespace statistics
```plaintext
asadm -e 'show statistics namespace'
```
Specific namespace statistics
```plaintext
asadm -e 'show statistics namespace for '
```
All namespaces
```plaintext
asinfo -v 'namespaces' -l
```
Specific namespace statistics
```plaintext
asinfo -v 'namespace/' -l
```
### Set statistics
- [asadm](#tab-panel-2386)
- [asinfo](#tab-panel-2387)
All set statistics
```plaintext
asadm -e 'show statistics set'
```
Set statistics for a specific namespace
```plaintext
asadm -e 'show statistics set for '
```
Specific set statistics for a specific namespace
```plaintext
asadm -e 'show statistics set for for '
```
All set statistics
```plaintext
asinfo -v 'sets' -l
```
Set statistics for a specific namespace
```plaintext
asinfo -v 'sets/' -l
```
Specific set statistics for a specific namespace
```plaintext
asinfo -v 'sets//' -l
```
### Secondary index statistics
- [asadm](#tab-panel-2388)
- [asinfo](#tab-panel-2389)
All secondary index statistics
```plaintext
asadm -e 'show statistics sindex'
```
Secondary index statistics for a specific namespace
```plaintext
asadm -e 'show statistics sindex for '
```
Secondary index statistics for a specific secondary index in a specific namespace. Partial names can be used instead of full names
```plaintext
asadm -e 'show statistics sindex for for '
```
All secondary index statistics
```plaintext
asinfo -v 'sindex' -l
```
Secondary index statistics for a specific namespace
```plaintext
asinfo -v 'sindex/' -l
```
Secondary index statistics for a specific secondary index in a specific namespace Partial names can be used instead of full names
```plaintext
asinfo -v 'sindex//' -l
```
## XDR
XDR includes health and service metrics for Cross-Datacenter Replication.
Do not use the XDR statistics to verify if a namespace is enabled. XDR statistics are still displayed even if the namespace is not currently enabled. After the namespace is enabled, gathering of statistics resumes where it had left off.
There are no independent namespace-level XDR statistics.
Statistics are per-datacenter or per-datacenter/per-namespace.
- [asadm](#tab-panel-2390)
- [asinfo](#tab-panel-2391)
Display XDR statistics for an entire datacenter:
```plaintext
asadm -e 'show statistics xdr for '
```
Display XDR statistics for an entire datacenter:
```plaintext
asinfo -v 'get-stats:context=xdr;dc=' -l
```
Display XDR statistics for a specific namespace:
```plaintext
asinfo -v 'get-stats:context=xdr;dc=;namespace=' -l
```