Skip to content

feat(module): add btop/bmon/iftop/iotop/nmon/powertop monitoring modules - #381

Merged
ycpss91255 merged 2 commits into
mainfrom
auto/modules-monitoring-b1
Jul 11, 2026
Merged

feat(module): add btop/bmon/iftop/iotop/nmon/powertop monitoring modules#381
ycpss91255 merged 2 commits into
mainfrom
auto/modules-monitoring-b1

Conversation

@ycpss91255

Copy link
Copy Markdown
Owner

Summary

Adds six apt-archetype optional monitoring modules for the small-tools
modularization program. Each installs its like-named apt package via
module_use_apt_archetype, keeps detect() / is_recommended()
module-defined, and overrides doctor() with a real health probe that
verifies the tool actually runs.

Module apt pkg Purpose doctor probe
btop btop Resource monitor (modern top) btop --version
bmon bmon Bandwidth monitor bmon -V
iftop iftop Network bandwidth by host command -v iftop
iotop iotop I/O monitor command -v iotop
nmon nmon Performance monitor command -v nmon
powertop powertop Power consumption monitor command -v powertop

iftop / iotop / nmon / powertop ship no clean version flag, so their
doctor probe verifies the binary resolves on PATH.

Details

  • Category optional, tag monitoring, SUPPORTED_UBUNTU=("22.04" "24.04" "26.04"),
    RISK_LEVEL=low, VERSION_PROVIDED=apt-managed.
  • Each declares an en + zh-TW DESCRIPTION and a TEST_VERIFY_CMD matching
    its doctor probe.
  • All satisfy the 10-function module contract (ADR-0002), enforced by
    test/unit/module/contract_conformance_spec.bats (test(module): module-iterating contract conformance meta-test #305), and are both
    standalone- and engine-invocable.
  • doc/module/INDEX.md regenerated via ./script/gen-module-index.sh
    (54 modules).
  • [Unreleased] CHANGELOG entry added.

Files

  • module/{btop,bmon,iftop,iotop,nmon,powertop}.module.sh
  • test/unit/module/{btop,bmon,iftop,iotop,nmon,powertop}_spec.bats
  • doc/module/INDEX.md, doc/changelog/CHANGELOG.md

Test plan

Ran all gates blocking-foreground in Docker via justfile.ci:

  • just -f justfile.ci test-unit — green (4214+ tests, incl. contract_conformance 5/5)
  • just -f justfile.ci test-integration — green (24 tests)
  • just -f justfile.ci lint — green (ShellCheck / fish syntax / Hadolint)

Each new module spec covers: metadata sanity, is_installed false on a clean
container, dry-run no-ops, idempotency, sidecar lifecycle (ADR-0001),
standalone CLI, and verify / doctor including a real-binary probe.

ycpss91255 and others added 2 commits July 11, 2026 19:54
Six apt-archetype `optional` monitoring modules for the small-tools
modularization program, each installing its like-named apt package via
module_use_apt_archetype with module-defined detect()/is_recommended()
and a real doctor() that verifies the tool actually runs:

- btop     — resource monitor;      doctor: btop --version
- bmon     — bandwidth monitor;     doctor: bmon -V
- iftop    — network bandwidth by host;  doctor: command -v iftop
- iotop    — I/O monitor;           doctor: command -v iotop
- nmon     — performance monitor;   doctor: command -v nmon
- powertop — power consumption monitor;  doctor: command -v powertop

iftop/iotop/nmon/powertop ship no clean version flag, so their doctor
probe verifies the binary resolves on PATH. Each declares en + zh-TW
DESCRIPTION, SUPPORTED_UBUNTU 22.04/24.04/26.04, and a TEST_VERIFY_CMD
matching its doctor probe. All satisfy the 10-function module contract
(ADR-0002, #305 conformance) and are both standalone- and
engine-invocable.

Each module ships a unit spec (metadata sanity, is_installed false on a
clean container, dry-run no-ops, idempotency, sidecar lifecycle,
standalone CLI, verify/doctor incl. a real-binary probe).
doc/module/INDEX.md regenerated (54 modules); [Unreleased] CHANGELOG
entry added.

Gates green in Docker: test-unit (incl. contract_conformance),
test-integration, lint.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NX5H2vuMTv4mBmjpPYoS3s
# Conflicts:
#	doc/module/INDEX.md
@ycpss91255
ycpss91255 enabled auto-merge (squash) July 11, 2026 11:58
@ycpss91255
ycpss91255 merged commit 90c0032 into main Jul 11, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant