Commit Graph

4 Commits

Author SHA1 Message Date
Michael Iedema a6d1ef0d60 stats: use tcp stat names as provided
If an API user has defined a name for this particular
stat, we should consider it unique and not append ip and
port information from the connection.

By appending ip and port information to all tcp stat
names, we end up creating unique stat names every
time a reconnection occurs and the source port changes.
This makes the statistic impossible to track over time
as it is continually using a different name.

A quick example from the field over the course of a
day:

tcp.ipa-rsl-0,r=192.168.55.88.33056<->l=192.168.0.1.3003.tcp.rtt
tcp.ipa-rsl-0,r=192.168.55.88.33311<->l=192.168.0.1.3003.tcp.rtt
tcp.ipa-rsl-0,r=192.168.55.88.35510<->l=192.168.0.1.3003.tcp.rtt
tcp.ipa-rsl-0,r=192.168.55.88.35958<->l=192.168.0.1.3003.tcp.rtt
tcp.ipa-rsl-0,r=192.168.55.88.36110<->l=192.168.0.1.3003.tcp.rtt
tcp.ipa-rsl-0,r=192.168.55.88.39269<->l=192.168.0.1.3003.tcp.rtt
tcp.ipa-rsl-0,r=192.168.55.88.40394<->l=192.168.0.1.3003.tcp.rtt
tcp.ipa-rsl-0,r=192.168.55.88.40397<->l=192.168.0.1.3003.tcp.rtt
tcp.ipa-rsl-0,r=192.168.55.88.42920<->l=192.168.0.1.3003.tcp.rtt
tcp.ipa-rsl-0,r=192.168.55.88.43839<->l=192.168.0.1.3003.tcp.rtt

This change would treat tcp stats like other stats
around the system. A unique name must be set by the
API user. This would let us set a unique name like
the following to avoid the situation above:

bts.0.rsl.0.tcp.rtt

Matching the existing rsl related stats:

bts.0.rsl.delete_ind
bts.0.rsl.ipa_nack
bts.0.rsl.unknown

...they retain a constant name regardless of the underlying
connectivity situation.

Change-Id: Ib04c2f5bfcbd6c19dd87debf1fc053abf0b9bef2
2022-02-24 06:22:55 -08:00
Philipp Maier 42dcbf0c1f stats_tcp: fix stats item identifier
The identifier of stats item STATS_TCP_REORD_SEEN is tcp:sndbuf_limited,
it should be tcp:reord_seen.

Change-Id: If3539ceb570ae784cc9b6567c59da7afd11acf82
Related: OS#5701
2022-01-07 13:40:11 +00:00
Harald Welte c809f4e494 tcp_stats: fix compilation on CentOS 7
This is to fix the following compile error on CentOS 7:

[   74s] stats_tcp.c: In function 'fill_stats':
[   74s] stats_tcp.c:138:15: error: 'struct tcp_info' has no member named 'tcpi_notsent_bytes'
[   74s]        tcp_info.tcpi_notsent_bytes);
[   74s]                ^

Closes: OS#5374
Change-Id: Icde6651baeb0828477dbf540a02b16a1a5f91797
2021-12-24 11:34:18 +01:00
Philipp Maier b1ef8f5f69 select: gather statistics for TCP connections
osmocom applications are deployed in a variety of different situations.
Dependung on the medium that interconnects the network components
unexpected behaviour may occur. To debug problems with the
interconnection between network components it might help to monitor the
health of the related TCP connections.

Change-Id: I1416f95aff2adcf13689646b7574845de169fa3d
Related: SYS#5701
2021-12-23 14:52:15 +00:00