document updated 19 days ago, on Feb 23, 2025
How to record the process ID (PID) inside the tcpdump file?
[polished] working solutions
- ptcpdump
- It requires a kernel version ≥ 5.2 that's been compiled with BPF and BTF support.
TODO
: Is there a quick way to check if a kernel is compatible?
- If /sys/kernel/btf/vmlinux exists, then the kernel supports BTF.
- py_strace2pcap — convert an strace output file to pcap, using Python's Scapy library.
- Functionality status: I haven't been able to get this to work. Maybe my particular strace output is slightly different than what it expects?
TODO: explore sysdig
solutions involving cgroups
[1]
forum discussions