Skip to content

Instantly share code, notes, and snippets.

@kolyshkin
Created February 17, 2016 05:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kolyshkin/f00bb2ce5f892fb71b3d to your computer and use it in GitHub Desktop.
Save kolyshkin/f00bb2ce5f892fb71b3d to your computer and use it in GitHub Desktop.
This briefly explains my setup for a CyberPower CP1500PFCLCD UPS on a CentOS 6 system
/// CONFIGURATION FILES
[root@micros ~]# for f in /etc/ups/*; do echo; echo "### FILE: $f ###"; grep -vE '^#|^$' $f; done
### FILE: /etc/ups/nut.conf ###
MODE=standalone
### FILE: /etc/ups/ups.conf ###
[ups]
driver = usbhid-ups
port = auto
### FILE: /etc/ups/upsd.conf ###
LISTEN 127.0.0.1 3493
### FILE: /etc/ups/upsd.users ###
[uspmon]
password = secret
upsmon master
### FILE: /etc/ups/upsmon.conf ###
MONITOR ups@localhost 1 uspmon secret master
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5
### FILE: /etc/ups/upssched.conf ###
CMDSCRIPT /usr/bin/upssched-cmd
[root@micros ~]# cat /etc/sysconfig/ups
# If the UPS is locally attached set it to "yes"
SERVER=yes
# Any options to pass to upsd
UPSD_OPTIONS=
# This *must* be the same as in /etc/ups/upsmon.conf
POWERDOWNFLAG=/etc/killpower
#
# [End]
/// PACKAGES
[root@micros ~]# rpm -qa nut\*
nut-client-2.6.5-2.el6.x86_64
nut-2.6.5-2.el6.x86_64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment