Skip to content

CLI Commands

OpenShield-XDP provides two binaries with different command sets.

openshield — Full CLI

CommandDescriptionRequires root
loadLoad and attach XDP program, start TUI dashboardYes
unloadUnload XDP program, detach from NIC, clean upYes
statusShow current XDP/loader/telemetry/config stateNo
reloadHot-reload configuration via Unix socketYes
fixAuto-detect and repair 7 categories of issuesYes
tui / statsLaunch standalone TUI dashboardNo
configInteractive config generatorNo
upgradePull latest, rebuild, reinstall (EXPERIMENTAL)Yes
installRun the installer scriptYes
versionShow version stringNo
helpShow usage helpNo

Load flags

FlagTypeDefaultDescription
-t <seconds>int0Auto-unload after N seconds
--refresh <ms>int1000Stats poll interval in milliseconds
--stats-offboolfalseSuppress all stats display (daemon mode)
--stats-minimalboolfalsePrint text snapshots instead of TUI
-i <iface>string(config)Override interface from config
-m <mode>string(config)Override xdp_mode: native, generic, skb

Fix flags

FlagDescription
-v / --verboseShow detail for each repair step

openshield-loader — Minimal daemon CLI

Used by the systemd service. Smaller binary, fewer commands.

CommandDescriptionRequires root
loadLoad XDP with text stats displayYes
unloadUnload XDP and clean upYes
statsShow live text statisticsNo
statusShow current statusNo
reloadReload config without unloadingYes
versionShow versionNo
helpShow usage helpNo

Load flags (loader variant)

FlagTypeDefaultDescription
-t <seconds>int0Auto-unload after N seconds
--stats-offboolfalseNo stats display (daemon mode)
-i <iface>string(config)Override interface
-m <mode>string(config)Override XDP mode

Exit codes

CodeMeaning
0Success (status: loaded and running)
1Error or not loaded (status: not running)

Environment

VariableEffect
HOMEUsed by upgrade to search for Go and repo paths
GOROOTUsed by upgrade to find Go binary
PATHUsed by upgrade for build pipeline

System paths

PathUsed by
/etc/openshield/openshield.yamlConfig file (all commands)
/var/run/openshield/telemetry.sockUnix socket (reload, TUI, status)
/var/run/openshield/loader.pidPID file (status, unload)
/sys/fs/bpf/BPF filesystem (fix, load, unload)
/opt/openshield/bin/Installed binaries
/opt/openshield/lib/BPF object, install script

Next steps

Load Deep-Dive · Status Output · Fix Reference · TUI Guide