This repository has been archived on 2026-08-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ROCm-Research-Archive/_TestScripts/Scripts and Tests/progress_monitor.sh
T
2026-08-20 00:45:43 +02:00

22 lines
732 B
Bash

#!/bin/bash
# Monitor progress over 10 seconds
pid=$(pgrep -f "python.*main.py" | head -1)
if [ -z "$pid" ]; then
echo "NO PROCESS"
exit 1
fi
for i in 1 2 3; do
echo "=== Check $i ($(date +%H:%M:%S)) ==="
ticks=$(cat /proc/$pid/task/41104/stat 2>/dev/null | awk '{print $14+$15}')
rss=$(cat /proc/$pid/status 2>/dev/null | grep VmRSS | awk '{print $2}')
state=$(cat /proc/$pid/task/41104/stat 2>/dev/null | awk '{print $3}')
vram=$(rocm-smi --showmeminfo vram 2>/dev/null | grep "Used" | awk '{print $NF}')
echo " TID 41104: state=$state ticks=$ticks RSS=${rss}KB VRAM=${vram}B"
# Check log for any new output
tail -3 /home/fabian/comfyui7.log 2>/dev/null
echo ""
sleep 5
done