Skip to main content
The listing commands (watch, files, transfers, processes, connections, flows, top, events and inspect) share one set of filter options. This page describes the syntax of each value, how filters combine, how --since and --until select records, and which command accepts which filter.

How filters combine

Every filter you give narrows the result: a record is listed only if it matches all of them. Giving the same option twice keeps the last value. --path and --path-regex set the same pattern, so the one given last applies. Each command accepts only the filters that apply to what it lists. Any other option is reported as an unknown argument, and the command exits with 2.

Value syntax

Times

--since and --until take either a duration back from now or an RFC 3339 timestamp. History starts when the agent starts, so a time before that selects everything the agent has.

Sizes

--min-bytes and --min-size take a number with an optional unit: B, K or KB, M or MB, G or GB, T or TB, in upper or lower case. Units are powers of 1024, so 1KB is 1024 bytes and 100MB is 104857600 bytes. A number without a unit counts bytes, and a fraction such as 1.5GB is accepted.

Addresses and ports

--remote and --local take an IPv4 or IPv6 address, or a network in CIDR notation:
An address without a prefix length matches that address only. An IPv4 network never matches an IPv6 endpoint, and the other way round. --port takes a number from 1 to 65535 and matches records whose local or remote port is that number.

Process names

--process, and its alias --name, match the process name shown in the PROCESS column: the kernel’s command name, which holds at most 15 characters. A * matches any run of characters; without one, the name must match exactly, including case.

Paths

--path, and its alias --file, match the whole path of a file. A * matches any run of characters, / included, so /data/* also matches files in the subdirectories of /data. Without a *, the path must match exactly. Quote patterns so that the shell does not expand them:

Regular expressions

--path-regex takes a POSIX extended regular expression. It matches if it occurs anywhere in the path; anchor it with ^ and $ to match the whole path. An invalid expression is reported and the command exits with 2.

Users, cgroups and namespaces

These filters select processes, and the sockets, flows and transfers of those processes. Machine-readable output of processes carries the matching values as cgroup_id, pid_namespace, mount_namespace and network_namespace.

Keywords

See file attribution and confidence for what the confidence levels and methods rest on.

Time ranges and activity

--since selects records that were active at or after the given time; --until selects records that started at or before it. Together they select the records whose observed lifetime overlaps the range.
--since and --until choose which records are listed, not which bytes are counted. Byte counts always cover a record’s whole observed lifetime. A transfer that started two hours ago and is still running shows all of its bytes with --since 10m.
In events, every record is one point in time, and the range selects the events made within it. If the agent lost events within the queried range, the command still prints its result, warns on standard error and exits with 9. The activity options refer to the last few seconds: --active and --completed together select everything.

Which commands take which filters

Notes on the table:
  • In top, --protocol applies to the files, destinations and connections subjects; top processes, the default, does not accept it.
  • In watch, the process filters (--pid, --process, --user, --cgroup, --namespace) apply to every view; watch lists which view each of the others applies to.
  • In events, --path matches only file events (file_seen and file_transfer), and the network filters match only events that concern a socket.
  • In inspect, the target itself (a path, PID, socket ID, flow ID or address) does the selecting; --since narrows the history.

Sorting and limits

--sort orders the rows by one key. The keys each command accepts: Numeric keys sort largest first, except pid, which sorts in ascending order. process and file sort by name or path in ascending order. bytes is the bytes sent for transfers and the bytes sent and received together for processes, connections and flows. --limit takes a positive number and caps the rows; in inspect it caps every list in the report. See each command’s page for its default.