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:rpc (avmcmd)
BoxMatrix >> Shell-Commands >> rpc (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 rpc!
|
AVM-Command
Command: | rpc (avmcmd) - type Exec | Wiki | Freetz | IPPF | whmf | AVM | Web |
Location: | Shell-Commands >> AVM-Commands - Origin: AVM | ||||||
Path: | Release: /usr/bin Lab+Rel: /usr/bin | ||||||
Properties: | Size: 542 - 17.5k - Firmware: 6.20 - 8.00 | ||||||
Function: | Remote command executer for Puma6 / Puma7 models. |
Goto: Examples - Source - Dependencies - Model-Matrix - Symbols - SMW-Browser
Details
rpc is a remote command executer for Puma6 / Puma7 models, runing the passed command on 'the other' CPU.
Since FRITZ!OS is completely ported to ATOM rpc is installed on the ATOM side to run a command on the ARM CPU.
In early 64xx firmware when FRITZ!OS was running on the ARM rpc was installed there to run a command on the ATOM CPU.
The arguments passed to rpc are launched in a remote sh invocation which redirects its stdin, stdout and stderr back to rpc.
There is no way to do input or output redirection or use piping on the target side. This has to be done on the rpc side.
The error handling is special. The redirection of stderr only works as long as the target command does not fail.
Whenever a command fails the hardcoded string rpc: call failed: file or directory not found
is printed to stdout.
This means redirecting stderr with 2>
only makes sense if the target command prints something to stderr without failing.
This works since dd prints the report to stderr without failing:
root@fritz2:/var/mod/root# rpc dd if=/dev/zero of=/dev/null count=1 1+0 records in 1+0 records out root@fritz2:/var/mod/root# rpc dd if=/dev/zero of=/dev/null count=1 2>/dev/null
Here redirection fails, dd fails on the invalid option and the default error is reported to stdout (not stderr):
root@fritz2:/var/mod/root# rpc dd invalid=2 if=/dev/zero of=/dev/null count=1 2>/dev/null rpc: call failed: file or directory not found
dd did print its help text to stderr on the target side, but it is dropped to report the hardcoded error to stdout.
This means you never get a real error message from the target side unless you use an armconsole.
fw 7.29 help:
root@fritz2:/var/mod/root# rpc -? Usage: rpc remote_command_line rpc [OPTIONS] -- remote_command_line -t SEC timeout SEC seconds -s connect over socket -f="src:tgt" file transfer
There's a limit for the remote_command_line length, if it's exceeded rpc reports:
rpc: ERROR 0x86 (errno 0): remote command line too long, max. size: 4*argc + strlen(argv[0]) + ... + strlen(argv[argc-1]) <= 224
Examples
Let's compare the kernels running both Linux instances in fw 7.29:
root@fritz2:/var/mod/root# uname -a Linux fritz2 2.6.39.4 #1 SMP PREEMPT 2021-06-04 i686 GNU/Linux root@fritz2:/var/mod/root# rpc uname -a Linux FRITZ!Box Cable 2.6.39.4 #1 PREEMPT 2021-06-04 armv6b
Let's peek the ARM Linux acc0 interface from the ATOM Linux in fw 7.29;
root@fritz2:/var/mod/root# rpc ifconfig acc0 acc0 Link encap:Ethernet HWaddr 4A:1B:86:XX:XX:XX inet addr:169.254.1.2 Bcast:0.0.0.0 Mask:255.255.255.252 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2353120 errors:0 dropped:0 overruns:0 frame:0 TX packets:2348476 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:121915139 (116.2 MiB) TX bytes:1012745287 (965.8 MiB)
Source
The names of source files compiled into an executable often help to understand function blocks (and show gaps in the docs).
fw 7.29 source files:
$ strings /usr/bin/rpc | grep -e '\.c$' -e '\.cpp$' src/rexec.c src/message.c
Dependencies
Daily updated index of all dependencies of this command. Last update: 2024-12-21 07:44 GMT.
A *
in the Mod
column marks info from Supportdata-Probes, which will always stay incomplete.
Relation | Typ | Object | Mod | Firmware | Info | Origin |
---|---|---|---|---|---|---|
Depends on | lib | ld.so | 7 | 7.08 - 8.00 | Dynamic linker / loader | Linux |
Depends on | lib | libavmcsock.so | 14 | 6.20 - 8.00 | Networking, I/O and helper functions | AVM |
Depends on | lib | libc.so | 14 | 6.20 - 8.00 | Standard C library | Linux |
Depends on | lib | libgcc_s.so | 3 | 6.20 - 6.110 | GCC low-level runtime library | Linux |
4 dependencies for this command |
Model-Matrix
Daily updated index of the presence, path and size of this command for each model. Last update: 2024-12-21 05:44 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 6430 Cable (arm) | 6.84 - 7.12 | /usr/bin | 9.7k - 13.3k |
FRITZ!Box 6430 Cable (atom) | 6.84 - 7.29 | /usr/bin | 10.5k - 13.2k |
FRITZ!Box 6490 Cable (arm) | 6.20 - 7.19 | /usr/bin | 9.7k - 13.3k |
FRITZ!Box 6490 Cable (atom) | 6.20 - 7.51 | /usr/bin | 10.5k - 13.2k |
FRITZ!Box 6590 Cable (arm) | 6.83 - 7.20 | /usr/bin | 9.7k - 13.3k |
FRITZ!Box 6590 Cable (atom) | 6.83 - 7.51 | /usr/bin | 10.5k - 13.2k |
FRITZ!Box 6591 Cable (arm) | 7.04 - 8.00 | /usr/bin | 11.8k - 17.3k |
FRITZ!Box 6591 Cable (atom) | 7.04 - 8.00 | /usr/bin | 11.8k - 17.4k |
FRITZ!Box 6660 Cable (arm) | 7.14 - 8.00 | /usr/bin | 13.5k - 13.6k |
FRITZ!Box 6660 Cable (atom) | 7.14 - 8.00 | /usr/bin | 13.3k - 17.4k |
FRITZ!Box 6670 Cable (arm) | 7.61 - 7.90 | /usr/bin | 13.5k - 13.6k |
FRITZ!Box 6670 Cable (atom) | 7.61 - 7.90 | /usr/bin | 17.4k - 17.5k |
FRITZ!Box 6690 Cable (arm) | 7.28 - 7.90 | /usr/bin | 13.5k - 13.6k |
FRITZ!Box 6690 Cable (atom) | 7.28 - 7.90 | /usr/bin | 13.3k - 17.4k |
FRITZ!Box Fon WLAN 7390 | /usr/bin | 542 | |
15 models use this command |
Symbols
Daily updated index of all symbols of this command. Last update: 2024-12-21 07:44 GMT.
Firmware | Symbol |
---|---|
7.08 - 7.51 | main |
1 symbol for this command |