Expand description
ProbeBackend: TCP, HTTP, sandboxed exec and free-space probes (§10 probe
contract). A probe’s timeout is a deadline for the whole probe: name
resolution, connection, writing and every read count against the one
budget (R06). A batch runs on a bounded pool and returns by its deadline;
a probe still running then is recorded Abandoned (Unknown, never
Failed) and abandoned; Timeout is a probe past its own deadline. Output is data: it is truncated and logged, never
interpreted as instructions.
Exec probes run under systemd-run with a dedicated dynamic user, no
capabilities, NoNewPrivileges, a CPU quota, a runtime limit and, unless
declared, no network.
Structs§
Constants§
- BATCH_
ALLOWANCE 🔒 - How long past the longest probe timeout a batch waits for its stragglers.
- RESOLVER 🔒
- WORKERS 🔒
- At most this many probes run at once.
Functions§
- connect 🔒
- dbus
- Calls
method(interface.Member, no arguments) onserviceatpathon the system bus; any reply passes. A missing name or an error reply fails. - exec
- file_
present - free_
space - http
- http_
with 🔒 - io_
result 🔒 - left 🔒
- The time left before
deadline, orTimeoutif none is. - parse_
url http://host[:port]/path→ (host:port, host, path).- read_
limit 🔒 - P10: what is read is bounded by the probe’s
bytes_maxas well as the sandbox’smax_output, whichever is smaller. - resolve 🔒
host:portto an address within the deadline. A literal address needs no lookup; a name is resolved byresolver(getent ahosts) as a subprocess that is killed at the deadline, so a stalled resolver costs the probe its budget and no more.- run_
batch_ 🔒with - Run
jobson at mostWORKERSthreads and return by the batch deadline (the longest timeout plusallowance): a probe not finished by then, or not started, isAbandoned(§10: recorded Unknown and abandoned), and its thread is never waited for. - run_one 🔒
- sandbox_
argv - The
systemd-runargv for an exec probe in its sandbox. - status_
of - The status code from an HTTP/1.x status line.
- tcp