TRACESTATS(1)

πŸ“¦
version 3.0.22 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ¦‹ TRACESTATS(1) β€” the manual page, but make it make sense πŸ’…

okay bestie, welcome to tracestats(1), a User Command, and honestly? she's that girl. ✨


🌸 NAME 🌸

tracestats β€” perform simple analysis on a trace πŸ’–


✨ SYNOPSIS ✨

tracestats [ -f | --filter bpf ]... inputuri...

like. that's it. that's the whole vibe. πŸŽ€


🫢 DESCRPTION 🫢

(yes the heading is spelled like that in the original, no I will not be fixing it, it's iconic and it's canon)

so here's the tea: tracestats reads one or more traces and outputs summaries for each trace of how many packets/bytes match each bpf filter, plus the totals. like a lil report card for your packets. πŸ“Šβœ¨

but listen β€” if you don't wanna do that for the entire trace, and instead you wanna do it for portions of it? then you go use tracertstats(1) instead. different tool, different job, no cap. πŸ¦‹


πŸ’… OPTIONS πŸ’…

  • -f bpf-filter, --filter bpf-filter β€” add another bpf filter. yes you can stack these. keep stacking. more filters, more power. πŸ‘‘

πŸ”₯ EXAMPLES πŸ”₯

here's the whole slay in action, copied exactly because I do not play with command syntax:

tracestats --filter 'host sundown' \
     --filter 'port http' \
     --filter 'port ftp or ftp-data' \
     --filter 'port smtp' \
     --filter 'tcp[tcpflags] & tcp-syn!=0' \
     --filter 'not ip' \
     --filter 'ether[0] & 1 == 1' \
     --filter 'icmp[icmptype] == icmp-unreach' \
     erf:/traces/trace1.gz \
     erf:/traces/trace2.gz \

eight filters, two trace files, one absolutely unbothered queen. notice the erf: prefix on the input URIs β€” that's the format, keep it. πŸ’–


want more details about tracestats (and libtrace, her whole extended universe)? it's all at:

http://www.wand.net.nz/trac/libtrace/wiki/UserDocumentation

go read it, it's giving documentation. πŸ“šβœ¨


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, fr fr:


πŸ’œ AUTHORS πŸ’œ

Perry Lorier <perry@cs.waikato.ac.nz> β€” the icon, the legend, the moment. 🫢


and that's the whole page bestie. go forth and count some packets. πŸ’…βœ¨

this has been tracestats (libtrace), dated <b>October 2005</b> β€” yes she's vintage, yes she still ate. mwah. πŸŽ€πŸ’–