Copyright (C) 2008-2021 Oliver Bohlen.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU Free Documentation License".
This documentation comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
File permissions:
Owner: root
Group: root
Permissions: -rwxr--r--
Click here for a download of the complete file: /etc/apcupsd/apccontrol
Changed on 16.05.18eMail notificvation
export SYSADMIN=rootAfter change
export SYSADMIN=root,user1
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/apcupsd/apcupsd.conf
Changed on 16.05.18Optional UPS name
#UPSNAMEAfter change
UPSNAME usvxgabo
System shutdown below battery level
BATTERYLEVEL 0After change
BATTERYLEVEL 5
System shutdown below remaining runtime on battery
MINUTES 0After change
MINUTES 5
File permissions:
Owner: root
Group: root
Permissions: -rwxr--r--
Click here for a download of the complete file: /etc/apcupsd/changeme
Changed on 16.05.18Battery Change Notification
( /sbin/apcaccess status echo " " echo "$MSG" ) | /usr/local/sbin/xmppsend mail@example.com
File permissions:
Owner: root
Group: root
Permissions: -rwxr--r--
Click here for a download of the complete file: /etc/apcupsd/commfailure
Changed on 16.05.18Communication failure Notification
( /sbin/apcaccess status echo " " echo "$MSG" ) | /usr/local/sbin/xmppsend mail@example.com
File permissions:
Owner: root
Group: root
Permissions: -rwxr--r--
Click here for a download of the complete file: /etc/apcupsd/commok
Changed on 16.05.18Communication OK Notification
( /sbin/apcaccess status echo " " echo "$MSG" ) | /usr/local/sbin/xmppsend mail@example.com
File permissions:
Owner: root
Group: root
Permissions: -rwxr--r--
Click here for a download of the complete file: /etc/apcupsd/offbattery
Changed on 16.05.18Power returned
( /sbin/apcaccess status echo " " echo "$MSG" ) | /usr/local/sbin/xmppsend mail@example.com
File permissions:
Owner: root
Group: root
Permissions: -rwxr--r--
Click here for a download of the complete file: /etc/apcupsd/onbattery
Changed on 16.05.18Power loss
( /sbin/apcaccess status echo " " echo "$MSG" ) | /usr/local/sbin/xmppsend mail@example.com
File permissions:
Owner: root
Group: root
Permissions: -rwx------
Click here for a download of the complete file: /usr/local/sbin/powerconsumption.sh
Changed on 16.05.18Powerconsumtion Statistics
#!/bin/bash usvpower=20 # 20 Watt selfconsumtion maxpower=`apcaccess status | perl -pe 's/ +/ /g;' | grep NOMPOWER | cut -d" " -f 3` while true do loadpct=`apcaccess status | perl -pe 's/ +/ /g;' | grep LOADPCT | cut -d" " -f 3` wattsconsumtion=`echo "scale=2; $loadpct/100*$maxpower+$usvpower" | bc -l | cut -d'.' -f1` echo "`date "+%Y-%m-%d %T"` $wattsconsumtion Watt" >>/var/log/powerconsumption-`date +%Y` sleep 60 done
Please send a feedback to: doc<at>gabosh.net
Howto listingHere you can find the official Gentoo Linux Forums where you can find a lot of answers.
Here a link to the official Gentoo Linux Homepage.