summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md55
1 files changed, 55 insertions, 0 deletions
diff --git a/README.md b/README.md
index 3a52ac9..eac7111 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,61 @@ Installation and Usage
* Check out the [DTail Documentation](doc/index.md)
+Interactive Query Reload
+========================
+
+`dtail`, `dgrep`, `dcat`, and `dmap` accept `--interactive-query` to keep the
+current run open and listen for control commands on the controlling TTY.
+
+Available control commands:
+
+* `:reload <flags>` apply a new workload without restarting the client
+* `:show` print the current interactive state, including capability counts
+* `:help` print the interactive command help text
+* `:quit` stop the interactive session
+
+Reload flags are mode-specific:
+
+* `dtail` and `dgrep`: `--grep`/`--regex`, `--before`, `--after`, `--max`,
+ `--invert`, plus shared flags such as `--files`, `--plain`, `--quiet`, and
+ `--timeout`
+* `dmap`, and query-driven `dtail`: `--query` plus the shared flags above
+* `dcat`: shared flags such as `--files`, `--plain`, `--quiet`, and `--timeout`
+
+Examples:
+
+```bash
+dtail --servers app01 --files /var/log/app.log --grep ERROR --interactive-query
+# then type:
+:reload --grep WARN
+
+dgrep --servers app01 --files /var/log/app.log --grep ERROR --interactive-query
+# then type:
+:reload --grep WARN --before 2 --after 3
+
+dmap --servers app01 --files /var/log/app.log \
+ --query 'from STATS select count($line) group by hostname' \
+ --interactive-query
+# then type:
+:reload --query "from STATS select count($line),avg(latency) group by hostname"
+```
+
+Compatibility and session reuse:
+
+* On startup, an interactive client first tries `SESSION START` when the remote
+ side advertises the `query-update-v1` capability
+* If a server is older or does not advertise that capability, startup falls
+ back to the legacy command stream automatically, so mixed-version
+ client/server combinations still run the original workload normally
+* Live `:reload` updates require every active server to advertise
+ `query-update-v1`; otherwise the reload is rejected and the current workload
+ keeps running unchanged
+* On capable servers, DTail reuses the existing SSH session and sends
+ `SESSION UPDATE` messages instead of reconnecting
+* Every successful reload advances a generation boundary; late output from the
+ previous workload is dropped so stale matches do not leak into the new result
+ stream
+
Auth-Key Fast Reconnect
=======================