Date: 2026-05-11
Time: 15:21
ftl2-htop is a distributed system monitoring TUI (terminal user interface) built on FTL2 that streams live CPU, memory, disk, network, and process metrics from remote hosts. It uses FTL2's gate event protocol to collect metrics via psutil on remote machines and renders them as a rich terminal dashboard using the rich library.
SystemMetrics) back from remote hosts over SSHrich.live.Live to display continuously updating panels, one per hostpython3-psutil needs to be present on remote hosts; FTL2 handles the rest via SSH + gateansiblehost and ansibleuserInstallation of remote dependency:
dnf install python3-psutil # Fedora/RHEL
apt install python3-psutil # Debian/Ubuntu
Or via FTL2 itself:
await ftl.webservers.dnf(name="python3-psutil", state="present")
Running:
uvx --from "git+https://github.com/benthomasson/ftl2-htop" ftl2-htop -i inventory.yml
uv run ftl2_htop.py -i inventory.yml # from local clone
Key flags:
| Flag | Effect |
|------|--------|
| -i inventory.yml | Specify inventory file (required) |
| -g webservers databases | Monitor specific groups only |
| --interval 1 | Set sampling interval in seconds |
| --no-processes | Skip process list (reduces bandwidth) |
| --debug | Print raw events instead of TUI |
Inventory format:
all:
hosts:
web-01:
ansible_host: 192.168.1.10
ansible_user: root
SystemMetrics) in a long-running streaming pattern, distinct from one-shot task execution-gdnf module before monitoring, showing modules and event streaming composing togetherSystemMonitor runs inside the gate process on each host, illustrating how gates can do more than execute tasks — they can run persistent collectorsSystemMonitor (psutil) → SystemMetrics events → SSH channel → TUI renderingpython3-psutil — FTL2's gate handles everything else-g) works the same way as in standard FTL2 task execution--debug flag bypasses the TUI and prints raw events — useful for understanding the event protocoluvx allows running without local installation, demonstrating Python packaging with uv