Skip to content

anpa1200/SystemCheck

Repository files navigation

SystemCheck

Linux system report tool — hardware inventory, OS info, CPU, memory, GPU, storage, and optional filesystem deep-dive (largest directories and files per mount). Output as colored TTY text, JSON, or a self-contained HTML report.

Requirements

  • Python 3.8+
  • Linux (reads /proc, /sys, and uses standard CLI tools when available)
  • Optional: psutil — for live CPU/memory metrics and disk partitions (fallbacks exist without it)

Install

From the project root:

pip install .
# Or with optional live metrics:
pip install -e ".[full]"

Or run directly without installing:

python3 systemcheck.py [options]

Usage

Command Description
python3 systemcheck.py Full report: all filesystems with largest dirs/files (default)
python3 systemcheck.py --no-deep Faster run, skip largest dirs/files on mounts
python3 systemcheck.py --json Machine-readable JSON to stdout
python3 systemcheck.py --html --html-file report.html Write HTML report to a file
python3 systemcheck.py --html Emit HTML to stdout
python3 systemcheck.py --no-color Disable colored output
python3 systemcheck.py --debug Enable debug logging to stderr

Options

  • Output: --json, --html, --html-file PATH, --no-color, --debug
  • Deep scan: --deep / --no-deep — toggle scanning largest dirs/files per mount
  • Limits: --top N, --max-mounts N (0 = all filesystems), --per-mount-timeout SEC

Environment (production-friendly)

Override defaults without long CLI:

  • SYSTEMCHECK_TOP — top N dirs/files per mount (default 5)
  • SYSTEMCHECK_MAX_MOUNTS — max mounts to deep-scan (0 = all, default 0)
  • SYSTEMCHECK_PER_MOUNT_TIMEOUT — timeout in seconds per mount (default 60)
  • SYSTEMCHECK_DEBUG=1 — enable debug logging

What it collects

  • System: vendor, model, version, serial; chassis; motherboard
  • OS: pretty name, version, kernel, architecture (from /etc/os-release, hostnamectl, lsb_release)
  • CPU: model, vendor, cores, frequencies, utilization (psutil or /proc/cpuinfo, lscpu)
  • Memory: total/used/free/available, swap (psutil or /proc/meminfo)
  • GPU: adapters with vendor, model, driver, VRAM (nvidia-smi, lshw, lspci)
  • Storage: disks (lsblk) with type (NVMe/SSD/HDD), partitions, mountpoints
  • Filesystems: per-mount capacity/usage; with deep scan: largest directories and largest files (all local mounts; tolerant of permission errors)

Production / push

  • Tests: python -m pytest tests/ -v
  • Lint: ruff check systemcheck.py tests/
  • Install (editable): pip install -e .
  • CI: GitHub Actions runs on push/PR (lint + test on 3.8–3.12 + smoke run).

Development

pip install -e ".[full]"
pip install pytest ruff
python -m pytest tests/ -v
ruff check systemcheck.py tests/

License

MIT. See LICENSE.

About

Simple tool for system configuration check

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages