← Back to Skills Marketplace
ckchzh

Diskmon

by BytesAgain2 · GitHub ↗ · v2.0.1 · MIT-0
cross-platform ✓ Security Clean
347
Downloads
0
Stars
2
Active Installs
8
Versions
Install in OpenClaw
/install diskmon
Description
Watch disk space in real time and alert before storage runs low. Use when monitoring usage, finding large dirs, preventing disk-full events.
README (SKILL.md)

DiskMon

A sysops toolkit for scanning, monitoring, reporting, alerting, tracking top usage, checking health, fixing issues, cleaning up, backing up, restoring, logging, benchmarking, and comparing disk-related operations — all from the command line with full history tracking.

Commands

Command Description
diskmon scan \x3Cinput> Record and review disk scan entries (run without args to see recent)
diskmon monitor \x3Cinput> Record and review monitoring entries
diskmon report \x3Cinput> Record and review report entries
diskmon alert \x3Cinput> Record and review alert entries
diskmon top \x3Cinput> Record and review top-usage entries
diskmon usage \x3Cinput> Record and review usage entries
diskmon check \x3Cinput> Record and review health check entries
diskmon fix \x3Cinput> Record and review fix entries
diskmon cleanup \x3Cinput> Record and review cleanup entries
diskmon backup \x3Cinput> Record and review backup entries
diskmon restore \x3Cinput> Record and review restore entries
diskmon log \x3Cinput> Record and review log entries
diskmon benchmark \x3Cinput> Record and review benchmark entries
diskmon compare \x3Cinput> Record and review comparison entries
diskmon stats Show summary statistics across all log files
diskmon export \x3Cfmt> Export all data in JSON, CSV, or TXT format
diskmon search \x3Cterm> Search across all logged entries
diskmon recent Show the 20 most recent activity entries
diskmon status Health check — version, data dir, entry count, disk usage
diskmon help Show usage info and all available commands
diskmon version Print version string

Each data command (scan, monitor, report, etc.) works in two modes:

  • With arguments: Logs the input with a timestamp and saves to the corresponding .log file
  • Without arguments: Displays the 20 most recent entries from that command's log

Data Storage

All data is stored locally in ~/.local/share/diskmon/. Each command writes to its own log file (e.g., scan.log, monitor.log, alert.log). A unified history.log tracks all activity across commands with timestamps.

  • Log format: YYYY-MM-DD HH:MM|\x3Cinput>
  • History format: MM-DD HH:MM \x3Ccommand>: \x3Cinput>
  • No external database or network access required

Requirements

  • Bash 4+ (uses set -euo pipefail)
  • Standard POSIX utilities: date, wc, du, head, tail, grep, basename, cat
  • No root privileges needed
  • No API keys or external dependencies

When to Use

  1. Tracking disk space trends over time — Use diskmon monitor and diskmon usage to log periodic disk space readings across servers, building a historical record you can search and export
  2. Setting up alert documentation — Use diskmon alert to record threshold breaches and disk-full warnings, creating a searchable incident history
  3. Documenting cleanup and maintenance — Use diskmon cleanup and diskmon fix to keep timestamped logs of what was cleaned, freed, or repaired on which systems
  4. Benchmarking storage performance — Use diskmon benchmark and diskmon compare to log I/O test results and compare performance across different disks or configurations
  5. Generating audit-ready exports — Use diskmon export json to produce a structured file of all logged monitoring activity for capacity planning, compliance reviews, or team handoff

Examples

Log a scan and review history

# Record a scan result
diskmon scan "/dev/sda1: 78% used, 45GB free"

# View recent scan entries
diskmon scan

Monitor, alert, and report workflow

# Log a monitoring observation
diskmon monitor "web-server-01 /var at 91% — nearing threshold"

# Log an alert
diskmon alert "CRITICAL: /data at 98% on prod-db-02"

# Generate a report entry
diskmon report "Weekly disk report: 3 servers above 85% threshold"

# Search across all entries
diskmon search "prod-db"

Cleanup and fix tracking

# Log a cleanup action
diskmon cleanup "Purged 15GB of old logs from /var/log on app-server-03"

# Log a fix
diskmon fix "Extended /home LVM volume by 20GB on dev-server"

# View recent activity
diskmon recent

Export and statistics

# Summary stats across all log files
diskmon stats

# Export everything as JSON
diskmon export json

# Export as CSV for spreadsheet analysis
diskmon export csv

# Health check
diskmon status

Backup, restore, and benchmark

# Log a backup
diskmon backup "Snapshot of /data volume taken at 03:00 UTC"

# Log a restore test
diskmon restore "Verified restore of /etc from snapshot-2025-03-15"

# Log a benchmark result
diskmon benchmark "Sequential write: 480 MB/s on /dev/nvme0n1"

# Compare two benchmark runs
diskmon compare "nvme0n1 vs sda: 480 MB/s vs 210 MB/s sequential write"

How It Works

DiskMon uses a simple case-dispatch architecture in a single Bash script. Each command maps to a log file under ~/.local/share/diskmon/. When called with arguments, the input is appended with a timestamp. When called without arguments, the last 20 lines of that log are displayed. The stats command aggregates entry counts across all logs, export serializes everything into JSON, CSV, or plain text, and search greps across all log files for a given term.

Support


Powered by BytesAgain | bytesagain.com | [email protected]

Usage Guidance
This skill appears to do what it says: a local Bash tool that logs and queries disk-related notes in ~/.local/share/diskmon. Before installing, consider: (1) it will create and append log files in your home directory—review and limit what you log to avoid storing sensitive strings; (2) ensure file permissions on ~/.local/share/diskmon are appropriate so other users on the system can't read logs; (3) logs can grow over time—implement rotation/cleanup if you plan heavy use; (4) don't run the script as root unless you understand implications; and (5) if you want extra assurance, inspect the full script in the upstream repo (https://github.com/bytesagain/ai-skills) before enabling autonomous invocation in agents.
Capability Analysis
Type: OpenClaw Skill Name: diskmon Version: 2.0.1 The DiskMon skill is a straightforward Bash-based logging utility designed to record and review disk-related maintenance activities locally. Analysis of scripts/script.sh and SKILL.md shows no evidence of network activity, data exfiltration, or unauthorized execution; the tool strictly manages its own data directory (~/.local/share/diskmon/) using standard POSIX utilities.
Capability Assessment
Purpose & Capability
The name/description (disk space monitoring, logging, reporting) matches the provided Bash script and SKILL.md: commands log entries, read recent entries, export and show stats. There are no unrelated credentials, binaries, or services requested.
Instruction Scope
Runtime instructions and the script only read and write files under ~/.local/share/diskmon, and invoke standard POSIX utilities (date, wc, du, tail, grep, cat). The instructions do not access system-wide credentials, other config paths, or external endpoints.
Install Mechanism
No install spec is provided (instruction-only plus a shipped script). Nothing is downloaded or extracted from external URLs, and no package installation is required.
Credentials
The skill declares no required environment variables or credentials and the script does not read any environment variables beyond HOME. No secrets are requested or needed for the stated purpose.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or system-wide agent configuration. It writes only to its own data directory under the user's HOME.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install diskmon
  3. After installation, invoke the skill by name or use /diskmon
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.0.1
update
v2.0.0
v2.5 standard: Use-when desc, homepage, source, security fix
v1.0.5
retry-fix-token
v1.0.4
old template -> domain-specific v2.0.0
v1.0.3
Quality upgrade: custom functionality
v1.0.2
Standards compliance: unique content, no template text
v1.0.1
Quality update: docs, examples, standards compliance
v1.0.0
Initial release
Metadata
Slug diskmon
Version 2.0.1
License MIT-0
All-time Installs 2
Active Installs 2
Total Versions 8
Frequently Asked Questions

What is Diskmon?

Watch disk space in real time and alert before storage runs low. Use when monitoring usage, finding large dirs, preventing disk-full events. It is an AI Agent Skill for Claude Code / OpenClaw, with 347 downloads so far.

How do I install Diskmon?

Run "/install diskmon" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Diskmon free?

Yes, Diskmon is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Diskmon support?

Diskmon is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Diskmon?

It is built and maintained by BytesAgain2 (@ckchzh); the current version is v2.0.1.

💬 Comments