#!/bin/bash
echo "=== ulimit ==="
ulimit -l
echo "=== Process Memory ==="
PID=$(pgrep -f "python.*main.py" | head -1)
if [ -n "$PID" ]; then
    grep -i -E 'VmSize|VmRSS|VmLck|VmSwap' /proc/$PID/status
else
    echo "ComfyUI not running"
fi
echo "=== System Memory ==="
free -m
echo "=== Swap ==="
swapon --show
