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 september. Please use hippie2000@webnmail.de instead.

0
U

Property:kpid (avmcmd)

From BoxMatrix


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 Gallery

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 kpid!
kpid (avmcmd) Kernel KPI collector daemon.
kpid (process) Kernel KPI collector daemon.
kpid (watchdog) Kernel KPI collector daemon.

AVM-Command

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)..

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-02-02 10:39 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.50 avmipc endpoint to trigger KPI creation by kpid AVM
Listens to avmipc KPI_PRE_INFORM_NOTIFY 15** 7.29 - 7.51 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: 2023-02-02 07:26 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 - 7.51 supervisor service for kpid. AVM
Runs as proc kpid (process) 49* 7.08 - 7.50 Kernel KPI collector daemon. AVM
Registers wdog kpid (watchdog) 49* 7.08 - 7.50 Kernel KPI collector daemon. AVM
Serving sock me_kpid.ctl 49* 7.08 - 7.50 avmipc endpoint to trigger KPI creation by kpid AVM
Depends on lib ld.so 47 7.08 - 7.51 Dynamic linker / loader Linux
Depends on lib libavmcsock.so 66 7.08 - 7.51 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 66 7.08 - 7.51 Box status, logging and statistics functions AVM
Depends on lib libc.so 66 7.08 - 7.51 Standard C library Linux
Depends on lib libewnwlinux.so 32 7.39 - 7.51 Linux networking functions AVM
Depends on lib libwdt.so 64 7.08 - 7.31 AVM-Watchdogs management API AVM
Depends on lib libyajl.so 66 7.08 - 7.51 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: 2023-02-02 06:01 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 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 - 7.39 /sbin 9.7k - 13.4k
FRITZ!Box 4060 7.26 - 7.39 /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 - 7.30 /sbin 13.9k
FRITZ!Box 5590 Fiber (arm) 7.27 - 7.39 /sbin 13.2k - 13.3k
FRITZ!Box 6430 Cable (arm) 7.10 - 7.29 /sbin 8.7k - 13.2k
FRITZ!Box 6430 Cable (atom) 7.10 - 7.29 /sbin 9.6k - 13.2k
FRITZ!Box 6490 Cable (arm) 7.08 - 7.39 /sbin 8.7k - 13.2k
FRITZ!Box 6490 Cable (atom) 7.08 - 7.39 /sbin 9.5k - 13.2k
FRITZ!Box 6590 Cable (arm) 7.08 - 7.39 /sbin 8.7k - 13.2k
FRITZ!Box 6590 Cable (atom) 7.08 - 7.39 /sbin 9.5k - 13.2k
FRITZ!Box 6591 Cable (arm) 7.08 - 7.39 /sbin 9.5k - 17.4k
FRITZ!Box 6591 Cable (atom) 7.08 - 7.39 /sbin 9.5k - 17.4k
FRITZ!Box 6660 Cable (arm) 7.14 - 7.39 /sbin 9.5k - 17.4k
FRITZ!Box 6660 Cable (atom) 7.14 - 7.39 /sbin 9.5k - 17.4k
FRITZ!Box 6690 Cable (arm) 7.28 - 7.50 /sbin 9.6k - 17.4k
FRITZ!Box 6690 Cable (atom) 7.28 - 7.50 /sbin 13.3k - 17.4k
FRITZ!Box 6820 LTE v1 7.08 - 7.29 /sbin 10.1k - 14.1k
FRITZ!Box 6820 LTE v2 7.08 - 7.29 /sbin 10.1k - 14.1k
FRITZ!Box 6820 LTE v3 7.19 - 7.29 /sbin 14.1k
FRITZ!Box 6850 LTE 7.21 - 7.39 /sbin 13.3k - 14.0k
FRITZ!Box 6850 5G 7.24 - 7.39 /sbin 13.3k - 13.4k
FRITZ!Box 6890 LTE 7.08 - 7.39 /sbin 10.9k - 14.0k
FRITZ!Box 6890 LTE v1 7.08 - 7.39 /sbin 10.9k - 14.0k
FRITZ!Box 6890 LTE v2 7.08 - 7.39 /sbin 10.9k - 14.0k
FRITZ!Box 7362 SL 7.08 - 7.13 /sbin 10.3k
FRITZ!Box 7430 7.08 - 7.29 /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 - 7.39 /sbin 13.3k
FRITZ!Box 7520 7.08 - 7.50 /sbin 9.7k - 13.4k
FRITZ!Box 7520 v2 (arm) 7.30 - 7.50 /sbin 13.3k - 13.4k
FRITZ!Box 7530 7.08 - 7.51 /sbin 9.7k - 13.4k
FRITZ!Box 7530 AX 7.20 - 7.39 /sbin 13.4k - 13.5k
FRITZ!Box 7560 7.08 - 7.29 /sbin 10.9k - 13.9k
FRITZ!Box 7580 7.08 - 7.29 /sbin 10.9k - 13.9k
FRITZ!Box 7581 7.08 - 7.16 /sbin 10.3k
FRITZ!Box 7582 7.08 - 7.16 /sbin 10.3k
FRITZ!Box 7583 7.10 - 7.31 /sbin 11.1k - 13.9k
FRITZ!Box 7583 VDSL 7.19 - 7.31 /sbin 13.9k
FRITZ!Box 7590 7.08 - 7.51 /sbin 10.7k - 14.0k
FRITZ!Box 7590 AX 7.19 - 7.39 /sbin 13.9k - 14.0k
FRITZ!WLAN Repeater 310 A 7.08 - 7.15 /sbin 10.3k
FRITZ!WLAN Repeater 310 B 7.08 - 7.15 /sbin 10.3k
FRITZ!WLAN Repeater 450E 7.10 - 7.14 /sbin 10.3k
FRITZ!Repeater 600 7.11 - 7.29 /sbin 10.3k - 14.1k
FRITZ!Repeater 600 v2 7.19 - 7.30 /sbin 14.1k
FRITZ!WLAN Repeater 1160 7.08 - 7.14 /sbin 10.3k
FRITZ!Repeater 1200 7.11 - 7.29 /sbin 9.9k - 13.3k
FRITZ!Repeater 1200 AX 7.27 - 7.39 /sbin 13.3k
FRITZ!WLAN Repeater 1750E 7.08 - 7.30 /sbin 10.1k - 14.1k
FRITZ!Repeater 2400 7.12 - 7.50 /sbin 10.3k - 14.1k
FRITZ!Repeater 3000 7.08 - 7.39 /sbin 9.7k - 13.4k
FRITZ!Repeater 3000 AX 7.39 - 7.41 /sbin 13.3k
FRITZ!Repeater 6000 7.19 - 7.39 /sbin 13.2k - 13.3k
FRITZ!Powerline 540E 7.08 - 7.14 /sbin 10.3k
FRITZ!Powerline 546E 7.10 /sbin 10.3k
FRITZ!Powerline 1240E 7.10 - 7.14 /sbin 10.3k
FRITZ!Powerline 1260E 7.08 - 7.29 /sbin 9.0k - 13.3k
FRITZ!Powerline 1260 7.27 - 7.29 /sbin 13.3k
FRITZ!Smart Gateway 7.39 - 7.51 /sbin 13.3k
66 models use this command

Symbols

Daily updated index of all symbols of this command. Last update: 2023-02-02 07:26 GMT.

Firmware Symbol
7.08 - 7.51 main
1 symbol for this command

SMW-Browser

Information is currently being retrieved from the backend.