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.
Property:kpid (avmcmd)
BoxMatrix >> Shell-Commands >> kpid (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 |
Name-Collision - multiple objects in this wiki use the name kpid!
|
AVM-Command
Command: | kpid (avmcmd) - type Exec | Wiki | Freetz | IPPF | whmf | AVM | Web |
Location: | Shell-Commands >> AVM-Commands - Origin: AVM | ||||||
Path: | Release: /sbin Lab+Rel: /sbin | ||||||
Properties: | Size: 8.7k - 17.5k - Firmware: 7.08 - 8.00 | ||||||
Function: | Kernel KPI collector daemon. |
Goto: Examples - Events - Source - Dependencies - Model-Matrix - Symbols - SMW-Browser
Details
kpid is a kernel KPI collector daemon creating a JSON KPI from data read from the sysfs provided by avm_kpi_test.ko.
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..
fw 7.29 help - run without arguments for help:
root@fritz2:/var/mod/root# kpid usage: kpid [options] options: -p Print all KPIs to stdout and exit -o Oneshot mode: Send KPIs and exit -d Daemon mode: Send KPIs when requested
Examples
In supportdata.basis kpid is called like this:
kpid -p
If the kernel was built with KPI support - CONFIG_AVM_KPI = 'y'
in Kernel-Config - it provides an additional sysfs interface.
It is located at /sys/kernel/kpi
and provides subfolders for hwpa, system and usb. fw 7.29 listing, same for 7.39:
root@fritz:/var/mod/root# ls -lR /sys/kernel/kpi /sys/kernel/kpi: drwxr-xr-x 2 root root 0 Jan 1 01:00 hwpa drwxr-xr-x 4 root root 0 Jan 1 01:00 system drwxr-xr-x 2 root root 0 Jan 1 01:00 usb /sys/kernel/kpi/hwpa: /sys/kernel/kpi/system: drwxr-xr-x 2 root root 0 Jan 1 01:00 chip drwxr-xr-x 2 root root 0 Jan 1 01:00 temperatures /sys/kernel/kpi/system/chip: -r--r----- 1 root root 4096 Jan 1 01:00 value0 -r--r----- 1 root root 4096 Jan 1 01:00 value1 -r--r----- 1 root root 4096 Jan 1 01:00 value2 -r--r----- 1 root root 4096 Jan 1 01:00 value3 -r--r----- 1 root root 4096 Jan 1 01:00 value4 -r--r----- 1 root root 4096 Jan 1 01:00 value5 -r--r----- 1 root root 4096 Jan 1 01:00 value6 -r--r----- 1 root root 4096 Jan 1 01:00 value7 /sys/kernel/kpi/system/temperatures: -r--r----- 1 root root 4096 Jan 2 21:23 Wifi-2.4GHz_avg -r--r----- 1 root root 4096 Jan 2 21:23 Wifi-2.4GHz_max -r--r----- 1 root root 4096 Jan 2 21:23 Wifi-2.4GHz_median -r--r----- 1 root root 4096 Jan 2 21:23 Wifi-2.4GHz_min -r--r----- 1 root root 4096 Jan 2 21:23 Wifi-2.4GHz_variance -r--r----- 1 root root 4096 Jan 2 21:23 Wifi-5GHz_avg -r--r----- 1 root root 4096 Jan 2 21:23 Wifi-5GHz_max -r--r----- 1 root root 4096 Jan 2 21:23 Wifi-5GHz_median -r--r----- 1 root root 4096 Jan 2 21:23 Wifi-5GHz_min -r--r----- 1 root root 4096 Jan 2 21:23 Wifi-5GHz_variance /sys/kernel/kpi/usb:
This is from a 7530 which only has temp sensors if WLAN is enabled, and then per activated band.
From the kernel sensors listed above kpid creates this KPI:
root@fritz:/var/mod/root# kpid -p Section usb: { "sv": "gen/v1", "kpi": { } } Section hwpa: { "sv": "gen/v1", "kpi": { } } Section system: { "sv": "gen/v1", "kpi": { "chip": { "value0": 536873337, "value1": 0, "value2": 63836569, "value3": 1220598016, "value4": 46532015, "value5": 68814352, "value6": 0, "value7": 0 }, "temperatures": { "Wifi-2.4GHz_median": null, "Wifi-2.4GHz_variance": null, "Wifi-5GHz_variance": null, "Wifi-2.4GHz_avg": null, "Wifi-2.4GHz_max": null, "Wifi-2.4GHz_min": null, "Wifi-5GHz_median": null, "Wifi-5GHz_avg": null, "Wifi-5GHz_max": null, "Wifi-5GHz_min": null } } }
kpid does not care about the structure of the sysfs tree, it just maps the entire tree to JSON,
It does not send this KPI automatically, it is subscribed to the KPI_PRE_INFORM_NOTIFY
event in the AVMIPC-Datastore,
by its kpid IPC endpoint, and sends the KPI to ctlmgr on request.
Events
Daily updated index of AVM-Events and AVMIPC-Datastore nodes affecting this command. Last update: 2023-12-10 05:13 GMT.
The owners of Event-Sinks and Event-Sources are manual research, which may be incomplete or even wrong.
A *
in the Mod
column marks info from Supportdata-Probes, which will always stay incomplete.
A **
in the Mod
column marks info from Supportdata2 probes, which by their nature will stay way more incomplete.
A -
in the Mod
column marks manual research, the Firmware
then shows where the item occurs, not the Relation
.
Relation | Typ | Object | Mod | Firmware | Info | Origin |
---|---|---|---|---|---|---|
Endpoint | sock | me_kpid.ctl | 49* | 7.08 - 7.57 | avmipc endpoint to trigger KPI creation by kpid | AVM |
Listens to | avmipc | KPI_PRE_INFORM_NOTIFY | 17** | 7.29 - 7.57 | Trigger event to create KPI. | AVM |
2 event relations for this command |
Source
The names of source files compiled into an executable often help to understand function blocks (and show gaps in the docs).
fw 7.39 source files:
$ strings /sbin/kpi | grep -e '\.c$' -e '\.cpp$' <empty>
Dependencies
Daily updated index of all dependencies of this command. Last update: 2025-01-30 07:37 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 | kpid.service | 56 | 7.19 - 8.00 | supervisor service for kpid. | AVM |
Runs as | proc | kpid (process) | 56* | 7.08 - 8.00 | Process running kpid | AVM |
Registers | wdog | kpid (watchdog) | 56* | 7.08 - 8.00 | Watchdog for kpid | AVM |
Serving | sock | me_kpid.ctl | 56* | 7.08 - 8.00 | avmipc endpoint to trigger KPI creation by kpid | AVM |
Depends on | lib | ld.so | 48 | 7.08 - 8.00 | Dynamic linker / loader | Linux |
Depends on | lib | libavmcsock.so | 72 | 7.08 - 8.00 | Networking, I/O and helper functions | AVM |
Depends on | lib | libbacktrace.so | 4 | 7.08 | Crash handler and logger | AVM |
Depends on | lib | libboxlib.so | 72 | 7.08 - 7.81 | Box status, logging and statistics functions | AVM |
Depends on | lib | libc.so | 72 | 7.08 - 8.00 | Standard C library | Linux |
Depends on | lib | libewnwlinux.so | 44 | 7.39 - 8.00 | Linux networking functions | AVM |
Depends on | lib | libwdt.so | 64 | 7.08 - 7.32 | AVM-Watchdogs management API | AVM |
Depends on | lib | libyajl.so | 72 | 7.08 - 8.00 | Event-driven JSON parser | Linux |
12 dependencies for this command |
Model-Matrix
Daily updated index of the presence, path and size of this command for each model. Last update: 2025-01-30 05:39 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/rtl)
label in the Model
column shows which CPU is meant for Multi-Linux models.
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 3490 (main) | 7.11 - 7.30 | /sbin | 10.3k - 14.1k |
FRITZ!Box 3490 (scrpn) | 7.27 - 7.30 | /sbin | 14.1k |
FRITZ!Box 4040 | 7.08 - 8.00 | /sbin | 9.7k - 13.4k |
FRITZ!Box 4050 | 7.58 - 7.90 | /sbin | 13.3k |
FRITZ!Box 4060 | 7.29 - 7.90 | /sbin | 13.2k - 13.3k |
FRITZ!Box 5490 (main) | 7.12 - 7.29 | /sbin | 10.3k - 14.1k |
FRITZ!Box 5490 (scrpn) | 7.27 - 7.29 | /sbin | 14.1k |
FRITZ!Box 5491 (main) | 7.12 - 7.29 | /sbin | 10.3k - 14.1k |
FRITZ!Box 5491 (scrpn) | 7.27 - 7.29 | /sbin | 14.1k |
FRITZ!Box 5530 Fiber (main) | 7.21 - 8.00 | /sbin | 13.9k - 14.1k |
FRITZ!Box 5590 Fiber (main) | 7.29 - 8.00 | /sbin | 13.2k - 13.3k |
FRITZ!Box 5690 Pro (main) | 7.62 | /sbin | 13.3k |
FRITZ!Box 6430 Cable (arm) | 7.10 - 7.29 | /sbin | 8.7k - 10.1k |
FRITZ!Box 6430 Cable (atom) | 7.10 - 7.29 | /sbin | 9.6k - 13.2k |
FRITZ!Box 6490 Cable (arm) | 7.08 - 7.29 | /sbin | 8.7k - 10.1k |
FRITZ!Box 6490 Cable (atom) | 7.08 - 7.51 | /sbin | 9.5k - 13.2k |
FRITZ!Box 6590 Cable (arm) | 7.08 - 7.29 | /sbin | 8.7k - 10.1k |
FRITZ!Box 6590 Cable (atom) | 7.08 - 7.51 | /sbin | 9.5k - 13.2k |
FRITZ!Box 6591 Cable (arm) | 7.08 - 7.29 | /sbin | 9.6k - 10.2k |
FRITZ!Box 6591 Cable (atom) | 7.08 - 8.00 | /sbin | 9.5k - 17.5k |
FRITZ!Box 6660 Cable (arm) | 7.19 - 7.29 | /sbin | 9.6k |
FRITZ!Box 6660 Cable (atom) | 7.14 - 8.00 | /sbin | 9.5k - 17.5k |
FRITZ!Box 6670 Cable (atom) | 7.61 - 7.90 | /sbin | 17.4k - 17.5k |
FRITZ!Box 6690 Cable (arm) | 7.28 - 7.29 | /sbin | 9.6k |
FRITZ!Box 6690 Cable (atom) | 7.28 - 7.90 | /sbin | 13.3k - 17.5k |
FRITZ!Box 6820 LTE v1 (main) | 7.08 - 7.59 | /sbin | 10.1k - 14.1k |
FRITZ!Box 6820 LTE v2 (main) | 7.08 - 7.59 | /sbin | 10.1k - 14.1k |
FRITZ!Box 6820 LTE v3 (main) | 7.19 - 7.57 | /sbin | 14.1k |
FRITZ!Box 6820 LTE v4 | 7.59 | /sbin | 14.1k |
FRITZ!Box 6850 LTE | 7.21 - 7.90 | /sbin | 13.3k - 14.0k |
FRITZ!Box 6850 5G | 7.24 - 7.90 | /sbin | 13.3k - 13.4k |
FRITZ!Box 6890 LTE (main) | 7.08 - 7.57 | /sbin | 10.9k - 14.0k |
FRITZ!Box 6890 LTE v1 (main) | 7.08 - 7.57 | /sbin | 10.9k - 14.0k |
FRITZ!Box 6890 LTE v2 (main) | 7.08 - 7.57 | /sbin | 10.9k - 14.0k |
FRITZ!Box 7362 SL (main) | 7.08 - 7.18 | /sbin | 10.3k |
FRITZ!Box 7430 (main) | 7.08 - 7.31 | /sbin | 10.3k - 14.1k |
FRITZ!Box 7490 (main) | 7.08 - 7.51 | /sbin | 10.1k - 14.1k |
FRITZ!Box 7490 (scrpn) | 7.19 - 7.29 | /sbin | 14.1k |
FRITZ!Box 7510 | 7.30 - 8.00 | /sbin | 13.3k |
FRITZ!Box 7520 | 7.08 - 8.00 | /sbin | 9.7k - 13.4k |
FRITZ!Box 7520 v2 (main) | 7.30 - 8.00 | /sbin | 13.3k - 13.4k |
FRITZ!Box 7530 | 7.08 - 8.00 | /sbin | 9.7k - 13.4k |
FRITZ!Box 7530 AX | 7.20 - 8.00 | /sbin | 13.4k - 13.6k |
FRITZ!Box 7560 (main) | 7.08 - 7.30 | /sbin | 10.9k - 13.9k |
FRITZ!Box 7580 (main) | 7.08 - 7.30 | /sbin | 10.9k - 13.9k |
FRITZ!Box 7581 | 7.08 - 7.18 | /sbin | 10.3k |
FRITZ!Box 7582 | 7.08 - 7.18 | /sbin | 10.3k |
FRITZ!Box 7583 (main) | 7.10 - 7.59 | /sbin | 11.1k - 14.0k |
FRITZ!Box 7583 VDSL (main) | 7.19 - 8.00 | /sbin | 13.9k - 14.1k |
FRITZ!Box 7590 (main) | 7.08 - 8.00 | /sbin | 10.7k - 14.1k |
FRITZ!Box 7590 AX (main) | 7.19 - 8.00 | /sbin | 13.9k - 14.1k |
FRITZ!Box 7690 | 7.61 - 7.90 | /sbin | 13.3k |
FRITZ!Smart Gateway | 7.52 - 7.63 | /sbin | 13.3k |
FRITZ!WLAN Repeater 310 A | 7.08 - 7.16 | /sbin | 10.3k |
FRITZ!WLAN Repeater 310 B | 7.08 - 7.16 | /sbin | 10.3k |
FRITZ!WLAN Repeater 450E | 7.15 | /sbin | 10.3k |
FRITZ!Repeater 600 | 7.11 - 7.58 | /sbin | 10.3k - 14.1k |
FRITZ!Repeater 600 v2 | 7.27 - 7.58 | /sbin | 14.1k |
FRITZ!WLAN Repeater 1160 | 7.08 - 7.15 | /sbin | 10.3k |
FRITZ!Repeater 1200 | 7.11 - 7.58 | /sbin | 9.9k - 13.4k |
FRITZ!Repeater 1200 AX | 7.30 - 7.58 | /sbin | 13.3k |
FRITZ!WLAN Repeater 1750E | 7.08 - 7.32 | /sbin | 10.1k - 14.1k |
FRITZ!Repeater 2400 | 7.12 - 7.58 | /sbin | 10.3k - 14.1k |
FRITZ!Repeater 3000 | 7.08 - 7.58 | /sbin | 9.7k - 13.4k |
FRITZ!Repeater 3000 AX | 7.41 - 7.58 | /sbin | 13.3k |
FRITZ!Repeater 6000 | 7.19 - 7.58 | /sbin | 13.2k - 13.3k |
FRITZ!Powerline 540E | 7.08 - 7.15 | /sbin | 10.3k |
FRITZ!Powerline 546E | 7.15 | /sbin | 10.3k |
FRITZ!Powerline 1240 AX | 7.57 - 7.58 | /sbin | 13.3k |
FRITZ!Powerline 1240E | 7.16 | /sbin | 10.3k |
FRITZ!Powerline 1260E | 7.08 - 7.58 | /sbin | 9.0k - 13.4k |
FRITZ!Powerline 1260 | 7.27 - 7.58 | /sbin | 13.3k - 13.4k |
72 models use this command |
Symbols
Daily updated index of all symbols of this command. Last update: 2025-01-30 07:37 GMT.
Firmware | Symbol |
---|---|
7.08 - 8.00 | main |
1 symbol for this command |