AR / diskwatch.sh
AjayRangoji's picture
Upload AR-4B pretraining codebase, configs, and cluster scripts
2ae6691 verified
Raw History Blame Contribute Delete
436 Bytes
#!/bin/bash
# Logs free space on /fsx every 5 minutes; readings below LOW_GB are marked LOW.
# Start: nohup ./diskwatch.sh >> logs/disk.log 2>&1 & Stop: pkill -f diskwatch.sh
cd /fsx/ajay-stu/AR
LOW_GB=300
while true; do
free=$(df -BG --output=avail /fsx | tail -1 | tr -dc '0-9') # free space in GB
tag=""; [ "$free" -lt $LOW_GB ] && tag=" <-- LOW"
echo "$(date -u '+%m-%d %H:%M') UTC free=${free}G$tag"
sleep 300
done