files or from events. This guide shows the common patterns: query, filter with jq, follow the stream, and react to exit codes.
Choose a format
--output <file> writes to a file instead of standard output. [output] format in the configuration file sets the default for every listing command. Output formats describes each format per command, and JSON output schema lists every field.
Read a transfer record
A record fromfiletrace files --jsonl, wrapped for reading:
transfer.bytes_sent is what the socket accepted from the file, file.size the size of the file when it was first seen, and, for read-write transfers, transfer.bytes_read what the thread read from it. incomplete is true when events were lost during the transfer.
Filter and aggregate with jq
Narrow the result with Filetrace’s own options, then shape it with jq.Follow the event stream
filetrace events --follow --jsonl prints one JSON record per event as it happens, which suits a log shipper or a small daemon:
bytes_sent add up to the transfer. Event records have a sequence number that increases with every record. For a stream to another system, the OTLP exporter or the gRPC API are sturdier than a pipe.
Handle exit codes
Filetrace distinguishes an empty answer from an incomplete one:
Code
9 still comes with output. Treat it as a warning, not a failure:
doctor, config validate and agent status.