reconf the master and common scripts and all unraid essential scripts# Please enter the commit message for your changes. Lines starting

This commit is contained in:
2026-03-24 00:28:11 +00:00
parent efb35cd9c4
commit 9300ae11c2
10 changed files with 454 additions and 90 deletions
+40
View File
@@ -0,0 +1,40 @@
#!/bin/bash
set -e
#-----------------------------------------------------------------------------------------------
# ZFS ARC & Memory Snapshot for Unraid
#-----------------------------------------------------------------------------------------------
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../common.sh"
# Load central config
load_master_conf
# Parse CLI args (supports --dry-run)
parse_args "$@"
# Functions
show_zfs_arc() {
echo "--- ARC / Metadata Stats ---"
grep -iE '^(c|meta|arc_meta_used|demand_metadata_misses|mru_ghost_metadata|mfu_ghost_metadata)' /proc/spl/kstat/zfs/arcstats
}
show_memory_status() {
echo "--- Memory Status ---"
free -h | awk 'NR==1 || /Mem:/'
}
# MAIN
echo "===== ZFS ARC & Memory Snapshot: $(date) ====="
if [ "$DRY_RUN" = true ]; then
echo "[DRY-RUN] Would display ARC and memory stats"
else
echo ""
show_zfs_arc
echo ""
show_memory_status
fi
echo "=============================================="