Skip to content

openshield status — Output Format

The status command prints a human-readable snapshot of the current OpenShield-XDP state.

Usage

bash
openshield status
# or
sudo openshield status

Root is not required unless /sys/fs/bpf permissions are restricted.

Output fields

OpenShield-XDP Status
=====================
  XDP Program:  LOADED
  Loader:       RUNNING
  Telemetry:    AVAILABLE
  Interface:    eno1
  XDP Mode:     native
  Static Mit:   true
  Dynamic Mit:  true
  Whitelist:    true (3 IPs)
  Config:       PRESENT
  BPF Pin:      EXISTS
  Systemd:      INSTALLED

Field descriptions

FieldSourceValues
XDP Programbpf.IsLoaded() — checks if /sys/fs/bpf/ contains pinned mapsLOADED (green) or NOT LOADED (red)
LoaderPID file at /var/run/openshield/loader.pid — checks if the process is alive and its cmdline contains "openshield"RUNNING (green) or NOT RUNNING (yellow)
TelemetryUnix socket at /var/run/openshield/telemetry.sock — checks if file existsAVAILABLE (green) or UNAVAILABLE (red)
InterfaceConfig file interface fieldNIC name (e.g., eno1, eth0)
XDP ModeConfig file xdp_mode fieldnative, generic, skb, or auto
Static MitConfig file static.enabledtrue or false
Dynamic MitConfig file dynamic.enabledtrue or false
WhitelistConfig file whitelist.enabled + count of whitelist.ipstrue (N IPs) or false
ConfigConfig file existence at /etc/openshield/openshield.yamlPRESENT or MISSING (red)
BPF Pinbpf.LinkPinPath — BPF link pin fileEXISTS (green) or MISSING (red)
SystemdService file at /etc/systemd/system/openshield-loader.serviceINSTALLED (green) or NOT INSTALLED (yellow)

Exit codes

CodeMeaning
0XDP program is loaded AND loader is running
1Not loaded or loader not running

Scripts can check $? for automation:

bash
if openshield status > /dev/null 2>&1; then
    echo "OpenShield is running"
else
    echo "OpenShield is not running"
fi

Color output

The command uses ANSI escape codes for color:

  • 🟢 Green (\033[32m) — loaded, running, available, exists
  • 🔴 Red (\033[31m) — not loaded, unavailable, missing
  • 🟡 Yellow (\033[33m) — not running, not installed

Color output is sent to stdout regardless of whether the output is a TTY. To strip colors:

bash
openshield status | sed 's/\x1b\[[0-9;]*m//g'

Relation to TUI status screen

The CLI status command shows a static snapshot. The TUI Status screen (key 6) shows the same information plus:

  • Real-time health badges (loader/xdp/telemetry/event pipe status)
  • Live statistics (total/passed/dropped, pass/drop rates)
  • Map utilization with progress bars
  • Drop path breakdown
  • Kernel version and system uptime

Next steps

Fix Reference · Load Deep-Dive · CLI Commands