This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
computing:linux:ups:cyberpower [2012/12/26 11:18] gcooper |
computing:linux:ups:cyberpower [2023/05/10 14:02] (current) gcooper |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Configure CyberPower UPS Monitoring on Linux ====== | ====== Configure CyberPower UPS Monitoring on Linux ====== | ||
- | ===== CyberPower PowerPanel for Linux ===== | + | http:// |
- | ==== Installation | + | ===== PowerPanel Business 4 Linux ===== |
- | Connect the included USB cable to UPS. You may have problems getting it to work with the serial cable. | + | **Download**: |
- | === RPM === | + | **Manual**: https:// |
- | :!: Tested with SME Server 8 and a CyberPower CP900AVR UPS. | + | ==== Installation ==== |
- | < | + | :!: Tested with XCP-ng 8.2 and a CyberPower CPS1500AVR UPS. |
- | rpm -Uvh http:// | + | |
- | </ | + | |
- | === Tar === | + | :!: Connect the included USB or serial cable to UPS. |
- | :!: Tested | + | :!: We use the **Local** version for single servers |
- | + | ||
- | Download the PowerPanel software to the machine where the UPS is connected: | + | |
- | + | ||
- | wget http:// | + | |
- | + | ||
- | Unpack and install: | + | |
- | + | ||
- | tar -xzvf powerpanel-1.1.tar.gz cd powerpanel-1.1 ./install.sh | + | |
- | + | ||
- | ==== Check Communications ==== | + | |
< | < | ||
- | pwrstat | + | wget https:// |
- | pwrstat | + | chmod +x ppb470-linux-x86_x64.sh |
+ | ./ | ||
</ | </ | ||
- | Verify startup: | + | Check that services started: |
< | < | ||
- | chkconfig --list |grep pwr | + | systemctl status ppbed.service |
+ | systemctl status ppbwd.service | ||
</ | </ | ||
- | For SME Server only which uses runlevel 7: | + | ==== Access ==== |
- | < | + | Default credentials: |
- | ln -s /etc/rc.d/init.d/pwrstatd /etc/rc7.d/ | + | |
- | </ | + | ^Username ^Password |
+ | |admin | ||
+ | |||
+ | Use a web browser from a workstation: | ||
+ | |||
+ | **http://ip.of.linux.svr:3052** | ||
==== Configuration ==== | ==== Configuration ==== | ||
Line 88: | Line 83: | ||
</ | </ | ||
- | ==== Testing ==== | + | ===== Testing |
- | You may want to change the lowbatt-threshold so the box shuts down in a shorter | + | You may want to change the lowbatt-threshold |
< | < | ||
- | lowbatt-threshold = 15 | + | lowbatt-threshold = 90 |
service pwrstatd restart | service pwrstatd restart | ||
tail -f / | tail -f / | ||
+ | </ | ||
+ | |||
+ | ===== XenServer ===== | ||
+ | |||
+ | :!: These settings are probably not ideal, but are a good start. | ||
+ | |||
+ | Modifications to above for XenServer: | ||
+ | |||
+ | < | ||
+ | vi / | ||
+ | </ | ||
+ | |||
+ | And change: | ||
+ | |||
+ | < | ||
+ | powerfail-shutdown = no #we want to shut down the UPS when the battery gets low, not when the power fails | ||
+ | shutdown-sustain = 600 #set this to a little longer than it takes to shut down all VMs and your server | ||
+ | lowbatt-threshold = 35 # | ||
+ | lowbatt-duration = 60 #allow the script to run for 60 seconds before the shutdown | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | vi / | ||
+ | </ | ||
+ | |||
+ | and append: | ||
+ | |||
+ | < | ||
+ | xe vm-shutdown power-state=running --multiple | ||
</ | </ |