Prerequisites
Before you begin, make sure you have:- Retis installed (see Installation)
- Root access or appropriate capabilities (CAP_SYS_ADMIN, CAP_BPF, CAP_SYSLOG)
- A kernel that meets the requirements
Your First Trace
The entry point for most use cases is thecollect command, which installs probes and gathers events for instant reporting or later processing.
Run a basic collection
Start collecting network events with default settings. If no collector is explicitly enabled, Retis will try to load all collectors that meet their requirements.You’ll see output similar to:
Filtering Packets
Tracing all packets can generate a lot of events. Use filters to focus on specific traffic.Metadata Filtering
You can also filter based on metadata like network namespace:Saving Events for Later
To save events to a file for post-processing:Collect and save events
Use the To also see events in real-time while saving, add
-o flag to save events to a file (defaults to retis.data):--print:Using Specific Collectors
Collectors target specific areas of the networking stack. Enable specific collectors for focused tracing:Available Collectors
| Collector | Data Collected | Use Case |
|---|---|---|
| skb | Packet information | Basic packet data |
| skb-drop | Drop reason | Identify why packets are dropped |
| skb-tracking | Packet tracking ID | Follow packets through the stack |
| ovs | OpenVSwitch data | OVS bridge and flow information |
| nft | Nftables context | Firewall rule matches |
| ct | Conntrack info | Connection tracking state |
| dev | Net device | Network device details |
| ns | Namespace | Network namespace info |
Tracking Packets Through the Stack
Use thesort command to group and reorder events by packet, making it easy to follow a packet through different subsystems:
The
sort command uses information from the skb-tracking and ovs collectors to identify and group events for the same packet.Exporting to Pcap
Convert Retis events to pcap format for analysis with tools like Wireshark:Using Profiles
Profiles provide predefined sets of CLI arguments for common use cases:Next Steps
Learn About Filtering
Master packet and metadata filtering for precise tracing
Explore Collectors
Deep dive into each collector’s capabilities
Use Profiles
Create custom profiles for your use cases
Post-Processing
Use Python bindings for custom analysis
