Commands for inspecting and configuring push LXC (Linux container) targets.
show push lxc status
Reports on the state of all push LXC targets.
show push lxc status
Example output:
[Sun Jan 26 02:04:41 2025] > show push lxc status
[Sun Jan 26 02:04:41 2025]
[Sun Jan 26 02:04:41 2025] Ring name : Enable : From : Description : Filter Frame : Filter BPF
[Sun Jan 26 02:04:41 2025] ------------------------------------------------+--------+------------+--------------------------------+----------------------+-----------------------------------------------------------------
[Sun Jan 26 02:04:41 2025] market2json_eurex : false : now : : :
[Sun Jan 26 02:04:41 2025] market2json_nasdaq_itch : false : now : : :
[Sun Jan 26 02:04:41 2025] voip_trunk0 : true : now : : :
[Sun Jan 26 02:04:41 2025] ------------------------------------------------+--------+------------+--------------------------------+----------------------+-----------------------------------------------------------------
[Sun Jan 26 02:04:41 2025]
config push lxc add
Create a new push LXC target with a given name. This not only adds an entry to /opt/fmadio/etc/push_lxc.lua
, but also creates a ring buffer file under /opt/fmadio/queue/
. If, for example, the target name is voip
, the name of this ring buffer is /opt/fmadio/queue/lxc_voip
.
config push lxc add <target name>
Example output:
[Sun Jan 26 02:59:25 2025] > config push lxc add voip_trunk1
[Sun Jan 26 02:59:43 2025] Created Ring named [lxc_voip_trunk1]
cycle calibration disabled
null output
RING reset
RING file [/opt/fmadio/queue/lxc_voip_trunk1]
RING[/opt/fmadio/queue/lxc_voip_trunk1 ] Size missmatch 0 12595200
RING[/opt/fmadio/queue/lxc_voip_trunk1 ] Size : 12595200 16777216
RING[/opt/fmadio/queue/lxc_voip_trunk1 ] Version: 0 100
RING[/opt/fmadio/queue/lxc_voip_trunk1 ] version wrong force reset
RING[/opt/fmadio/queue/lxc_voip_trunk1 ] Put:0 0 0x7f1d8c46e000
RING[/opt/fmadio/queue/lxc_voip_trunk1 ] Get:0 0 0x7f1d8c46f000
[Sun Jan 26 02:59:43 2025] created ring [/opt/fmadio/queue/lxc_voip_trunk1]
[Sun Jan 26 02:59:43 2025] New Push LXC target [/opt/fmadio/queue/lxc_voip_trunk1]
config push lxc decap
Enable de-encapsulation for a push LXC target.
config push lxc decap <target name>
Example output:
[Sun Jan 26 03:07:57 2025] > config push lxc decap voip_trunk0
[Sun Jan 26 03:07:58 2025] De-encapsulation enabled for push LXC target [voip_trunk0]
config push lxc del
Delete a push LXC target. Note that this not only removes an entry from /opt/fmadio/etc/push_lxc.lua
, but it also removes the corresponding entry in the ring list from /opt/fmadio/etc/time.lua
.
config push lxc del <target name>
Example output:
[Sun Jan 26 02:59:57 2025] > config push lxc del voip_trunk1
[Sun Jan 26 02:59:57 2025] Deleted Ring named [lxc_voip_trunk1]
[Sun Jan 26 02:59:57 2025] Delete Push LXC target [/opt/fmadio/queue/lxc_voip_trunk1]
config push lxc desc
Attach an arbitrary string - ignored by the system itself - to push target to act as internal documentation.
config push lxc desc <target name> "<description>"
Example output:
[Sun Jan 26 03:48:19 2025] > config push lxc desc voip_trunk0 "g711"
[Sun Jan 26 03:48:23 2025] Set LXC description [/opt/fmadio/queue/lxc_voip_trunk0] to (g711)
config push lxc disable
Sets the push target to get passed over by the LXC push scheduling daemon.
config push lxc disable <target name>
Example output:
[Sun Jan 26 02:58:17 2025] > config push lxc disable voip_trunk0
[Sun Jan 26 02:58:17 2025] Set LXC target [/opt/fmadio/queue/lxc_voip_trunk0] to Disable
config push lxc enable
Sets the push target to get invoked by the LXC push scheduling daemon.
config push lxc enable <target name>
Example output:
[Sun Jan 26 02:58:22 2025] > config push lxc enable voip_trunk0
[Sun Jan 26 02:58:22 2025] Set LXC target [/opt/fmadio/queue/lxc_voip_trunk0] Enable
config push lxc filter-bpf
Add a Berkeley Packet Filter (BPF) to a given push target to dictate which packets get sent to the LXC’s ring buffer.
Note that you cannot use whitespace in the filter unless it is surrounded by double quotation marks. Single quotation marks are not supported.
config push lxc filter-bpf <target name> "<BPF>"
Example output:
[Sun Jan 26 02:57:16 2025] > config push lxc filter-bpf market2json_nasdaq_itch "greater 1024"
[Sun Jan 26 02:57:17 2025] Set LXC target [/opt/fmadio/queue/lxc_market2json_nasdaq_itch] filter bpf to (greater 1024)
config push lxc filter-frame
Add a frame filter to a given push target to dictate which packets get sent to the LXC’s ring buffer.
Note that you cannot use whitespace in the filter unless it is surrounded by double quotation marks. Single quotation marks are not supported.
config push lxc filter-frame <target name> "<frame filter>"
Example output:
[Sun Jan 26 02:56:06 2025] > config push lxc filter-frame market2json_eurex "capture.port==1,2,3"
[Sun Jan 26 02:56:06 2025] Set LXC target [/opt/fmadio/queue/lxc_market2json_eurex] filter frame to (capture.port==1,2,3)
config push lxc from-now
Set a push LXC target to start streaming a capture from the most recent packet, rather than from the very beginning.
In other words, the push will “follow” the capture device as it adds new packets to the end of the stream.
config push lxc from-now <target name>
Example output:
[Sun Jan 26 03:08:56 2025] > config push lxc from-now market2json_nasdaq_itch
[Sun Jan 26 03:08:56 2025] Set LXC target [/opt/fmadio/queue/lxc_market2json_nasdaq_itch] fetch from current capture position
config push lxc from-start
Set a push LXC target to start streaming a capture from the very beginning, rather than from the most recent packet.
config push lxc from-start <target name>
Example output:
[Sun Jan 26 03:08:36 2025] > config push lxc from-start market2json_eurex
[Sun Jan 26 03:08:36 2025] Set LXC target [/opt/fmadio/queue/lxc_market2json_eurex] fetch from start of capture
config push lxc no-decap
Disable de-encapsulation for a push LXC target.
config push lxc no-decap <target name>
Example output:
[Sun Jan 26 03:07:54 2025] > config push lxc no-decap voip_trunk0
[Sun Jan 26 03:07:54 2025] De-encapsulation disabled for push LXC target [voip_trunk0]
config push lxc restart
Restart the push_lxc.lua process and all its child processes, and then wait for them all to be brought back up again.
config push lxc restart
Example output:
[Mon Feb 24 06:27:08 2025] > config push lxc restart
Killing 17663 {push_lxc.lua}
Killing 17731 /opt/fmadio/bin/stream_cat
[Mon Feb 24 06:27:11 2025] Resetting ring /opt/fmadio/queue/lxc_459
[Mon Feb 24 06:27:11 2025] cycle calibration disabled
[Mon Feb 24 06:27:11 2025] RING reset
[Mon Feb 24 06:27:11 2025] RING file [/opt/fmadio/queue/lxc_459]
[Mon Feb 24 06:27:11 2025] null output
[Mon Feb 24 06:27:11 2025] RING[/opt/fmadio/queue/lxc_459 ] Size : 12595200 16777216
[Mon Feb 24 06:27:11 2025] RING[/opt/fmadio/queue/lxc_459 ] Version: 100 100
[Mon Feb 24 06:27:11 2025] RING[/opt/fmadio/queue/lxc_459 ] Put:0 0 0x7f31f2833000
[Mon Feb 24 06:27:11 2025] RING[/opt/fmadio/queue/lxc_459 ] Get:0 0 0x7f31f2834000
wait for respawn 0/120
wait for respawn 1/120
wait for respawn 2/120
wait for respawn 3/120
wait for respawn 4/120
wait for respawn 5/120
process respawned