SRE-first disk investigation CLI

Know what is filling your disk.

diskc is designed to replace the repetitive df → du → find → lsof → ps workflow with one investigation: what is large, what is growing, how fast it is growing, and which process is writing it.

Linux-first Local investigation Read-only by design Early development
Early preview CLI behavior and output may change while diskc is under active development.
illustrative output
$ diskc

Disk pressure: WARNING  92.4% used (38.0 GB free)
Inodes: 41.0% used  |  /
Trend: +2.4 GB/hour
Estimated filesystem full: ~35 minutes

Largest files
  74.8 GB  /var/log/payment/app.log  (log)  ↑ 18.2 MB/s  [1 writer(s)]
  42.1 GB  /tmp/upload-883120.bin   (temporary/cache)  ↑ 11.8 MB/s
  31.6 GB  /var/log/nginx/access.log  (log)  ↑ 4.1 MB/s

Largest directories
  128.4 GB  /var/log
   67.2 GB  /tmp

Active writers
/var/log/payment/app.log
└─ PID 21819  payment-api
   ├─ exe      /opt/payment/bin/payment-api
   └─ service  payment.service

Potential issues

/var/log/payment/app.log
├─ rapid growth: 65.5 GB/hour
└─ filesystem full in ~35 minutes
size → growth → writer → risk diagnosis only

Disk full incidents should not require six commands.

The problem is rarely “what percentage is used?” The useful questions are what consumes the space, what is growing now, who is writing it, whether deleted files still hold blocks, and how soon the filesystem will fill.

Typical workflow

$ df -h
$ df -i
$ du -xhd1 /var | sort -h
$ find /var -type f -size +1G ...
$ lsof +L1
$ lsof /var/log/payment/app.log
$ ps -fp 21819
$ ...run it all again 3 seconds later

diskc

$ diskc

/var/log/payment/app.log
├─ 74.8 GB
├─ ↑ 18.2 MB/s
└─ PID 21819 payment-api

disk full in ~35 min
Illustrative output based on the current CLI report format. Use diskc --deleted to include deleted-but-open files.

How diskc investigates

A deterministic evidence pipeline first. AI-assisted reasoning can come later, but the core diagnosis should be inspectable and reproducible.

1

Find pressure

Check filesystem capacity and inode pressure instead of only bytes used.

2

Rank consumers

Drill into unusually large directories and likely data files without dumping the whole filesystem.

3

Measure velocity

Sample large candidates over a short window to identify files growing right now.

4

Resolve writers

Map active files to PIDs, executables, services, and eventually containers.

5

Explain risk

Surface likely issues such as log storms, deleted-open files, tmp growth, and inode exhaustion.

Built for the disk failures SREs actually see.

Log storm

One log is eating the filesystem

See current size, growth velocity, owning process, and projected time to full.

app.log 74.8G
↑ 18.2 MB/s
PID 21819 payment-api
Deleted-open

rm ran, but disk space did not return

Detect unlinked files still held open by a process and show who retains the blocks.

38.2G retained
PID 3021 java
app-old.log (deleted)
Temporary files

/tmp is quietly exploding

Prioritize large or rapidly growing temporary data and identify active writers.

/tmp/upload-883120.bin
42.1G · ↑ 11.8 MB/s
Inodes

Plenty of GB free, but writes still fail

Highlight inode exhaustion as a first-class disk pressure signal.

bytes used 48%
inode used 100%
likely many small files
Core dumps & caches

Large non-binary data in unexpected places

Classify core dumps, archives, caches, logs, and temporary files so likely culprits rise first.

core.29311 28.4G
cache.data 19.2G
archive.tar 11.1G
Rotation

Large logs need attention

Classify oversized logs, then prioritize the ones growing quickly or held open by active writers.

app.log 74.8G
↑ 18.2 MB/s
PID 21819 payment-api

Simple commands. No command maze.

Start broad, target one or more paths, or inspect every physical mount. diskc accepts paths before or after flags and samples growth for three seconds by default.

diskcInvestigate /: pressure, inodes, large files/directories, growth, and writable processes.
diskc /varInspect one filesystem, directory, or a single file.
diskc / /data /backupInspect several paths independently; results are never mixed across filesystems.
diskc --allDiscover and inspect all mounted physical filesystems, excluding virtual mounts.
diskc /var/log
$ diskc /var/log

Disk pressure: WARNING  92.4% used (38.0 GB free)
Inodes: 41.0% used  |  /var/log
Trend: +2.4 GB/hour
Estimated filesystem full: ~35 minutes

Largest files
   74.8 GB  /var/log/payment/app.log  (log)  ↑ 18.2 MB/s  [1 writer(s)]
   31.6 GB  /var/log/nginx/access.log  (log)  ↑ 4.1 MB/s
   18.1 GB  /var/log/app/archive  (file)

Active writers
/var/log/payment/app.log
└─ PID 21819  payment-api
   ├─ exe      /opt/payment/bin/payment-api
   └─ service  payment.service

Potential issues
/var/log/payment/app.log
├─ rapid growth: 65.5 GB/hour
└─ filesystem full in ~35 min

SRE quick checks for live incidents.

All commands are read-only. Use Ctrl-C to stop watch mode.

Fast size and inode triage diskc /var --sample 0

Skip the growth wait when you need the largest files and inode pressure immediately.

Find the file growing now diskc /var --top 50 --depth 6 --sample 5s

Use a deeper scan and longer sample to rank high-growth candidates with writer context.

Resolve df versus du diskc --deleted --sample 0

Find deleted-but-open files that retain blocks after their directory entries disappear.

Sweep every physical mount diskc --all --top 20 --sample 5s

Check attached data volumes without walking virtual filesystems such as /proc and tmpfs.

Watch an active incident diskc --watch --interval 5s /data

Refresh the report continuously to see the same evidence change as pressure builds.

Export evidence for automation diskc /data --top 50 --sample 3s --deleted --json

Emit machine-readable output for incident tooling; multi-path scans produce a JSON array.

Install diskc

diskc is in early development. Build it from source today; Homebrew distribution is planned but not yet available.

Homebrew (planned) Work in progress
brew install diskc

Not available yet. This will be the intended command once a formula is published. Follow GitHub releases for availability.

Source & development
$ git clone https://github.com/diskc-cli/diskc.git && cd diskc && go run ./cmd/diskc

Requires Go 1.22 or newer. The public repository is the source of truth for releases, build instructions, and contributions.

Diagnose first. Delete nothing by surprise.

Disk tools operate close to production data. The safest default is evidence collection and explanation—not automatic cleanup.

Read-only first

The core product direction is inspection and diagnosis. Users should explicitly review any future remediation action.

No guaranteed diagnosis

Growth estimates and likely-cause classifications are operational signals, not proof that a particular file or process is safe to change.

Production caution

Permissions, mounts, containers, filesystems, sparse files, snapshots, and concurrent writes can make disk accounting non-obvious.

Disclaimer — use at your own risk.

diskc is provided “AS IS” and “AS AVAILABLE,” without warranties or guarantees. You are responsible for validating its output, maintaining backups, and deciding whether any action is safe for your environment.

Do not delete, truncate, restart, kill, or modify production data or processes solely because diskc identifies them. The project and this website are informational; use is at your own risk.