Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions specs/shell/find_deleted_but_open_files_holding_disk_space.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Find deleted-but-open files holding disk space
command: |-
lsof +L1 | head -30
tags:
- lsof
- disk
- cleanup
description: "Lists open files whose directory entries were deleted (shown as '(deleted)'). Classic hidden disk-space eater: long-lived daemons keep the FD open after a log rotation or a database file swap, so `df` stays full even though nothing is visible on disk. Restarting the offending service releases the space."
source_url: "https://man7.org/linux/man-pages/man8/lsof.8.html"
author: Gromykoss
author_url: "https://github.com/Gromykoss"
shells:
- bash
- zsh
15 changes: 15 additions & 0 deletions specs/sql/check_sqlite_database_integrity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Check SQLite database integrity
command: |-
sqlite3 "{{database_path}}" "PRAGMA integrity_check;"
tags:
- sqlite
- database
- health
description: "Runs a full integrity check on a SQLite database file. Reports 'ok' or a list of corrupted pages. Use quick_check (via the related workflow) for a faster, lighter pass on large databases."
source_url: "https://www.sqlite.org/pragma.html#pragma_integrity_check"
author: Gromykoss
author_url: "https://github.com/Gromykoss"
shells:
- bash
- zsh
15 changes: 15 additions & 0 deletions specs/sql/checkpoint_sqlite_wal_file.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Checkpoint SQLite WAL file into the main database
command: |-
sqlite3 "{{database_path}}" "PRAGMA wal_checkpoint(TRUNCATE);"
tags:
- sqlite
- database
- wal
description: "Runs a TRUNCATE checkpoint: moves WAL content into the main database and truncates the -wal file to zero bytes. Useful when a -wal file has grown large because a long-lived connection never releases its read snapshot. Requires no other connections to be writing; busy connections simply block the checkpoint and it reports busy."
source_url: "https://www.sqlite.org/pragma.html#pragma_wal_checkpoint"
author: Gromykoss
author_url: "https://github.com/Gromykoss"
shells:
- bash
- zsh
16 changes: 16 additions & 0 deletions specs/sql/find_deleted_but_open_sqlite_wal_shm_sidecars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Find deleted-but-open SQLite WAL/SHM sidecars
command: |-
lsof +L1 | grep -E "\.(db|sqlite)(-wal|-shm)?" | head -20
tags:
- sqlite
- database
- health
- wal
description: "Detects live processes holding file descriptors to deleted SQLite WAL/SHM sidecars. This happens when a helper opens and closes an ordinary descriptor on the same path: the open/close cycle drops the process-owned POSIX record locks, causing SQLite to recreate the sidecars while the old connection keeps stale handles - later checkpointing fails with SQLITE_IOERR / disk I/O errors. Healthy state: zero lines."
source_url: "https://github.com/stephenschoettler/hermes-lcm/issues/588"
author: Gromykoss
author_url: "https://github.com/Gromykoss"
shells:
- bash
- zsh