feat: add diagnostic and management scripts for DNS, NPM, and cluster infrastructure
This commit is contained in:
16
scripts/check_npm_docker.py
Normal file
16
scripts/check_npm_docker.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import paramiko
|
||||
import sys
|
||||
|
||||
sys.stdout.reconfigure(encoding='utf-8')
|
||||
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
ssh.connect('140.44.4.71', username='snarf', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=5)
|
||||
|
||||
stdin, stdout, stderr = ssh.exec_command('docker ps')
|
||||
print("Docker ps:\n", stdout.read().decode('utf-8', errors='ignore'))
|
||||
|
||||
stdin, stdout, stderr = ssh.exec_command('docker exec -i $(docker ps -q -f name=app -f name=npm) find /data -name "*.sqlite* -o -name "*.conf" 2>/dev/null')
|
||||
print("NPM find:\n", stdout.read().decode('utf-8', errors='ignore'))
|
||||
|
||||
ssh.close()
|
||||
Reference in New Issue
Block a user