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:supervisor (avmcmd)

From BoxMatrix


BoxMatrix >> Shell-Commands >> supervisor (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 supervisor!
supervisor (avmcmd) systemd alike init and service manager.
supervisor (process) systemd alike init and service manager.
supervisor (watchdog) systemd alike init and service manager.

AVM-Command

Goto:   Syntax  -  Targets  -  Services  -  Source  -  Dependencies   -   Model-Matrix   -   Symbols   -   SMW-Browser

Details

supervisor is a systemd alike init and service manager. Instead of the Startup-Scripts in /etc/init.d it uses a *.service file per daemon and service, located in /lib/systemd/system. supervisor services could be controlled by the svctl command:

svctl stop wifi

which replaces:

/etc/init.d/rc.wlan stop

fw 7.29 help - run without arguments to get gelp:

root@fritz2:/var/mod/root# supervisor

usage: supervisor [OPTION] PATH

Options:
  -c check config folder (implies -s)
  -s abort on config error
  -f run in foreground
  -p print dependencies and exit

Typical supervisor daemon launch in /etc/boot.d/1:

supervisor /lib/systemd/system

Starting with fw 7.39 supervisor activity is logged by svlogd.

Syntax

Format:

supervisor .service and .target definition files use the INI-File format[1].
A text file is splitted in one or more sections, each section containing key = value assignments:

; Comment

[SECTION]
key = value
key = value
...

The syntax of these files is a subset of the systemd.service syntax[2].
For now this article just covers what AVM uses and tested, based on in depth analysis of all Firmware-Probes.
If not specified different everything here is fw 7.19+ when supervisor was introduced.

Sections:

There are 3 valid sections:

  • [Unit]   -   used in .service and .target files
  • [Service]   -   only used in .service files
  • [Install]   -   used in .service and .target files

Dependency-Keys:

Instead of the sequential numerical init.d scripts which could not be parallelized on multi core processors supervisor can simplify complex timing dependencies. supervisor replaces the classical runlevels by groups of services, called targets. Targets can also have timing dependencies and can be grouped to parent targets.

  • Before = <service> | <target>   -   used in [Unit] and [Service] sections
Sequential dependency. Specifies what has to be started before.
Can be a space delimited list of multiple dependencies.
  • After = <service> | <target>   -   used in [Unit] and [Service] sections
Sequential dependency. Specifies what has to be started after.
Can be a space delimited list of multiple dependencies.
  • DefaultDependencies = no   -   used in [Unit] and [Service] sections
Disables the default dependencies.
TODO: name them here.
  • WantedBy = <target>   -   only used in [Install] section
Specifies target group membership. Mandatory to get autostarted by dependency.

Execute-Keys:

Executables to be called on svctl start | stop | reload, and on system boot and shutdown.
These can be binaries / daemons or scripts. AVM also uses the wrappers sh, unless_reboot4update and reboot4update_wrap.

  • ExecStart = <executable>   -   used in [Unit] and [Service] sections
Executed by 'svctl start' and by start of the parent dependency.
  • ExecReload = <executable>   -   only used in [Service] section (fw 7.39+)
Executed by 'svctl reload' and by reload of the parent dependency..
  • ExecStop = <executable>   -   only used in [Service] section
Executed by 'svctl stop' and by stop of the parent dependency..
  • ExecStopPost = <executable>   -   only used in [Unit] section (fw 7.39+)
Executed after ExecStop finished.
AVM only uses it to 'msgsend ctlmgr crashreport' to send Crash-Mail.

Option-Keys:

  • Description = <text>   -   only used in [Unit] section of .target files
Explains the respective target.
  • Type = notify | oneshot | simple   -   used in [Unit] and [Service] sections
Type simple runs ExecStart and the process permanently enters active state, even if it exits.
Type oneshot runs ExecStart and the process enters active state if RemainAfterExit is used, otherwise dead state.
Type notify runs ExecStart and the process notifies supervisor when it's up to enter active state.
In [Service] sections AVM uses 9,4% notify and 90.4% oneshot, the remainder uses simple type.
In [Unit] sections AVM uses 99,9% the oneshot type, the remainder uses notify type.
It's surely a long path but AVM obviously migrates services step by step to notify type using libsvctl.so or 'svctl notify'.
  • RemainAfterExit = yes   -   only used in [Service] section
Influences the behaviour of Type oneshot, only used there, see above.
AVM passes this option to 20% of all oneshot types.
  • Restart = always | on-failure   -   used in [Unit] and [Service] sections (fw 7.27+)
If the process terminates restart it, either always or only if it returned an error.
  • RestartSec = <seconds>   -   used in [Unit] and [Service] sections (fw 7.39+)
Wait the specified time before restarting a terminated process if Restart is enabled.
If specified AVM uses '5' in .service files and '0' in .target files.
  • StartLimitBurst = <retries>   -   only used in [Service] section (fw 7.39+)
The maximum amount of retries of a failed Restart before giving up.
If specified AVM uses '5' in .service files.
  • StartLimitIntervalSec = <seconds>   -   only used in [Service] section (fw 7.39+)
Wait the specified time before retrying a failed Restart.
If specified AVM uses '90' in .service files.
  • EnvironmentFile = <file>   -   only used in [Service] section
Specifies an alternative environment to use for the executed files.
AVM only uses it in many .service files to start with /var/tmp/psupport.data.

Targets

This is a subset of the Static-Configuration section, filtered for *.target files in /lib/systemd/system:

Daily updated index of all supervisor targets found scanning Firmware-Probes . Last update: 2024-04-20 05:53 GMT.
The label (static) in the File column shows there are other objects in this wiki using this name.
The Mod column shows the amount of models using the respective file. Click the column header to sort by this number.
You can hover or click a possible Link in the Type column to see the target of that link.

Services

This is a subset of the Static-Configuration section, filtered for *.service files in /lib/systemd/system:

Daily updated index of all supervisor services found scanning Firmware-Probes . Last update: 2024-04-20 05:53 GMT.
The label (static) in the File column shows there are other objects in this wiki using this name.
The Mod column shows the amount of models using the respective file. Click the column header to sort by this number.
You can hover or click a possible Link in the Type column to see the target of that link.

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 /bin/supervisor | grep -e '\.c$' -e '\.cpp$'

<empty>  

Dependencies

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

Relation Typ Object Mod Firmware Info Origin
Runs as proc supervisor (process) 49* 7.19 - 7.90 systemd alike init and service manager. AVM
Registers wdog supervisor (watchdog) 49* 7.19 - 7.90 systemd alike init and service manager. AVM
Serving sock supervisor.ctrl.socket 49* 7.19 - 7.90 supervisor control socket for svctl AVM
Serving sock supervisor.notify.socket 49* 7.19 - 7.90 supervisor notify socket for svctl / libsvctl.so. AVM
Depends on lib ld.so 33 7.19 - 7.90 Dynamic linker / loader Linux
Depends on lib libavmwdt.so 10 7.59 - 7.90 AVM-Watchdogs management API AVM
Depends on lib libbacktrace.so 67 7.24 - 7.90 Crash handler and logger AVM
Depends on lib libbsd.so 41 7.19 - 7.90 BSD functions lacking on GNU systems BSD
Depends on lib libc.so 69 7.19 - 7.90 Standard C library Linux
Depends on lib libsupervisor.so 61 7.39 - 7.90 Helper functions for supervisor AVM
Depends on lib libsvctl.so 69 7.19 - 7.90 supervisor notification library AVM
Depends on lib libutil.so 41 7.39 - 7.90 Login and logging utils Linux
Depends on lib libwdt.so 63 7.19 - 7.80 AVM-Watchdogs management API AVM
13 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-20 05:16 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.27 - 7.30 /bin 34.0k
FRITZ!Box 3490 (scrpn) 7.27 - 7.30 /bin 34.0k
FRITZ!Box 4020 7.39 /bin 33.6k
FRITZ!Box 4040 7.24 - 7.57 /bin 25.6k - 34.4k
FRITZ!Box 4050 7.57 /bin 25.5k
FRITZ!Box 4060 7.26 - 7.57 /bin 25.5k - 33.6k
FRITZ!Box 5490 (main) 7.27 - 7.29 /bin 34.0k
FRITZ!Box 5490 (scrpn) 7.27 - 7.29 /bin 34.0k
FRITZ!Box 5491 (main) 7.27 - 7.29 /bin 34.0k
FRITZ!Box 5491 (scrpn) 7.27 - 7.29 /bin 34.0k
FRITZ!Box 5530 Fiber (boot) 7.21 - 7.80 /bin 28.0k - 33.8k
FRITZ!Box 5530 Fiber (main) 7.21 - 7.80 /bin 28.0k - 37.7k
FRITZ!Box 5590 Fiber (arm) 7.27 - 7.90 /bin 25.5k - 37.9k
FRITZ!Box 5590 Fiber (boot) 7.27 - 7.80 /bin 28.0k - 33.8k
FRITZ!Box 5590 Fiber (prx) 7.27 - 7.90 /bin 36.0k - 37.9k
FRITZ!Box 5690 Pro (arm) 7.59 /bin 25.5k
FRITZ!Box 5690 Pro (rtl) 7.59 /bin 32.2k
FRITZ!Box 6430 Cable (arm) 7.29 - 7.57 /bin 30.1k - 33.6k
FRITZ!Box 6430 Cable (atom) 7.29 /bin 31.5k
FRITZ!Box 6490 Cable (arm) 7.19 - 7.57 /bin 22.0k - 33.6k
FRITZ!Box 6490 Cable (atom) 7.19 - 7.51 /bin 25.4k - 31.5k
FRITZ!Box 6590 Cable (arm) 7.19 - 7.57 /bin 22.0k - 33.6k
FRITZ!Box 6590 Cable (atom) 7.19 - 7.51 /bin 25.4k - 31.5k
FRITZ!Box 6591 Cable (arm) 7.19 - 7.57 /bin 26.0k - 36.2k
FRITZ!Box 6591 Cable (atom) 7.19 - 7.57 /bin 27.7k - 33.6k
FRITZ!Box 6660 Cable (arm) 7.19 - 7.57 /bin 26.0k - 36.2k
FRITZ!Box 6660 Cable (atom) 7.19 - 7.57 /bin 31.7k - 33.6k
FRITZ!Box 6670 Cable (arm) 7.57 - 7.62 /bin 26.0k - 33.6k
FRITZ!Box 6670 Cable (atom) 7.61 - 7.62 /bin 33.6k
FRITZ!Box 6690 Cable (arm) 7.28 - 7.57 /bin 26.0k - 36.2k
FRITZ!Box 6690 Cable (atom) 7.28 - 7.57 /bin 32.4k - 33.6k
FRITZ!Box 6820 LTE v1 7.19 - 7.51 /bin 28.2k - 34.0k
FRITZ!Box 6820 LTE v2 7.19 - 7.51 /bin 28.2k - 34.0k
FRITZ!Box 6820 LTE v3 7.19 - 7.57 /bin 28.2k - 34.0k
FRITZ!Box 6840 LTE 7.39 /bin 33.6k
FRITZ!Box 6850 LTE 7.21 - 7.58 /bin 25.6k - 37.7k
FRITZ!Box 6850 5G 7.24 - 7.51 /bin 25.6k - 34.4k
FRITZ!Box 6890 LTE 7.21 - 7.51 /bin 31.9k - 37.7k
FRITZ!Box 6890 LTE v1 7.21 - 7.51 /bin 31.9k - 37.7k
FRITZ!Box 6890 LTE v2 7.21 - 7.51 /bin 31.9k - 37.7k
FRITZ!Box 7272 7.39 /bin 33.6k
FRITZ!Box 7430 7.21 - 7.39 /bin 33.5k - 34.0k
FRITZ!Box 7490 (main) 7.19 - 7.57 /bin 28.2k - 34.0k
FRITZ!Box 7490 (scrpn) 7.19 - 7.51 /bin 28.2k - 34.0k
FRITZ!Box 7510 7.30 - 7.57 /bin 25.5k
FRITZ!Box 7520 7.21 - 7.51 /bin 25.6k - 34.4k
FRITZ!Box 7520 v2 (arm) 7.30 - 7.57 /bin 25.6k - 34.4k
FRITZ!Box 7530 7.19 - 7.56 /bin 25.6k - 34.4k
FRITZ!Box 7530 AX 7.20 - 7.90 /bin 25.7k - 35.8k
FRITZ!Box 7560 7.24 - 7.39 /bin 33.6k - 37.7k
FRITZ!Box 7580 7.21 - 7.30 /bin 37.3k - 37.7k
FRITZ!Box 7583 7.21 - 7.57 /bin 36.0k - 37.7k
FRITZ!Box 7583 VDSL 7.19 - 7.31 /bin 37.3k - 37.7k
FRITZ!Box 7590 7.19 - 7.90 /bin 31.9k - 37.7k
FRITZ!Box 7590 AX 7.19 - 7.90 /bin 31.9k - 37.7k
FRITZ!Box 7690 7.59 /bin 25.5k
FRITZ!Smart Gateway 7.39 - 7.59 /bin 25.5k
FRITZ!Repeater 600 7.21 - 7.58 /bin 28.2k - 34.0k
FRITZ!Repeater 600 v2 7.19 - 7.58 /bin 28.2k - 34.0k
FRITZ!Repeater 1200 7.19 - 7.58 /bin 25.6k - 34.4k
FRITZ!Repeater 1200 AX 7.27 - 7.57 /bin 25.5k
FRITZ!WLAN Repeater 1750E 7.29 - 7.39 /bin 33.5k - 34.0k
FRITZ!Repeater 2400 7.19 - 7.58 /bin 28.1k - 34.0k
FRITZ!Repeater 3000 7.19 - 7.58 /bin 25.6k - 34.4k
FRITZ!Repeater 3000 AX 7.39 - 7.57 /bin 25.5k - 33.6k
FRITZ!Repeater 6000 7.19 - 7.57 /bin 25.5k - 33.2k
FRITZ!Powerline 1240 AX 7.51 - 7.57 /bin 25.5k
FRITZ!Powerline 1260E 7.21 - 7.57 /bin 25.6k - 34.4k
FRITZ!Powerline 1260 7.27 - 7.57 /bin 25.6k - 34.4k
69 models use this command

Symbols

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

Firmware Symbol
7.19 - 7.90 config_parse
7.19 - 7.90 config_parse_environment
7.19 - 7.90 config_read_dir
7.19 - 7.90 config_read_environment
7.19 - 7.90 ctrl_cmd_done
7.39 - 7.90 ctrl_events
7.19 - 7.32 ctrl_handle_pkt
7.39 - 7.90 ctrl_init
7.19 - 7.32 ctrl_open_socket
7.39 - 7.90 ctrl_set_events
7.19 - 7.32 ctrl_transaction
7.19 - 7.32 ctrl_transaction_abort
7.19 - 7.32 ctrl_transaction_close
7.19 - 7.32 die
7.39 - 7.90 log_handle
7.39 - 7.90 log_init
7.39 - 7.90 log_init_service
7.39 - 7.90 log_remove_service
7.39 - 7.90 log_set_msg_pending
7.19 - 7.90 main
7.24 - 7.32 memory_compact
7.24 - 7.32 memory_drop_caches
7.24 - 7.32 memory_print_fragmentation
7.19 open_read_close
7.19 - 7.32 read_file
7.27 - 7.30 refresh_timestamp
7.19 - 7.90 service_cmp
7.19 - 7.90 service_create
7.19 - 7.90 service_dependencies_init
7.19 - 7.90 service_detect_cycles
7.19 - 7.90 service_find_name
7.19 - 7.90 service_find_pid
7.19 - 7.90 service_foreach
7.19 - 7.90 service_free
7.19 - 7.90 service_handle_cmd
7.19 - 7.90 service_handle_notify
7.19 - 7.90 service_handle_wstatus
7.39 service_init
7.19 - 7.90 service_print_dependencies
7.39 - 7.90 service_start
7.19 - 7.32 service_state_activating
7.19 - 7.90 service_update_timeout
7.19 - 7.32 timestamp_msec
7.19 - 7.32 vector_create
7.19 - 7.32 vector_free
7.19 - 7.32 vector_pop
7.19 - 7.32 vector_push
7.19 - 7.32 vector_sort
7.19 - 7.32 vector_swap
7.19 - 7.90 wait_events
7.19 - 7.32 watchdog_all_loaded
7.19 - 7.32 watchdog_done
7.19 - 7.32 watchdog_events
7.19 - 7.32 watchdog_fd_init
54 symbols for this command

References

SMW-Browser

Information is currently being retrieved from the backend.