#!/usr/bin/env python3
"""Quick status check."""
import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('192.168.178.150', username='fabian', key_filename=r'C:\Users\fabia\.ssh\id_ed25519')
def run(cmd):
    _, so, se = ssh.exec_command(cmd, timeout=15)
    return so.read().decode()

print("=== PROCESS ===")
print(run("bash -c 'PID=$(pgrep -f \"python3 main.py\" | head -1); ps -p $PID -o pid,%cpu,%mem,nlwp --no-headers 2>/dev/null; echo LOAD: $(cat /proc/loadavg)'"))

print("=== GPU ===")
print(run("HSA_OVERRIDE_GFX_VERSION=10.1.0 rocm-smi 2>/dev/null | tail -8"))

print("=== LOG (last 15) ===")
print(run("tail -15 /home/fabian/comfyui.log 2>/dev/null"))

print("=== MEMORY ===")
print(run("free -h"))

ssh.close()
