Skip to main content

wtftools

CI PyPI Downloads License Python

wtf — one read-only command that tells you what's wrong with a Linux box right now.

No agent. No daemon. No config. No network calls. No dependencies (Python standard library only; psutil optional). Safe to run on production over SSH — it only reads. Try it in two seconds, nothing to install: pipx run wtftools

English | Español | Português | Français | Deutsch | Italiano | Русский | 中文 | 日本語 | हिन्दी | 한국어

Instead of running ten commands (htop, df -h, journalctl, systemctl --failed, ss, dmesg, …) you run one:

$ wtf
# AUDIT
[ OK ] uptime                  3d 4h 12m
[ OK ] load average            0.42 0.51 0.55 / 8 CPU
[ OK ] memory                  4.1GB / 16.0GB used (25%)
[WARN] disk /var               17.0GB / 20.0GB used (85%)
[FAIL] failed systemd units    1 failed unit(s)

  Summary: 12 ok · 1 warn · 1 fail · 2 skip

Green is fine, yellow needs a look, red needs fixing. Two ways admins live in it:

  • Incident — something feels off → wtf → a green/yellow/red checklist instead of ten scattered commands.
  • Dailywtf daily as the morning check, wtf in your MOTD login banner, wtf audit --alert … from cron. No monitoring stack required.

What it can do

  • Health audit — 35+ checks (disk, memory, swap, load, PSI, OOM kills, failed units, cert expiry, SMART, temperatures, DNS, …) as a green / yellow / red checklist.
  • Per-resource views — ask about one thing at a time, like show commands on a switch: wtf disk, wtf cpu, wtf mem, wtf net, wtf docker, …
  • Incident triagewtf problems, wtf events, wtf logs, wtf services <unit>, wtf explain (optionally through a local or hosted LLM).
  • Trends & alertingwtf daily, snapshots + wtf diff, cron alerts — no monitoring stack required.
  • Scriptable-f json on every command and -f plain (tab-separated) on the resource and audit views; the JSON carries a schema_version so scripts survive upgrades — for grep / awk / jq.
  • Beginner-friendly--show-commands prints the classic commands each view replaces, so you can learn them by hand.

Install

pipx install wtftools          # recommended — works on any modern distro
pip install wtftools           # or classic pip (core, no dependencies)
pip install wtftools[full]     # + psutil for richer process/socket info
sudo dpkg -i python3-wtftools_*.deb    # Debian/Ubuntu package (see Releases)

After install you have the wtf command. Enable <Tab> completion by adding one line to your shell rc:

echo 'eval "$(wtf completion bash)"' >> ~/.bashrc   # bash
echo 'eval "$(wtf completion zsh)"'  >> ~/.zshrc    # zsh

New here? Start with the 5-minute quickstart.

Commands

Run wtf <command> --help for flags. Each command links to its reference page with examples.

Health & monitoring — docs/AUDIT.md

command what it does
wtf / wtf audit green/yellow/red checklist of what is OK and what is not
wtf problems only the WARN+FAIL rows
wtf daily morning check: audit + diff vs last run + events
wtf explain actionable advice per finding; --llm to pipe to an LLM
wtf events timeline: reboots, OOM kills, failed units, …
wtf logs recent ERROR+ journal entries grouped by service
wtf services drill into one unit: state, restarts, ports, journal
wtf diff compare current state to a saved snapshot
wtf history list saved audit snapshots
wtf crontab validate system + per-user crontabs
wtf nginx [PATH] scan an nginx config for security misconfigurations (SSRF, alias traversal, …)
wtf doctor self-diagnostic: which tools/files wtf can use

Resource views — docs/RESOURCES.md

command what it does
wtf disk [PATH] mounts overview; with a PATH, the largest folders; --tree drills in
wtf cpu load, iowait, pressure, top CPU consumers
wtf mem RAM/swap, OOM kills, top memory consumers
wtf swap per-process swap usage — which processes sit in swap
wtf net interfaces, gateway, DNS, errors, listening ports
wtf io per-device IO rates, pressure, stuck processes
wtf who logged-in users, recent logins, failed auth
wtf temp hardware temperatures from /sys/class/hwmon
wtf info one-page snapshot: all of the above at once
wtf top focused process top: sort by cpu/rss, filter by user/name
wtf ports / wtf port N listening sockets; drill one port to PID, exe, cwd
wtf docker [NAME] container compose dir + image/container/log sizes

Output & configuration

command what it does
wtf config show effective config / print a commented example
wtf completion print a bash/zsh <Tab>-completion script
machine output plain/json formats and a grep·awk·jq cookbook

wtftools absorbs and supersedes checkcrontab — the same cron validator now lives at wtf crontab.

Documentation

  • QUICKSTART.md — 5-minute onboarding and a cheat sheet
  • AUDIT.md — health checks, monitoring, exit codes, the full check list
  • RESOURCES.md — per-resource views with examples
  • OUTPUT.mdplain/json formats and the scripting cookbook
  • CONFIG.md — config file, thresholds, ignoring checks
  • ROADMAP.md — what's planned and what's out of scope

Compatibility

  • Python 3.9+
  • Linux (systemd distributions are the happy path; the tool degrades gracefully when systemctl / journalctl / psutil are missing)
  • No network access required for the core CLI; optional network only for wtf explain --llm … and wtf doctor --check-updates

From source

git clone https://github.com/wachawo/wtftools
cd wtftools
pip install -e .
python3 wtf.py audit       # or run it without installing

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wtftools-0.0.3.tar.gz (165.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wtftools-0.0.3-py3-none-any.whl (103.5 kB view details)

Uploaded Python 3

File details

Details for the file wtftools-0.0.3.tar.gz.

File metadata

  • Download URL: wtftools-0.0.3.tar.gz
  • Upload date:
  • Size: 165.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for wtftools-0.0.3.tar.gz
Algorithm Hash digest
SHA256 b6e2ac0761e7d1c27e6c6e8cc656cab5aa24ea82c486d49367804c6ef2b4b998
MD5 8a1f7cd8cec95ab16852df2fdb668fc3
BLAKE2b-256 821ae376645d6fd5bd9f7882f9655656eff1a6b3ff6b3645273faf873d197ffa

See more details on using hashes here.

Provenance

The following attestation bundles were made for wtftools-0.0.3.tar.gz:

Publisher: publish.yml on wachawo/wtftools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wtftools-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: wtftools-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 103.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for wtftools-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9847d1aaf02e5cbd4723377f3ca2d3109129856fcb1b07440438edd64cdc6d15
MD5 9b4ff97856492a446be29261b520e7b3
BLAKE2b-256 4a386dd9e04dcc97604cac7883c4884733eed65e0b9da1b5ec87fbdc902fd131

See more details on using hashes here.

Provenance

The following attestation bundles were made for wtftools-0.0.3-py3-none-any.whl:

Publisher: publish.yml on wachawo/wtftools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 files

0.0.2

2 files

0.0.1

2 files

0.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page