Automated UPS Shutdown

From athena

What Bill's script does:

  • Checking to see if the UPS is on battery
  • If it's been on battery for 60 seconds and NOT ON SELF TEST
  • then it starts the shutdown
    • turn off compute PDUs
    • tells the polyserve nodes to shutdown
      • all simultaneously
    • sleeps for 2 minutes
    • tells athena0 to shutdown
    • sleeps for 60 seconds
    • start graceful shutdown (60 second delay before shutdown)
    • 5 more seconds, and then shutdown athena9

How to watch this go down:

  • switch the KVM to athena9
  • log in as root
  • tail -f /var/log/messages