Cyberpower – power panel

root@donkey:/data/software# dpkg -i powerpanel_132_amd64.deb

root@donkey:/data/software# pwrstat -status -test

The UPS information shows as following:

Properties:
    Model Name................... CP1000PFCLCD
    Firmware Number.............. 000000000000
    Rating Voltage............... 120 V
    Rating Power................. 600 Watt

Current UPS status:
    State........................ Normal
    Power Supply by.............. Utility Power
    Utility Voltage.............. 122 V
    Output Voltage............... 122 V
    Battery Capacity............. 100 %
    Remaining Runtime............ 36 min.
    Load......................... 102 Watt(17 %)
    Line Interaction............. None
    Test Result.................. Unknown
    Last Power Event............. None

root@donkey:/data/software# pwrstat -config

Daemon Configuration:

Alarm ………………………………………. On
Hibernate …………………………………… Off

Action for Power Failure:

Delay time since Power failure ............. 60 sec.
Run script command ......................... On
Path of script command ..................... /etc/pwrstatd-powerfail.sh
Duration of command running ................ 0 sec.
Enable shutdown system ..................... On

Action for Battery Low:

Remaining runtime threshold ................ 300 sec.
Battery capacity threshold ................. 35 %.
Run script command ......................... On
Path of command ............................ /etc/pwrstatd-lowbatt.sh
Duration of command running ................ 0 sec.
Enable shutdown system ..................... On


root@donkey:/data/software# pwrstat -config

Daemon Configuration:

Alarm ………………………………………. On
Hibernate …………………………………… Off

Action for Power Failure:

Delay time since Power failure ............. 60 sec.
Run script command ......................... On
Path of script command ..................... /etc/pwrstatd-powerfail.sh
Duration of command running ................ 0 sec.
Enable shutdown system ..................... On

Action for Battery Low:

Remaining runtime threshold ................ 300 sec.
Battery capacity threshold ................. 35 %.
Run script command ......................... On
Path of command ............................ /etc/pwrstatd-lowbatt.sh
Duration of command running ................ 0 sec.
Enable shutdown system ..................... On

root@donkey:/data/software# cat /etc/pwrstatd-powerfail.sh

!/bin/sh

echo “Warning: Utility power failure has occurred for a while, system will be shutdown soon!” | wall

export RECEIPT_NAME
export RECEIPT_ADDRESS
export SENDER_ADDRESS

#

If you want to receive event notification by e-mail, you must change ‘ENABLE_EMAIL’ item to ‘yes’.

Note: After change ‘ENABLE_EMAIL’ item, you must asign ‘RECEIPT_NAME’, ‘RECEIPT_ADDRESS’, and

‘SENDER_ADDRESS’ three items as below for the correct information.

#

Enable to send e-mail

ENABLE_EMAIL=yes

Change your name at this itme.

RECEIPT_NAME=”Jeremiah Jester”

Change mail receiver address at this itme.

RECEIPT_ADDRESS=jeremiahjester@gmail.com

Change mail sender address at this itme.

SENDER_ADDRESS=root@donkey.duckdns.org

Execute the ‘pwrstatd-email.sh’ shell script

if [ $ENABLE_EMAIL = yes ]; then
/etc/pwrstatd-email.sh
fi


Leave a Reply