Download memtrace.sh from AjayRangoji/AR: direct link, hf CLI and curl.
- Browser
- Download file 605 Bytes
-
https://huggingface.co/AjayRangoji/AR/resolve/main/memtrace.sh
- Command line
-
hf download hf://AjayRangoji/AR/memtrace.sh
-
curl -L -o memtrace.sh https://huggingface.co/AjayRangoji/AR/resolve/main/memtrace.sh
605 Bytes
| # Every minute for 1 hour: RssAnon (GB) of our biggest training program on this node, with the step. | |
| # Run on a training node: nohup ./memtrace.sh <jobid> > logs/mem_trace.log 2>&1 & | |
| cd /fsx/ajay-stu/AR | |
| J=$1 | |
| # pid= prints no header; tr removes the spaces ps puts in front of the number | |
| P=$(ps -u ajay-stu -o pid= --sort=-rss | head -1 | tr -d ' ') | |
| for i in $(seq 60); do | |
| a=$(awk '/RssAnon/ {printf "%.1f", $2 / 1048576}' /proc/$P/status 2>/dev/null) | |
| s=$(grep "^step" logs/real_$J.log | tail -1 | awk '{print $2}') | |
| echo "$(date -u +%H:%M) step $s RssAnon ${a:-gone} GB" | |
| sleep 60 | |
| done | |