# Asinfo -v "latencies:" command scope

**URL:** <https://discuss.aerospike.com/t/asinfo-v-latencies-command-scope/11080>\
**Category:** asinfo\
**Created:** [May 8, 2024, 7:33pm UTC](https://discuss.aerospike.com/t/asinfo-v-latencies-command-scope/11080 "2024-05-08T19:33:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alwjoseph](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@alwjoseph](https://discuss.aerospike.com/u/alwjoseph)\
**Post date:** [May 8, 2024, 7:33pm UTC](https://discuss.aerospike.com/t/asinfo-v-latencies-command-scope/11080/1 "2024-05-08T19:33:38Z")

</div>

Is output from asinfo -v “latencies:” command at cluster level or current node level ?

Thanks Alwin

---

<div class="post-metadata">

**Author:** ![pgupta](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/pgupta/32/2351_2.png) [@pgupta](https://discuss.aerospike.com/u/pgupta)\
**Post date:** [May 8, 2024, 10:25pm UTC](https://discuss.aerospike.com/t/asinfo-v-latencies-command-scope/11080/2 "2024-05-08T22:25:14Z")

</div>

![image](https://us1.discourse-cdn.com/flex019/uploads/aerospike/original/2X/f/fd47d9fe2c3e9ff83c3af8764c4c490408aad82c.png)

---

<div class="post-metadata">

**Author:** ![kporter](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kporter/32/515_2.png) [@kporter](https://discuss.aerospike.com/u/kporter)\
**Post date:** [May 8, 2024, 11:43pm UTC](https://discuss.aerospike.com/t/asinfo-v-latencies-command-scope/11080/3 "2024-05-08T23:43:27Z")

</div>

The [`latencies`](https://aerospike.com/docs/server/reference/info?search=latencies&version=7#latencies) info command returns node local information.

---

<div class="post-metadata">

**Author:** ![pgupta](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/pgupta/32/2351_2.png) [@pgupta](https://discuss.aerospike.com/u/pgupta)\
**Post date:** [May 9, 2024, 2:43am UTC](https://discuss.aerospike.com/t/asinfo-v-latencies-command-scope/11080/4 "2024-05-09T02:43:43Z")

</div>

As @kporter said, asinfo `latencies:` returns local node information.

As a big picture, latency data is collected at each node for the transactions it is processing. If you have a 256 node cluster, it would be arduous to make each node exchange and keep data for all 256 nodes. So, data/metrics are essentially local to the node, can’t recall off-hand if any that are global - perhaps `observed_nodes` in the `roster:` command.

Now, custom applications (i.e. using client Info class) or tools such as asadm or asinfo can query these metrics.

The slide shows two ways to run asinfo. So - asinfo will get data for a node but depends where it is run from. If you run it directly on a standalone machine then it can connect to only one node of the cluster (-h -p args) and get only that node’s data.

```auto
$ asinfo -v "latencies:" -h 172.31.73.11 -p 3000
batch-index:;{test}-read:;{test}-write:msec,0.0,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00;{test}-udf:;{test}-batch-sub-read:;{test}-batch-sub-write:;{test}-batch-sub-udf:;{test}-pi-query:;{test}-si-query:

```

However, if you run it inside the asadm tool’s prompt, you will get data for each node of the cluster.

Below, I have a 3 node cluster where I inserted a few records:

```auto
$ asadm
Seed: [('127.0.0.1', 3000, None)]
Config_file: /home/training/.aerospike/astools.conf, /etc/aerospike/astools.conf
Aerospike Interactive Shell, version 2.22.0

Found 3 nodes
Online: 172.31.70.35:3000, 172.31.73.11:3000, 172.31.75.23:3000

Admin>

```

Go in admin mode by using `enable` command.

```auto
Admin>enable
Admin+> asinfo -v "latencies:"
ip-172-31-3-62.ec2.internal:3000 (172.31.70.35) returned:
batch-index:;{test}-read:;{test}-write:msec,0.0,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00;{test}-udf:;{test}-batch-sub-read:;{test}-batch-sub-write:;{test}-batch-sub-udf:;{test}-pi-query:;{test}-si-query:

ip-172-31-73-11.ec2.internal:3000 (172.31.73.11) returned:
batch-index:;{test}-read:;{test}-write:;{test}-udf:;{test}-batch-sub-read:;{test}-batch-sub-write:;{test}-batch-sub-udf:;{test}-pi-query:;{test}-si-query:

ip-172-31-75-23.ec2.internal:3000 (172.31.75.23) returned:
batch-index:;{test}-read:;{test}-write:msec,0.0,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00;{test}-udf:;{test}-batch-sub-read:;{test}-batch-sub-write:;{test}-batch-sub-udf:;{test}-pi-query:;{test}-si-query:

```

And final variation, if you had a 20 node cluster and really only wanted metrics from a few nodes, for e.g. only 2 out of the 3 nodes here, you can use the with modifier as below:

```auto
Admin+> asinfo -v "latencies:" with 172.31.73.11:3000, 172.31.75.23:3000
ip-172-31-73-11.ec2.internal:3000 (172.31.73.11) returned:
batch-index:;{test}-read:;{test}-write:msec,0.0,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00;{test}-udf:;{test}-batch-sub-read:;{test}-batch-sub-write:;{test}-batch-sub-udf:;{test}-pi-query:;{test}-si-query:

ip-172-31-75-23.ec2.internal:3000 (172.31.75.23) returned:
batch-index:;{test}-read:;{test}-write:msec,0.0,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00;{test}-udf:;{test}-batch-sub-read:;{test}-batch-sub-write:;{test}-batch-sub-udf:;{test}-pi-query:;{test}-si-query:

Admin+>

```
