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/Scripts and Tests/deep_diag.sh
T
2026-08-20 00:45:43 +02:00

33 lines
724 B
Bash

#!/bin/bash
# Deep process diagnosis
PID=$(pgrep -f 'python main.py' | head -1)
if [ -z "$PID" ]; then
echo "NO PROCESS FOUND"
exit 1
fi
echo "=== Process $PID ==="
ps -p $PID -o pid,pcpu,pmem,vsz,rss,state --no-header
echo ""
echo "=== Process state ==="
cat /proc/$PID/status | grep -E 'State|Threads|VmRSS|VmSwap|voluntary|nonvoluntary'
echo ""
echo "=== Waiting on ==="
cat /proc/$PID/wchan 2>/dev/null
echo ""
echo ""
echo "=== Thread CPU usage ==="
ps -p $PID -L -o tid,pcpu,state --no-header | sort -k2 -rn | head -10
echo ""
echo "=== Strace (2 sec) ==="
timeout 2 strace -p $PID -c 2>&1 | head -30
echo ""
echo "=== Log file check ==="
wc -c /home/fabian/comfyui7.log
ls -la /home/fabian/comfyui7.log