fstrm_capture(1)
π fstrm_capture(1) π
okay bestie, welcome to the fstrm_capture(1) page, General Commands Manual edition β you're gonna eat this up, it's so good.
β¨ NAME β¨
fstrm_capture</purl> β receive and save Frame Streams data from a socket. yes literally just vibe in, data in, file out. iconic. π
πΈ SYNOPSIS πΈ
like, here's the shape of it:
fstrm_capture -t content-type -w filename
[ -u socket-path ] [ -a IP -p port ]
[ -c max-connections ] [ -b buffer-size ]
[ -s seconds ] [ --gmtime ] [ --localtime ]
[ -d [-d ...] ]
and the long-flag glow-up version:
fstrm_capture --type content-type --write filename
[ --unix socket-path ] [ --tcp IP --port port ]
[ --maxconns max-connections ] [ --buffersize buffer-size ]
[ --split seconds ] [ --gmtime ] [ --localtime ]
[ --debug [--debug ...] ]
π¦ DESCRIPTION π¦
so basically fstrm_capture listens on a UNIX domain socket or a TCP socket, receives Frame Streams data, and writes that data to a file. that's the whole plot. no cap. π
π OPTIONS π
-w filename,--write filenameβ write the data into the filefilename. ok but here's the tea π- if you also passed
--gmtimeor--localtime, thenfilenamegets preprocessed throughstrftime(). which means you can put a format string in there with the date and time all up in it, like, for the filename it creates. obsessed. - if
filenameis"-"and standard output is not connected to a terminal,fstrm_capturewill write to standard output instead. but heads up bestie: output splitting (-s) may not be used when the filename is"-". that's a hard no. π« - sending
SIGHUPtofstrm_captureflushes any buffered output to the file. sendingSIGUSR1closes and reopens the file. little signal moment, love that for us. β¨
- if you also passed
-t content-type,--type content-typeβ specify thecontent-typeto receive from the socket and write to the output filename.-u socket-path,--unix socket-pathβ listen on the Unix domain socketsocket-pathto receive Frame Streams data. β οΈ only one of-uor-amay be given.-a IP,--tcp IPβ listen for TCP connections on addressIPto receive Frame Streams data. β οΈ only one of-uor-amay be given. also, using-arequires a port given with-p.-p port,--port portβ if-ais given, listen on TCP portportto receive Frame Streams data.-c max-conns,--maxconns max-connsβ allow at mostmax-connsconcurrent connections. if you don't specify it, concurrent connections are just not limited at all. free range. π-b buffersize,--buffersize buffersizeβ set the read buffer size tobuffersizebytes. combined with-c, this can be used to limit the total memory usage offstrm_capture. thebuffersizealso affects the maximum frame size thatfstrm_capturewill accept. frames larger thanbuffersize, including the 4-byte framing overhead, will be discarded. ποΈ- the default
buffersizeis262144(256KiB).
- the default
-s interval,--split intervalβ reopen the output file everyintervalseconds. requires the use of either the--gmtimeor--localtimeoptions. π- note that this file rotation is triggered by incoming data, so it may be delayed after the interval. it's giving "whenever it feels like it".
--gmtimeβ process the--writefilename throughstrftime()with the current time in GMT. this--gmtimeoption may be used to provide a timestamped output file when startingfstrm_capture, or when reopening an output file using the--splitoption, or when receiving aSIGUSR1signal. π--localtimeβ process the--writefilename throughstrftime()with the current time in the system local time zone. this--localtimeoption may be used to provide a timestamped output file when startingfstrm_capture, or when reopening an output file using the--splitoption, or when receiving aSIGUSR1signal. π-d [ -d ... ],--debug [ --debug ]β increase the debugging level. without-d,fstrm_captureprints only critical error messages. up to five-doptions may be specified, after which more repetitions will have no effect. so like, five is the max, bestie, don't overdo it. π
π EXAMPLES π
receive dnstap data and save to hourly rotating files (with a converted filename such as /var/log/dnstap/dnstap-2018-05-04-12:58:48.fstrm):
fstrm_capture -t protobuf:dnstap.Dnstap \
-u /var/run/named/dnstap.sock \
-w /var/log/dnstap/dnstap-%F-%T.fstrm \
-s 3600 --gmtime
look at her go. she's serving. π β¨
π SEE ALSO π
fstrm_dump(1)fstrm_replay(1)strftime(3)- Frame Streams C Library https://farsightsec.github.io/fstrm
ok that's the whole page bestie, you understood all of it, i know it. go forth and capture those frames. π«Ά
and finally, the little sign-off at the bottom of every page: this is the fstrm_capture(1) page from the General Commands Manual β go be the main character of your own socket. π πΈ π
π¦ where this page comes from
- alpine 3.22: fstrm-doc 0.6.1-r4 Β· MIT
- alpine 3.23: fstrm-doc 0.6.1-r4 Β· MIT
- alpine 3.24: fstrm-doc 0.6.1-r4 Β· MIT
- arch rolling: fstrm 0.6.1-2 Β· Apache
- centos-stream 10: fstrm-utils 0.6.1-12.el10 Β· MIT AND NTP
- centos-stream 9: fstrm-utils 0.6.1-3.el9 Β· MIT
- debian bookworm: fstrm-bin 0.6.1-1 Β· MIT
- debian trixie: fstrm-bin 0.6.1-1+b3 Β· MIT
- fedora 43: fstrm-utils 0.6.1-13.fc43 Β· MIT AND NTP
- fedora 44: fstrm-utils 0.6.1-14.fc44 Β· MIT AND NTP
- nixos 26.05: fstrm 0.6.1
- nixpkgs unstable: fstrm 0.6.1
- opensuse-leap 16.0: fstrm 0.6.1-160000.2.2 Β· MIT
- opensuse-leap 16.0: fstrm 0.6.1-160000.2.2 Β· MIT
- opensuse-leap 16.0: fstrm 0.6.1-160000.2.2 Β· MIT
- opensuse-leap 16.0: fstrm 0.6.1-160000.2.2 Β· MIT
- ubuntu jammy: fstrm-bin 0.6.1-1 Β· MIT
- ubuntu noble: fstrm-bin 0.6.1-1build4 Β· MIT
- ubuntu questing: fstrm-bin 0.6.1-1build4
- ubuntu resolute: fstrm-bin 0.6.1-1build5 Β· MIT
- ubuntu stonking: fstrm-bin 0.6.1-1build5 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms