RPT_LINKS missing nodes?

I’m working with a network which has around 90-100 nodes connected at any one time. I want to monitor which nodes are connected and have written a script to subscribe to the RPT_LINKS event.

Tonight there are exactly 90 nodes connected. In my script I receive the RPT_LINKS event with a payload of 69,T..., so there appear to be 69 nodes connected.

To validate that it isn’t my script, I see the same list when I run rpt showvars NNNNNN.

So there appear to be 21 nodes missing.

The topology of the network is rather arbitrary with a handful of hub nodes each taking ~20-30 connections, as well as some offshoot clusters. My understanding is that RPT_LINKS should tell us about all the nodes that are currently connected, whether they are adjacent, or connected to a hub node, or 5 hops away.

Am I missing something? Is there a limit to the number of nodes I can see with RPT_LINKS?

73

Matt

Matt, I am not aware of any ‘limit’ in that reporting stat,
but it could well be that.

You might want to state the version of software you are using and perhaps those that know something better can state it.

Also in advance of that, you might compare the results with

https://stats.allstarlink.org/api/stats/ + node#
ie
https://stats.allstarlink.org/api/stats/29999

Thanks Mike.

I’ve observed this on an ASL3 node:

OS            : Debian GNU/Linux 12 (bookworm)
OS Kernel     : 6.1.0-28-amd64

Asterisk      : 20.10.0+asl3-3.1.0-1.deb12
ASL [app_rpt] : 3.1.0
Full asl-show-version output
$ sudo asl-show-version 
dpkg-query: no packages found matching cockpit*
********** AllStarLink [ASL] Version Info **********

OS            : Debian GNU/Linux 12 (bookworm)
OS Kernel     : 6.1.0-28-amd64

Asterisk      : 20.10.0+asl3-3.1.0-1.deb12
ASL [app_rpt] : 3.1.0

Installed ASL packages :

  Package                         Version
  ==============================  ==============================
  allmon3                         1.4.1-1.deb12
  asl3                            3.6.0-1.deb
  asl3-asterisk                   2:20.10.0+asl3-3.1.0-1.deb12
  asl3-asterisk-config            2:20.10.0+asl3-3.1.0-1.deb12
  asl3-asterisk-modules           2:20.10.0+asl3-3.1.0-1.deb12
  asl3-menu                       1.10-1.deb12
  dahdi                           1:3.1.0-2
  dahdi-dkms                      1:3.4.0-4+asl
  dahdi-linux                     1:3.4.0-4+asl

I see the same thing on another node running ASL Version 2.0.0-beta.6.

Depending on the length of the node list I occasionally see the last node number in the list being truncated (which lead me to scour this network looking for node “55”!), which makes me suspect we are hitting the limit of some buffer. However, if I could the number of nodes in the list that RPT_LINKS gives me, it matches up with the count at the start of the event payload.

Looking again this morning, this is what I can see from rpt showvars:

RPT_LINKS=69,T2167,T53396,T547462,T620131,T55512,T61706,T577817,T64077,T418191,T1999,T46348,T58753,T60148,T63466,T63783,T61578,T40064,T2196,T494130,T48907,T63429,T62169,T63863,T59629,T623770,T632850,T550113,T61739,T620133,T52375,T547487,T286982,T605872,T547482,T602201,T3889266,T555399,T3197638,T567200,T550700,T601630,T601640,T547488,T602020,T547480,T614820,T286980,T605870,T555390,T606530,T60699,T424380,T635660,T605880,T602200,T547489,T51871,T1999,T578103,T578101,T1995,T42434,T50490,T501642,T50982,T546381,T569940,T521391,T5

(I counted them, there are 69. Also note T5 at the end!)

However, if I query the API directly and count links to our hub nodes:

$ cat nodecount.sh 
#!/usr/bin/env bash

NODES=(2167 2196 63061 601040)

t=0
for n in "${NODES[@]}"; do
    c=$(curl -s https://stats.allstarlink.org/api/stats/$n | jq '.stats .data .links | length')
    t=$(( $t + $c ))
done
echo $t
$ ./nodecount.sh 
94

I can see that they are all connected through our dashboards, at most 2 hops away from each other.

In this case I am connected direct to 2167, but cannot see that 63061 or any node connected to it. Likewise, if I connect direct to 63061 I will not see 2167 or any of its adjacent nodes. They are both connected to 2196. I can see 2196 an its adjacent nodes in the list.

yea, that is the beginning of the last entry before it is cut-off.

Must be the limit of a buffer.
Yesterday, I did take the char count and converted that to bits and comes out to something close to 4kbits probably with some overhead. If I did that right.

If it’s a issue you feel strong about, perhaps post it in the request for features or bugs.

Yea, I figured buffer size for that particular one. Initially thought it must be a limitation in the asterisk CLI when the event value is rendered, however it seems to affect the value coming out of the AMI too. From reading rpt_links.c it looks like it should support a string up to 5140 bytes, an order of magnitude longer than the 518 bytes in the example above.

If it was just buffer size though I would expect the first entry in RPT_LINKS (the count) as well as RPT_NUMLINKS to reflect the actual number of nodes connected. At the moment it seems to count adjacent nodes and their adjacent nodes, and possibly even further but not always.

Also I’ve posted about what I’ve observed on app_rpt GitHub issues