If you like BoxMatrix then please contribute Supportdata, Supportdata2, Firmware and/or Hardware (get in touch).
My metamonk@yahoo.com is not reachable by me since years. Please use hippie2000@webnmail.de instead.

0
U

Property:latencyd (avmcmd)

From BoxMatrix


BoxMatrix >> Shell-Commands >> latencyd (avmcmd) @ BoxMatrix   -   IRC-Chat   -   Translate: de es fr it nl pl
News Selectors Models Accessories Components Environment Config Commands System Webif Software Develop Lexicon Community Project Media

Startup-Scr Hotplug-Scr BusyBox-Cmds Bash-Cmds AVM-Cmds Chipset-Cmds Linux-Cmds Shared-Libs Kernel-Mods Research

Info
  
Name-Collision - multiple objects in this wiki use the name latencyd!
latencyd (avmcmd) WAN / LAN / neighbour Flow Latency Monitoring daemon.
latencyd (process) WAN / LAN / neighbour Flow Latency Monitoring daemon.
latencyd (watchdog) WAN / LAN / neighbour Flow Latency Monitoring daemon.

AVM-Command

Goto:   Endpoints  -  Events  -  Logs  -  Source  -  Dependencies   -   Model-Matrix   -   Symbols   -   SMW-Browser

Details

latencyd is the WAN / LAN / neighbour Flow Latency Monitoring daemon.

Communication in a network is called a flow, regardless of the protocol. It has a beginning and an end, and the time between
is called latency. The round trip time of a ping sums up the latency of each router and switch the ICMP packet has to pass,
in both directions, so 2 flows. For finding bottlenecks in a network more finegrained latency monitoring is required.

latencyd permits to measure the latency of a local fragment of a flow, either the time it takes to pass a local interface
(WAN / LAN) or the time it takes to reach a specific neighbour in the LAN (MAC address). While a ping is typically measured
in milliseconds, flow latency is measured in microseconds.

Interface latency monitoring is performed by libklatd.so which installs a monitoring callback in the routing core kdsldmod.ko.
Neighbour discovery is done by libneighbour.so. How the latency for each neighbour is measured is subject to research.

latencyd is also a KPI provider creating a JSON KPI from the collected data.

KPI (Key Performance Indicators) are a collection of sensor values like they are required for professional system monitoring.
Many services collect sensor data and generate KPI and starting with fw 7.39 FRITZ!OS implements metering in avmcounterd.
KPI are sent as IPC messages with attached JSON data to ctlmgr which serves the me_KPI.ctl IPC endpoint for this purpose.
Explained KPI providers: aha, kpid, psetd (kpi), voipkpid (libvoipkpi.so), latencyd..

Besides KPI there is also the latencyd.support.sh plugin adding the latencyd log and latency information to supportdata.

Endpoints

aicmd endpoint(s) provided by latencyd, with these functions: (fw 7.70)

root@fritz:/var/mod/root# aicmd latencyd

# provided by latencyd: - fw 7.70+

HELP                                     - show help
SLABDUMP                                 - show slab allocation
SLABSHOW                                 - show slab information
QUIT                                     - disconnect

add <latency> <INADDR>                   - add latency data to a neighbour by inaddr

show neighbour <MAC>                     - show latencies of a specific neighbour
show neighbours                          - show latencies of all neighbours
show neighbours limited                  - show latencies of a limited set of neighbours
show lan                                 - show lan latencies
show wan                                 - show wan latencies
show status                              - show status
 
# provided by latencyd: - fw 7.90+

show usp [wan|lan]                       - show wan and or lan usp output

# provided by libewnwlinux.so: - fw 7.01+

ewnwlinux show csockshell                - show shells running
ewnwlinux show genetlink                 - show gerneric netlink families

# provided by libewnwlinux.so: - fw 7.90+

ewnwlinux netlink show                   - show internal information
ewnwlinux netlink getroute [address]     - get route for inet address
ewnwlinux netlink interfaces             - show interfaces
ewnwlinux netlink routes [ 4 | 6 ]       - show routes

# provided by libavmcsock.so: - fw 7.01+

avmcsock show csock                      - show all csock
avmcsock show dnsconfig                  - show all dns context
avmcsock show timercb                    - show all timer
avmcsock show debughandles               - show all debughandles
avmcsock show cprocess                   - show all processes
avmcsock set debug                       - set debug flags

# provided by libavmcsock.so: - fw 7.29+

avmcsock show cbcontext                  - show all cbdata
avmcsock show daemon                     - show daemon status
avmcsock show cbuf                       - show cbuf status

# provided by libavmcsock.so: - fw 7.39+

avmcsock getsymbol <address>             - get symbol for address
avmcsock show dnsglobal                  - show all dns global values
avmcsock show dnscache                   - show cache
avmcsock show dnsqueries                 - show all pending queries
avmcsock show avmipc [endpoint shmatch]  - show avmipc events and states
avmcsock ctimer show                     - show all timer
avmcsock ctimer overview                 - show ctimer overview
avmcsock iotrace format unctrl|hexdump   - set format for csock iotrace
avmcsock iotrace file                    - enable iotrace to file
avmcsock iotrace enable                  - enable iotrace via debugmsg
avmcsock iotrace disable                 - disable iotrace
avmcsock iotrace match help|<match>      - show allowed matches or set match
avmcsock iotrace reset                   - remove all matches
avmcsock iotrace show                    - show configuration

# provided by libavmcsock.so: - fw 7.90+

avmcsock show signals                    - show signal handler
avmcsock show connector [cache|stats]    - show connector information
avmcsock show clogger                    - show clogger information
avmcsock set clogmod [ <module> [ '.' <submodule ] ... ] [ '=' <level> ]
                                         - set clogmod log level
avmcsock slab check                      - red zone/free check
avmcsock slab reap [heavy]               - call slab_reap/slab_reap_heavy
avmcsock slab dump [long]                - show slab allocation
avmcsock slab show                       - show slab information
avmcsock slab ewma [show|activate|deactivate|reset]
                                         - show average allocates/freed per second
avmcsock avmipc notifier [endpoint shmatch]
                                         - show registered notifier
avmcsock avmipc set [endpoint shmatch]   - show states/events sent
avmcsock avmipc csv [endpoint shmatch]   - show states/events sent and listing as csv

Logs

This is a subset of the Temp-Files section, filtered for logfiles of latencyd:

Daily updated index of all latencyd logfiles found scanning Supportdata-Probes. Last update: 2024-04-28 06:36 GMT.
The label (temp) in the Logfile column shows there are other objects in this wiki using this name.
The Mod column shows the amount of models using the respective logfile. Click the column header to sort by this number.

Source

The names of source files compiled into an executable often help to understand function blocks (and show gaps in the docs).
fw 7.70 source files:

$ strings /sbin/latencyd | grep -e '\.c$' -e '\.cpp$'

ar7/latencyd/latencyd_util.c
ar7/latencyd/latencyd_aicmd.c
ar7/latencyd/latency_measurement.c
ar7/latencyd/latency_aggregator.c
ar7/latencyd/latency_neighbour_info.c  

Dependencies

Daily updated index of all dependencies of this command. Last update: 2024-04-28 07:29 GMT.
A * in the Mod column marks info from Supportdata-Probes, which will always stay incomplete.

Relation Typ Object Mod Firmware Info Origin
Started by serv latencyd.service 15 7.60 - 7.90 supervisor service for latencyd. AVM
Runs as proc latencyd (process) 2* 7.80 - 7.90 WAN / LAN / neighbour Flow Latency Monitoring daemon. AVM
Registers wdog latencyd (watchdog) 2* 7.80 - 7.90 WAN / LAN / neighbour Flow Latency Monitoring daemon. AVM
Serving sock me_latency_aggregator.ctl 1* 7.90 avmipc endpoint of latencyd AVM
Serving sock me_latencyd.ctl 2* 7.80 - 7.90 avmipc_command endpoint of latencyd AVM
Serving sock me_latencyd_aicmd.ctl 1* 7.90 avmipc endpoint of latencyd AVM
Depends on lib ld.so 3 7.70 - 7.90 Dynamic linker / loader Linux
Depends on lib libar7cfg.so 12 7.90 TFFS-Configuration API to ar7.cfg and many more. AVM
Depends on lib libavmauth.so 15 7.60 - 7.90 Fritzbox authentification helpers AVM
Depends on lib libavmcipher.so 12 7.90 AES / DES / Rijndael encryption / decryption. AVM
Depends on lib libavmcsock.so 15 7.60 - 7.90 Networking, I/O and helper functions AVM
Depends on lib libavmfbstate.so 15 7.60 - 7.90 IPC fritzbox state notification AVM
Depends on lib libavmhmac.so 15 7.60 - 7.90 HMAC / SHA / MD5 hashing. AVM
Depends on lib libavmwdt.so 14 7.60 - 7.90 AVM-Watchdogs management API AVM
Depends on lib libboxenv.so 12 7.90 API to the rc.conf enhanced Config-Environment AVM
Depends on lib libboxlib.so 15 7.60 - 7.90 Box status, logging and statistics functions AVM
Depends on lib libc.so 15 7.60 - 7.90 Standard C library Linux
Depends on lib libcore.so 14 7.60 - 7.90 Collects the MAC addresses of the device it's running on AVM
Depends on lib libcrypto.so 15 7.60 - 7.90 OpenSSL general crypto and X.509 library Linux
Depends on lib libdl.so 7 7.70 - 7.90 Dynamic linking library Linux
Depends on lib libdputil.so 12 7.90 DataPipe / packet utilities AVM
Depends on lib libewnwjson.so 12 7.90 JSON helper functions AVM
Depends on lib libewnwlinux.so 15 7.60 - 7.90 Linux networking functions AVM
Depends on lib libewnwnet.so 15 7.60 - 7.90 Internet helper functions AVM
Depends on lib libfbconf.so 14 7.60 - 7.90 API to hardcoded fbconf.cfg AVM
Depends on lib libjuisclient.so 12 7.90 Update-Search - second generation - JUIS AVM
Depends on lib libklatd.so 15 7.60 - 7.90 WAN Flow Latency Monitoring API AVM
Depends on lib liblocalize.so 12 7.90 Charset conversion helper functions AVM
Depends on lib libm.so 7 7.70 - 7.90 C math library Linux
Depends on lib libneighbour.so 15 7.60 - 7.90 Neighbour discovery and notification API AVM
Depends on lib liboauth2.so 12 7.90 OAuth v2.0 authentificator Linux
Depends on lib libpthread.so 7 7.70 - 7.90 POSIX threading library Linux
Depends on lib librt.so 7 7.70 - 7.90 POSIX realtime extensions library Linux
Depends on lib libslab_c++.so 12 7.90 C++ slab allocator AVM
Depends on lib libsvctl.so 15 7.60 - 7.90 supervisor notification library AVM
Depends on lib libtiinterpreter.so 15 7.60 - 7.90 Preprocessor for SSI-Files by TI. AVM
Depends on lib libwdt.so 4 7.70 - 7.80 AVM-Watchdogs management API AVM
Depends on lib libwebkpiclient.so 15 7.60 - 7.90 KPI sensor for system parts which use HTTP / HTTPS AVM
Depends on lib libwebsrv.so 15 7.60 - 7.90 HTTP / HTTPS webserver and tools. AVM
Depends on lib libyajl.so 15 7.60 - 7.90 Event-driven JSON parser Linux
Depends on lib libz.so 15 7.60 - 7.90 Zlib compressor / decompressor Linux
41 dependencies for this command

Model-Matrix

Daily updated index of the presence, path and size of this command for each model. Last update: 2024-04-28 05:07 GMT.
Showing all models using this command. Click any column header (click-wait-click) to sort the list by the respective data.
The (main/scrpn/boot/arm/prx/atom) label in the Model column shows which CPU is meant for models with multiple Linux instances.
Note that this list is merged from Firmware-Probes of all known AVM firmware for a model, including Recovery.exe and Labor-Files.

Model Firmware Path Size
FRITZ!Box 5530 Fiber (main) 7.70 - 7.80 /sbin 45.3k
FRITZ!Box 5590 Fiber (arm) 7.70 - 7.90 /sbin 29.9k - 33.9k
FRITZ!Box 5690 Pro (arm) 7.60 /sbin 29.9k
FRITZ!Box 6591 Cable (arm) 7.90 /sbin 38.1k
FRITZ!Box 6591 Cable (atom) 7.90 /sbin 38.1k
FRITZ!Box 6660 Cable (arm) 7.90 /sbin 38.1k
FRITZ!Box 6660 Cable (atom) 7.90 /sbin 38.1k
FRITZ!Box 6690 Cable (arm) 7.90 /sbin 38.1k
FRITZ!Box 6690 Cable (atom) 7.90 /sbin 38.1k
FRITZ!Box 6850 LTE 7.90 /sbin 33.9k
FRITZ!Box 6850 5G 7.90 /sbin 33.9k
FRITZ!Box 7530 AX 7.70 - 7.90 /sbin 34.1k
FRITZ!Box 7590 7.90 /sbin 45.4k - 49.4k
FRITZ!Box 7590 AX 7.70 - 7.90 /sbin 45.3k - 49.4k
FRITZ!Box 7690 7.60 /sbin 29.9k
15 models use this command

Symbols

Daily updated index of all symbols of this command. Last update: 2024-04-28 07:29 GMT.

Firmware Symbol
7.70 - 7.90 latency_aggregator_append_lan_measurement
7.70 - 7.90 latency_aggregator_append_wan_measurement
7.70 - 7.90 latency_aggregator_ctx_alloc
7.70 - 7.90 latency_aggregator_ctx_free
7.70 - 7.90 latency_aggregator_dump_neighbour
7.70 - 7.90 latency_aggregator_dump_neighbours
7.70 - 7.90 latency_aggregator_find_lan_measurement
7.70 - 7.90 latency_aggregator_find_wan_measurement_by_dsliface
7.70 - 7.90 latency_aggregator_free_wan_measurement
7.70 - 7.90 latency_aggregator_lan2json
7.70 - 7.90 latency_aggregator_reset_lan_measurements
7.70 - 7.90 latency_aggregator_reset_neighbour_measurements
7.70 - 7.90 latency_aggregator_reset_wan_measurements
7.70 - 7.90 latency_aggregator_wan2json
7.70 - 7.90 latency_info_received_cb
7.70 - 7.90 latency_link_type2str
7.70 - 7.90 latency_measurement_alloc
7.70 - 7.90 latency_measurement_bucket2str
7.70 - 7.90 latency_measurement_bucket_has_value
7.70 - 7.90 latency_measurement_find_bucket
7.70 - 7.90 latency_measurement_free
7.70 - 7.90 latency_measurement_get_total_bucket_cnt
7.70 - 7.90 latency_measurement_reset
7.70 - 7.90 latency_measurment_cfgs2bucket_size
7.70 - 7.90 latency_neighbour_info_alloc
7.70 - 7.90 latency_neighbour_info_dump
7.70 - 7.90 latency_neighbour_info_free
7.70 - 7.90 latency_neighbour_info_set_current_path
7.70 - 7.90 latency_path_init
7.70 - 7.90 latency_path_links2header
7.70 - 7.90 latency_path_links2str
7.70 - 7.90 latency_util_reset_all_measurements
7.70 - 7.90 latency_util_validate_wan_measurements
7.70 - 7.90 latencyd_aicmd_exit
7.70 - 7.90 latencyd_aicmd_init
7.70 - 7.90 latencyd_util_update_kpi
7.70 - 7.90 main
37 symbols for this command

SMW-Browser

Information is currently being retrieved from the backend.