feat(power): complete Phase 7 Power Resilience & UPS Automation deployment and verification

This commit is contained in:
2026-11-02 21:58:49 -05:00
parent 7ca3d5acb8
commit d3e2e1f291
8 changed files with 216 additions and 40 deletions

View File

@@ -0,0 +1,27 @@
import paramiko
def main():
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('14.4.4.44', username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
print("=== UPSC METRICS ===")
stdin, stdout, stderr = ssh.exec_command('upsc server-closet@127.0.0.1')
print(stdout.read().decode())
print("=== NUT.CONF ===")
stdin, stdout, stderr = ssh.exec_command('grep -v "^#" /etc/nut/nut.conf | grep -v "^$"')
print(stdout.read().decode())
print("=== UPS.CONF ===")
stdin, stdout, stderr = ssh.exec_command('grep -v "^#" /etc/nut/ups.conf | grep -v "^$"')
print(stdout.read().decode())
print("=== UPSMON.CONF ===")
stdin, stdout, stderr = ssh.exec_command('grep -v "^#" /etc/nut/upsmon.conf | grep -v "^$"')
print(stdout.read().decode())
ssh.close()
if __name__ == '__main__':
main()