Capture Neko/WG/network hubs, Studio viewer charts, physical deploy docs, and one-shot scripts so VPS vs physical can be toggled later without losing WIP. Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
1.1 KiB
Python
21 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
import sys
|
|
|
|
import paramiko
|
|
|
|
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect("108.174.50.68", 22, "root", "Xiao4669805", timeout=45, allow_agent=False, look_for_keys=False)
|
|
cmd = r"""
|
|
docker exec douyinweb-neko-1 sh -c 'for f in /proc/[0-9]*/cmdline; do tr "\0" " " < "$f"; echo; done' 2>/dev/null | grep -E 'load-extension|browser-launch|google-chrome' | head -20
|
|
echo '--- env ---'
|
|
docker exec douyinweb-neko-1 sh -c 'echo LIVE=$NEKO_LIVE_OPS_EXTENSION DIR=$NEKO_LIVE_OPS_EXTENSION_DIR MANAGED=$NEKO_MANAGED_POLICIES'
|
|
echo '--- assets status ---'
|
|
curl -fsS http://127.0.0.1:8000/api/youtube/neko/status 2>/dev/null | python3 -c 'import sys,json; d=json.load(sys.stdin); print(d.get("assets")); print([(i.get("id"), i.get("status"), i.get("ready"), i.get("studio_url")) for i in d.get("instances") or []])'
|
|
"""
|
|
_i, o, e = c.exec_command(cmd, timeout=60)
|
|
print(o.read().decode("utf-8", "replace"))
|
|
print(e.read().decode("utf-8", "replace")[:500])
|
|
c.close()
|