import subprocess
result = subprocess.run(
    ['wmic', 'process', 'get', 'ProcessId,Name,CommandLine', '/format:csv'],
    capture_output=True, text=True, encoding='gbk', errors='replace'
)
for line in result.stdout.splitlines():
    low = line.lower()
    if 'uvicorn' in low or ('python' in low and '8900' in low):
        print(line.strip())
