config system

Prev Next

Commands for updating firmware, diagnosing system health, and making tweaks to basic system functions.


show system status

Runs a health check on various aspects of the host machine, and reports back if it finds any potential problems, urgent or not.

show system status

Example output:

[Thu Dec 19 04:18:05 2024] > show system status
fmad fmadlua Dec 18 2024 (/opt/fmadio/bin/fmadiolua /opt/fmadio/bin/system_health.lua )
calibrating...
0 : 2095080684           2.0951 cycles/nsec offset:4.919 Mhz
Cycles/Sec 2095080684.0000 Std:       0 cycle std(  0.00000000) Target:2.10 Ghz
Open fSysStatsMotherboard_t* [/opt/fmadio/status/motherboard:0]
done 0.090949Sec 0.001516Min
[Thu Dec 19 04:18:06 2024] -------------------------------------------
[Thu Dec 19 04:18:06 2024] PASS: system is good health
[Thu Dec 19 04:18:06 2024] -------------------------------------------

This command supports JSON output when run from the shell:

fmadio@fmadio20v3-508:/mnt/store0/develop$ sudo fmadiocli --json "show system status"
fmad fmadlua Dec 18 2024 (/opt/fmadio/bin/fmadiolua --nocal /opt/fmadio/bin/fmadiocli --json show system status )
Disable cycle calibration
[Thu Dec 19 04:26:53 2024] CmdLine [--json]
[Thu Dec 19 04:26:53 2024] JSON [show system status]
fmad fmadlua Dec 18 2024 (/opt/fmadio/bin/fmadiolua /opt/fmadio/bin/system_health.lua )
calibrating...
0 : 2095081442           2.0951 cycles/nsec offset:4.919 Mhz
Cycles/Sec 2095081442.0000 Std:       0 cycle std(  0.00000000) Target:2.10 Ghz
Open fSysStatsMotherboard_t* [/opt/fmadio/status/motherboard:0]
done 0.090371Sec 0.001506Min
{"IsGood":true,"Issues":[]}

Note: this command requires sudo permissions to function correctly.


show system fpga mode

Show what mode the FPGA's capture ports are currently running on.

show system fpga mode

Example output:

[Thu Dec 19 04:18:54 2024] > show system fpga mode
[Thu Dec 19 04:18:54 2024] Current capture port configuration: 2x10G

This command supports JSON output when run from the shell:

fmadio@fmadio20v3-508:/mnt/store0/develop$  fmadiocli --json "show system fpga mode"
fmad fmadlua Dec 18 2024 (/opt/fmadio/bin/fmadiolua --nocal /opt/fmadio/bin/fmadiocli --json show system fpga firmware )
Disable cycle calibration
[Thu Dec 19 04:27:26 2024] CmdLine [--json]
[Thu Dec 19 04:27:26 2024] JSON [show system fpga mode]
{"IsJSON":true,"Status":true,"PortMode":"2x10G"}

config system fpga mode

Change what mode the FPGA’s capture ports are currently running on.

config system fpga mode <capture-2x100G capture-2x40G capture-8x10G>

Example output:

Note: the system must be rebooted after this command is done in order for it to take effect.


show system autocomplete

FMADIO systems feature a small selection of Bash auto-complete scripts to make common operations easier (e.g. LXC start-up/shut-down, stream_cat). This command reports whether these scripts are automatically exported to newly-spawned Bash shells.

show system autocomplete

Example output:

[Thu Dec 19 04:23:02 2024] > show system autocomplete
[Thu Dec 19 04:23:02 2024] Bash auto-complete script self-export is enabled

This command supports JSON output when run from the shell:

fmadio@fmadio20v3-508:/mnt/store0/develop$ fmadiocli --json "show system autocomplete"
fmad fmadlua Dec 18 2024 (/opt/fmadio/bin/fmadiolua --nocal /opt/fmadio/bin/fmadiocli --json show system autocomplete )
Disable cycle calibration
[Thu Dec 19 04:24:38 2024] CmdLine [--json]
[Thu Dec 19 04:24:38 2024] JSON [show system autocomplete]
{"IsJSON":true,"Status":true,"System.AutoComplete":true}

config system autocomplete

FMADIO systems feature a small selection of Bash auto-complete scripts to make common operations easier (e.g. LXC start-up/shut-down, stream_cat). This command changes whether these scripts are automatically exported to newly-spawned Bash shells.

config system autocomplete <true|false>

Example output:

[Thu Dec 19 04:31:47 2024] > config system autocomplete false
[Thu Dec 19 04:31:47 2024] disabled Bash auto-complete rule self-export on host startup

show system firmware

Prints a list of all the firmware images currently uploaded to the system and reports on which image is presently installed.

show system firmware

Example output:

[Thu Dec 19 05:12:53 2024] > show system firmware
[Thu Dec 19 05:13:08 2024] Name                             MD5                              Upload Date            Version                                                  Active
[Thu Dec 19 05:13:08 2024] -----------------------------------------------------------------------------------------------------------------------------------------------------------
[Thu Dec 19 05:13:08 2024] fmadio20v3_20241127_2115.bin     7044385b4bca06d70b61deac1f183e6a 02:22:52 : 2024-Nov-28 fmadio20v3 svn:10356 Build Wed Nov 27 21:15:26 2024       true
[Thu Dec 19 05:13:08 2024] fmadio20v3_20240907_1558.bin     e9717d524afb87151ed7140168146a45 01:31:56 : 2024-Sep-8  fmadio20v3 svn:9927 Build Sat Sep  7 15:58:59 2024
[Thu Dec 19 05:13:08 2024] fmadio20v3_20240824_1100.bin     53f000de9a7d4852caddd103b547b893 00:46:06 : 2024-Sep-3  fmadio20v3 svn:9903 Build Sat Aug 24 11:00:34 2024
[Thu Dec 19 05:13:08 2024] fmadio20v3_20240823_1819.bin     dc41ae9ea52d11039eeed25109550672 23:33:06 : 2024-Aug-23 fmadio20v3 svn:9896 Build Fri Aug 23 18:19:45 2024
[Thu Dec 19 05:13:08 2024] fmadio20v3_20240726_0054.bin     28d3589de8353fdc370276c7284b23d9 05:09:02 : 2024-Jul-26 fmadio20v3 svn:9785 Build Fri Jul 26 00:54:20 2024
[Thu Dec 19 05:13:08 2024] fmadio20v3_20240531_2339.bin     76bc94dead5191c017d9e07a9f1353d2 01:40:22 : 2024-Jun-1  fmadio20v3 svn:9654 Build Fri May 31 23:39:20 2024

This command supports JSON output when run from the shell:

fmadio@fmadio20v3-508:/mnt/store0/develop$ fmadiocli --json "show system firmware"
fmad fmadlua Dec 18 2024 (/opt/fmadio/bin/fmadiolua --nocal /opt/fmadio/bin/fmadiocli --json show system firmware )
Disable cycle calibration
[Thu Dec 19 05:13:39 2024] CmdLine [--json]
[Thu Dec 19 05:13:39 2024] JSON [show system firmware]
{"IsJSON":true,"Status":true,"List":[
{"Name":"fmadio20v3_20241127_2115.bin","MD5":"7044385b4bca06d70b61deac1f183e6a","UploadDate":"02:22:52 : 2024-Nov-28","Version":"fmadio20v3 svn:10356 Build Wed Nov 27 21:15:26 2024","Active":true}
,{"Name":"fmadio20v3_20240907_1558.bin","MD5":"e9717d524afb87151ed7140168146a45","UploadDate":"01:31:56 : 2024-Sep-8","Version":"fmadio20v3 svn:9927 Build Sat Sep  7 15:58:59 2024","Active":false}
,{"Name":"fmadio20v3_20240824_1100.bin","MD5":"53f000de9a7d4852caddd103b547b893","UploadDate":"00:46:06 : 2024-Sep-3","Version":"fmadio20v3 svn:9903 Build Sat Aug 24 11:00:34 2024","Active":false}
,{"Name":"fmadio20v3_20240823_1819.bin","MD5":"dc41ae9ea52d11039eeed25109550672","UploadDate":"23:33:06 : 2024-Aug-23","Version":"fmadio20v3 svn:9896 Build Fri Aug 23 18:19:45 2024","Active":false}
,{"Name":"fmadio20v3_20240726_0054.bin","MD5":"28d3589de8353fdc370276c7284b23d9","UploadDate":"05:09:02 : 2024-Jul-26","Version":"fmadio20v3 svn:9785 Build Fri Jul 26 00:54:20 2024","Active":false}
,{"Name":"fmadio20v3_20240531_2339.bin","MD5":"76bc94dead5191c017d9e07a9f1353d2","UploadDate":"01:40:22 : 2024-Jun-1","Version":"fmadio20v3 svn:9654 Build Fri May 31 23:39:20 2024","Active":false}
]}

Note: this command may take a few seconds to finish; this is normal.


config system firmware upload

Uploads a firmware image to prepare it for installation via config system firmware install.

config system firmware upload <firmware image path>

Example output:

[Tue Jan 21 05:02:19 2025] > config system firmware upload /tmp/fmadio20v3_20250121_0447.bin
fmad fmadlua Jan 18 2025 (/usr/local/bin/fmadiolua /opt/fmadio/bin/firmware_install.lua --upload /tmp/fmadio20v3_20250121_0447.bin )
calibrating...
0 : 2095079390           2.0951 cycles/nsec offset:4.921 Mhz
Cycles/Sec 2095079390.0000 Std:       0 cycle std(  0.00000000) Target:2.10 Ghz
Upload Firmware [/tmp/fmadio20v3_20250121_0447.bin]
mkdir: can't create directory '/mnt/store0/tmp/fw/': File exists
rm: can't remove '/mnt/store0/tmp/fw/*': No such file or directory
Filename [fmadio20v3_20250121_0447]
unpack FW
unpack: [fmadio20v3_20250121_0447.core]
unpack: [fmadio20v3_20250121_0447.kernel]
unpack: [fmadio20v3_20250121_0447.mydata]
unpack: [fmadio20v3_20250121_0447.post.lua]
unpack: [fmadio20v3_20250121_0447.pre.lua]
unpack: [fmadio20v3_20250121_0447.rom.2x10G]
unpack: [fmadio20v3_20250121_0447.rom.2x1G]
unpack: [fmadio20v3_20250121_0447.sign]
unpack: [fmadio20v3_20250121_0447.syslinux.cfg]
unpack: [fmadio20v3_20250121_0447.syslinux.cfg.analytics]
unpack: [fmadio20v3_20250121_0447.tcz]
unpack: [fmadio20v3_20250121_0447.version]
check TCZ
check sign
verify signature
sign: gpg: WARNING: unsafe ownership on homedir `/home/fmadio/.gnupg/'
sign: 01c7069d4f75e710805c52c7bb77acf8  fmadio20v3_20250121_0447.tcz
sign: b6cad8c08e51fd80b412b6c1602af4b4  fmadio20v3_20250121_0447.pre.lua
sign: 634b2950f94cd01dfbc198a9c893c986  fmadio20v3_20250121_0447.post.lua
sign: 45f59a9ab04070abfe4e2f3d86baee45  fmadio20v3_20250121_0447.core
sign: c031628b7d2ff63f09bf5f672ec0d2e2  fmadio20v3_20250121_0447.kernel
sign: 4ce1e64d8528a20ac2e2024f98258985  fmadio20v3_20250121_0447.mydata
sign: gpg: Signature made Tue Jan 21 04:47:58 2025 UTC using RSA key ID 35173534
sign: gpg: checking the trustdb
sign: gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
sign: gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
sign: gpg: Good signature from "fmadio <support@fmad.io>" [ultimate]
Found Signatures:
fmadio20v3_20250121_0447.core : 45f59a9ab04070abfe4e2f3d86baee45  fmadio20v3_20250121_0447.core
fmadio20v3_20250121_0447.kernel : c031628b7d2ff63f09bf5f672ec0d2e2  fmadio20v3_20250121_0447.kernel
fmadio20v3_20250121_0447.mydata : 4ce1e64d8528a20ac2e2024f98258985  fmadio20v3_20250121_0447.mydata
fmadio20v3_20250121_0447.tcz : 01c7069d4f75e710805c52c7bb77acf8  fmadio20v3_20250121_0447.tcz
fmadio20v3_20250121_0447.pre.lua : b6cad8c08e51fd80b412b6c1602af4b4  fmadio20v3_20250121_0447.pre.lua
fmadio20v3_20250121_0447.post.lua : 634b2950f94cd01dfbc198a9c893c986  fmadio20v3_20250121_0447.post.lua
Signatures good
[fmadio20v3_20250121_0447.core ] Expect:(45f59a9ab04070abfe4e2f3d86baee45  fmadio20v3_20250121_0447.core) Calc:(45f59a9ab04070abfe4e2f3d86baee45  fmadio20v3_20250121_0447.core)
[fmadio20v3_20250121_0447.kernel] Expect:(c031628b7d2ff63f09bf5f672ec0d2e2  fmadio20v3_20250121_0447.kernel) Calc:(c031628b7d2ff63f09bf5f672ec0d2e2  fmadio20v3_20250121_0447.kernel)
[fmadio20v3_20250121_0447.mydata] Expect:(4ce1e64d8528a20ac2e2024f98258985  fmadio20v3_20250121_0447.mydata) Calc:(4ce1e64d8528a20ac2e2024f98258985  fmadio20v3_20250121_0447.mydata)
[fmadio20v3_20250121_0447.tcz  ] Expect:(01c7069d4f75e710805c52c7bb77acf8  fmadio20v3_20250121_0447.tcz) Calc:(01c7069d4f75e710805c52c7bb77acf8  fmadio20v3_20250121_0447.tcz)
[fmadio20v3_20250121_0447.pre.lua] Expect:(b6cad8c08e51fd80b412b6c1602af4b4  fmadio20v3_20250121_0447.pre.lua) Calc:(b6cad8c08e51fd80b412b6c1602af4b4  fmadio20v3_20250121_0447.pre.lua)
[fmadio20v3_20250121_0447.post.lua] Expect:(634b2950f94cd01dfbc198a9c893c986  fmadio20v3_20250121_0447.post.lua) Calc:(634b2950f94cd01dfbc198a9c893c986  fmadio20v3_20250121_0447.post.lua)
Firmware is valid
Firmware Copy Took 1.537125 sec
Check fmadio20v3_20250121_0447.core                      Expect:       377505352 Found:       377505352
Check fmadio20v3_20250121_0447.kernel                    Expect:         4286560 Found:         4286560
Check fmadio20v3_20250121_0447.mydata                    Expect:           20210 Found:           20210
Check fmadio20v3_20250121_0447.tcz                       Expect:       124739584 Found:       124739584
Check fmadio20v3_20250121_0447.pre.lua                   Expect:              87 Found:              87
Check fmadio20v3_20250121_0447.post.lua                  Expect:            1033 Found:            1033
Firmware Update Complete
done 23.758962Sec 0.395983Min

config system firmware install

After uploading a firmware image, it is unpacked and ready for installation using this command. Its name can be given, in which case the file at /mnt/system/firmware/<name> will be installed. Alternatively, its absolute path can be given, in which case that path will be used as-is. Note that the new installation will only take affect after rebooting the system.

config system firmware install <firmware image name or path>

Example output:

[Tue Jan 21 05:24:05 2025] > config system firmware install fmadio20v3_20250121_0447.bin
fmad fmadlua Jan 18 2025 (/usr/local/bin/fmadiolua /opt/fmadio/bin/firmware_install.lua --install fmadio20v3_20250121_0447.bin )
calibrating...
0 : 2095081118           2.0951 cycles/nsec offset:4.919 Mhz
Cycles/Sec 2095081118.0000 Std:       0 cycle std(  0.00000000) Target:2.10 Ghz
Install Firmware [fmadio20v3_20250121_0447.bin]
Open fSysCapture_t* [/opt/fmadio/status/capture:0/100]
FW [fmadio20v3] System[fmadio20v3]
PreInstall script [/mnt/system/firmware/fmadio20v3_20250121_0447.pre.lua]
fmad fmadlua Jan 18 2025 (/opt/fmadio/bin/fmadiolua /mnt/system/firmware/fmadio20v3_20250121_0447.pre.lua )
calibrating...
0 : 2095078194           2.0951 cycles/nsec offset:4.922 Mhz
Cycles/Sec 2095078194.0000 Std:       0 cycle std(  0.00000000) Target:2.10 Ghz
PreInstall: pre install script
PreInstall: PREINSTALL_GOOD
done 0.000115Sec 0.000002Min
Copy [cp /mnt/system/firmware/fmadio20v3_20250121_0447.tcz /mnt/system/tce/optional/fmadio20v3_current.tcz]
Copy [cp /mnt/system/firmware/fmadio20v3_20250121_0447.core /mnt/system/boot/fmadio20v3-corepure64.gz]
Copy [cp /mnt/system/firmware/fmadio20v3_20250121_0447.kernel /mnt/system/boot/vmlinuz64]
Copy [cp /mnt/system/firmware/fmadio20v3_20250121_0447.mydata /mnt/system/tce/mydata.tgz]
Copy [cp /mnt/system/firmware/fmadio20v3_20250121_0447.syslinux.cfg /mnt/system/boot/syslinux/syslinux.cfg]
Copy [cp /mnt/system/firmware/fmadio20v3_20250121_0447.rom.2x1G /mnt/system/boot/bitstream.rom.2x1G]
Copy [cp /mnt/system/firmware/fmadio20v3_20250121_0447.rom.2x10G /mnt/system/boot/bitstream.rom.2x10G]
Bitstream Config [2x10G]
Copy [cp /mnt/system/firmware/fmadio20v3_20250121_0447.rom.2x10G /mnt/system/boot/bitstream.rom]
os[sudo /opt/fmadio/bin/bitstream_update.lua --noreboot --write /mnt/system/boot/bitstream.rom]
fmad fmadlua Jan 18 2025 (/opt/fmadio/bin/fmadiolua /opt/fmadio/bin/bitstream_update.lua --noreboot --write /mnt/system/boot/bitstream.rom )
calibrating...
0 : 2095078932           2.0951 cycles/nsec offset:4.921 Mhz
Cycles/Sec 2095078932.0000 Std:       0 cycle std(  0.00000000) Target:2.10 Ghz
cp: '/mnt/system/boot/bitstream.rom' and '/mnt/system//boot/bitstream.rom' are the same file
done 5.038188Sec 0.083970Min
Updating CPU Map
renaming syslinux.cfg files
/mnt/system/firmware/fmadio20v3_20250121_0447.post.lua
fmad fmadlua Jan 18 2025 (/opt/fmadio/bin/fmadiolua /mnt/system/firmware/fmadio20v3_20250121_0447.post.lua )
calibrating...
0 : 2095078408           2.0951 cycles/nsec offset:4.922 Mhz
Cycles/Sec 2095078408.0000 Std:       0 cycle std(  0.00000000) Target:2.10 Ghz
PostInstall: post install script
PostInstall: POSTINSTALL_GOOD
done 0.001593Sec 0.000027Min
Firmware Install Complete
done 8.938474Sec 0.148975Min
[Tue Jan 21 05:24:16 2025] *** Remember to run `sudo reboot` to finalize the installation!

show system cpu

Prints a table of all logical cores on the system and their properties, including what role they have been assigned.

A CPU which is assigned to “fmadio” has affinity to the capture device itself, and if a CPU is described as “belonging to the system” (the right-most column in the table), that means that it is always forced to the “fmadio” assignment.

show system cpu

Example output:

[Sat Jan 18 01:04:10 2025] > show system cpu
[Sat Jan 18 01:04:10 2025] CPU  Core Node Thread           Assignment      System?
[Sat Jan 18 01:04:10 2025] -------------------------------------------------------
[Sat Jan 18 01:04:10 2025] 0    0    0    0                                   no
[Sat Jan 18 01:04:10 2025] 1    1    0    0                  fmadio          yes
[Sat Jan 18 01:04:10 2025] 2    2    0    0                  fmadio          yes
[Sat Jan 18 01:04:10 2025] 3    3    0    0                  fmadio          yes
[Sat Jan 18 01:04:10 2025] 4    4    0    0                  fmadio          yes
[Sat Jan 18 01:04:10 2025] 5    5    0    0                  fmadio          yes
[Sat Jan 18 01:04:10 2025] 6    6    0    0                  fmadio          yes
[Sat Jan 18 01:04:10 2025] 7    7    0    0                  fmadio          yes
[Sat Jan 18 01:04:10 2025] 8    0    0    1                                   no
[Sat Jan 18 01:04:10 2025] 9    1    0    1                                   no
[Sat Jan 18 01:04:10 2025] 10   2    0    1                  fmadio          yes
[Sat Jan 18 01:04:10 2025] 11   3    0    1                                   no
[Sat Jan 18 01:04:10 2025] 12   4    0    1                                   no
[Sat Jan 18 01:04:10 2025] 13   5    0    1                                   no
[Sat Jan 18 01:04:10 2025] 14   6    0    1                  fmadio          yes
[Sat Jan 18 01:04:10 2025] 15   7    0    1                  fmadio          yes
[Sat Jan 18 01:04:10 2025] 16   0    1    0                                   no
[Sat Jan 18 01:04:10 2025] 17   1    1    0                                   no
[Sat Jan 18 01:04:10 2025] 18   2    1    0                                   no
[Sat Jan 18 01:04:10 2025] 19   3    1    0                                   no
[Sat Jan 18 01:04:10 2025] 20   4    1    0                                   no
[Sat Jan 18 01:04:10 2025] 21   5    1    0                                   no
[Sat Jan 18 01:04:10 2025] 22   6    1    0                                   no
[Sat Jan 18 01:04:10 2025] 23   7    1    0                                   no
[Sat Jan 18 01:04:10 2025] 24   0    1    1                                   no
[Sat Jan 18 01:04:10 2025] 25   1    1    1                                   no
[Sat Jan 18 01:04:10 2025] 26   2    1    1                                   no
[Sat Jan 18 01:04:10 2025] 27   3    1    1                                   no
[Sat Jan 18 01:04:10 2025] 28   4    1    1                  fmadio          yes
[Sat Jan 18 01:04:10 2025] 29   5    1    1                  fmadio          yes
[Sat Jan 18 01:04:10 2025] 30   6    1    1                  fmadio          yes

config system cpu

Modify the CPU mapping configuration. strict makes it such that every CPU gives priority to the capture device; relax makes it such that the only CPUs which give priority to the capture device are those for which it is mandatory.

reload is meant for use after manually modifying /opt/fmadio/etc/time.lua; this reloading is done automatically if using strict or relax.

config system cpu <strict|relax|reload>

Example output:

[Tue Jan 21 04:31:50 2025] > config system cpu strict
fmad fmadlua Jan 18 2025 (/usr/local/bin/fmadiolua /opt/fmadio/bin/firmware_install.lua --update-cpumap )
calibrating...
0 : 2095081136           2.0951 cycles/nsec offset:4.919 Mhz
Cycles/Sec 2095081136.0000 Std:       0 cycle std(  0.00000000) Target:2.10 Ghz
Updates the current CPU Mapping
Updating CPU Map
renaming syslinux.cfg files
*** A System reboot is REQUIRED. Please restart (sudo reboot) ***
done 0.027491Sec 0.000458Min
[Tue Jan 21 04:31:52 2025] Successfully updated CPU mapping to strict mode

Note: this command requires sudo permissions to function correctly.

Note: the system must be rebooted after this command is done in order for it to take effect.


config system iopriority

Set how aggressively captured packets get written to disk. strict is the default. balance reduces contention with other processes, but introduces some risk that packets can be lost during periods of very high network traffic.

config system iopriority <strict|balance>

Example output:

[Sat Jan 18 01:07:09 2025] > config system iopriority strict
[Sat Jan 18 01:07:13 2025] Set capture IO priority to strict mode
[Sat Jan 18 01:07:17 2025] > config system iopriority balance
[Sat Jan 18 01:07:17 2025] Set capture IO priority to balance mode