Skip to content

v1.0.0

Latest

Choose a tag to compare

@Abdev314 Abdev314 released this 22 Nov 11:43
· 1 commit to master since this release

Changelog

All notable changes to watchtop are listed here.

The format follows Keep a Changelog, and the project uses Semantic Versioning.

1.0.0 - 2026-11-22

First public release.

Added

  • Live dashboard that shows which processes use inotify watches:
    • system status: kernel limits, active watches, usage in % with a colored gauge
    • watch history graph with a scale, min / average / max, trend, and an estimate of when the limit will be reached
    • top 3 consumers with their share of the total
    • leak detection: highlights processes whose watch count keeps growing and never drops
    • process table with PID, name, watch count and listening TCP ports
    • search by PID, process name or port
    • details panel with fd, watch id, inode and event mask of each watch
    • a Refreshing / Refreshed indicator for the r key
  • Stop a process with k: a confirmation box, then Enter or y sends SIGTERM, f sends SIGKILL, Esc or n cancels. The process start time is checked before and after pinning it with pidfd_open, so a reused PID is never signaled. PID 1, watchtop itself and other users' processes are refused.
  • Command line options: --interval N (1 to 60 seconds, default 2), --once (one plain-text report, for scripts), --version and --help.
  • Automated test suite (python3 tests/run_tests.py): 31 tests that compare watchtop with /proc, drive the dashboard in a pseudo-terminal, and write one report to tests/results/.

Security

  • No built-in shell. Process names are cleaned before display: control characters, including the UTF-8 form of C1 controls, are replaced with ?, so another user cannot inject terminal escape codes by naming a process.
  • A background thread reads /proc and hands finished data to the UI thread, which removes a data race. Quitting (q or Ctrl+C) stops that thread before the screen is shut down, which fixes a second race found with ThreadSanitizer.
  • Scanning never throws: processes that exit during a scan are skipped.
  • Release is the default build type, with stack protector, _FORTIFY_SOURCE=2, PIE, full RELRO and BIND_NOW, and warnings enabled.
  • FTXUI is pinned to an exact commit.

Performance

  • Only inotify descriptors are parsed, and each process's file descriptors are read once per scan.
  • The default refresh is every 2 seconds. Reading /proc is mostly kernel time, so a longer --interval is the way to use less CPU. On a machine with about 70 processes and 18,700 watches, idle CPU is about 5.5% and memory stays around 7 to 10 MB.

Verified

  • Debian 13 (trixie), GCC 14.2, as a normal user and as root.
  • Watch counts equal the real /proc counts.
  • The suite passes with AddressSanitizer, UndefinedBehaviorSanitizer and ThreadSanitizer builds, with no reports.

Known limitations

  • Only processes that use inotify are listed.
  • File paths are not shown (the kernel does not publish them). The inode is shown instead.
  • Only TCP listening ports are shown.
  • The dashboard needs a terminal of about 120 columns by 60 rows.
  • Not tested yet on other distributions or in containers.