Wiki › Project

mops-cli

Article
From Chaipat's knowledge graph

mops (Multipurpose Operations CLI) is a lightweight command-line utility in C for MLOps and DevOps work. It brings system diagnostics, a background task queue and cloud operations together in one binary, so the raw numbers a machine reports sit next to the jobs running on it.

Modules

CommandWhat it does
mops sysSystem diagnostics: CPU, memory, GPU/TPU use and out-of-memory events; mops mem is a shortcut
mops taskTask scheduling and management backed by SQLite
mops workerA daemon that runs long batch jobs in the background
mops gcpGoogle Cloud helpers: watching for Spot preemption and IAP tunnelling
mops netNetwork observability: listening ports and active connections
mops dashboardA live terminal dashboard of resources and the task queue, built on ncurses
mops doctorChecks the database, the worker and dependencies

HPC-style shortcuts

The task queue also answers to the commands of PBS, the job scheduler on HPC and PBS job orchestration clusters: mops qsub submits a task, mops qdel kills one and mops qstat lists them. They are the same commands he used on JAIST's KAGAYAKI cluster during his joint research there.

Engineering

  • Command-line parsing uses argtable3, bundled into the source, which gives every subcommand a generated --help.
  • The worker daemon was hardened against SQLite locking errors after fork() and against signal-handling races. Queue polling recovers from schema or database problems instead of stalling silently.
  • The Makefile tracks header dependencies, builds safely in parallel, and has lint (cppcheck), format (clang-format) and test targets.
  • Functional tests are written in Python with pytest. A GitHub Actions pipeline runs them headless, faking a terminal so the dashboard doesn't crash in CI.
  • It ships as a Debian package (make deb) with a man page and bash completion.

Building

sudo apt-get install -y build-essential libsqlite3-dev libncurses-dev
make
./mops doctor

History

Versions 1.1.0 to 1.1.2 came out in April 2026. They added the dashboard, memory metrics, argtable3 parsing, doctor, version and shell completion.

See also