xdp-monitor8
A simple bpf-powered xdp monitoring tool
Usage
Running xdp-monitor
The syntax
for
running
xdp-monitor
is:
The supported
options
are:
-h, --help
Display a
summary
of
the
available
options
Output Format Description
By default, redirect success statistics are disabled, use --stats to enable. The terse output mode is default, extended output mode can be activated using the --extended command line option.
SIGQUIT (Ctrl + \) can be used to switch the mode dynamically at runtime.
Terse mode displays at most the following fields:
rx/s Number of packets received per secondredir/s Number of packets successfully redirected per seconderr,drop/s Aggregated count of errors per second (including dropped packets)xmit/s Number of packets transmitted on the output device per second
Verbose output mode displays at most the following fields:
FIELD DESCRIPTIONreceive Displays the number of packets received and errors encounteredWhenever an error or packet drop occurs, details of per CPU errorand drop statistics will be expanded inline in terse mode.pkt/s - Packets received per seconddrop/s - Packets dropped per seconderror/s - Errors encountered per secondredirect - Displays the number of packets successfully redirectedErrors encountered are expanded under redirect_err fieldNote that passing -s to enable it has a per packet overheadredir/s - Packets redirected successfully per secondredirect_err Displays the number of packets that failed redirectionThe errno is expanded under this field with per CPU countThe recognized errors are:EINVAL: Invalid redirectionENETDOWN: Device being redirected to is downEMSGSIZE: Packet length too large for deviceEOPNOTSUPP: Operation not supportedENOSPC: No space in ptr_ring of cpumap kthreaderror/s - Packets that failed redirection per secondenqueue to cpu N Displays the number of packets enqueued to bulk queue of CPU NExpands to cpu:FROM->N to display enqueue stats for each CPU enqueuing to CPU NReceived packets can be associated with the CPU redirect program is enqueuingpackets to.pkt/s - Packets enqueued per second from other CPU to CPU Ndrop/s - Packets dropped when trying to enqueue to CPU Nbulk-avg - Average number of packets processed for each eventkthread Displays the number of packets processed in CPUMAP kthread for each CPUPackets consumed from ptr_ring in kthread, and its xdp_stats (after callingCPUMAP bpf prog) are expanded below this. xdp_stats are expanded as a total andthen per-CPU to associate it to each CPU's pinned CPUMAP kthread.pkt/s - Packets consumed per second from ptr_ringdrop/s - Packets dropped per second in kthreadsched - Number of times kthread called schedule()xdp_stats (also expands to per-CPU counts)pass/s - XDP_PASS count for CPUMAP program executiondrop/s - XDP_DROP count for CPUMAP program executionredir/s - XDP_REDIRECT count for CPUMAP program executionxdp_exception Displays xdp_exception tracepoint eventsThis can occur due to internal driver errors, unrecognizedXDP actions and due to explicit user trigger by use of XDP_ABORTEDEach action is expanded below this field with its counthit/s - Number of times the tracepoint was hit per seconddevmap_xmit Displays devmap_xmit tracepoint eventsThis tracepoint is invoked for successful transmissions on outputdevice but these statistics are not available for generic XDP mode,hence they will be omitted from the output when using SKB modexmit/s - Number of packets that were transmitted per seconddrop/s - Number of packets that failed transmissions per seconddrv_err/s - Number of internal driver errors per secondbulk-avg - Average number of packets processed for each event
History
- Arch Linux 2026-11-01: the text shown here
- Debian 13 (Trixie)
- Debian 12 (Bookworm)