Debian apcupsd get apc ups support to run
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4043
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
First, make life simple on yourself, get a standard usb ups device, ideally from a standard maker like apc.

then follow the advice in this thread (which I have edited to de-ubuntify it and make it more debian standard):

:: Quote ::
open as root this file in your favorite text editor: /etc/apcupsd/apcupsd.conf
Please note that the examples shown below are from my computer and you need to adapt them to your computer. Scroll down very slightly untill you reach this section:

# UPSCABLE <cable>
# Defines the type of cable connecting the UPS to your computer.
#
# Possible generic choices for <cable> are:
# simple, smart, ether, usb
#
# Or a specific cable model number may be used:
# 940-0119A, 940-0127A, 940-0128A, 940-0020B,
# 940-0020C, 940-0023A, 940-0024B, 940-0024C,
# 940-1524C, 940-0024G, 940-0095A, 940-0095B,
# 940-0095C, M-04-02-2000
#
UPSCABLE usbChange the UPSCABLE to the one that matches your paticular battery backup


Scroll down to the next section:
# To get apcupsd to work, in addition to defining the cable
# above, you must also define a UPSTYPE, which corresponds to
# the type of UPS you have (see the Description for more details).
# You must also specify a DEVICE, sometimes referred to as a port.
# For USB UPSes, please leave the DEVICE directive blank. For
# other UPS types, you must specify an appropriate port or address.
#
# UPSTYPE DEVICE Description
# apcsmart /dev/tty** Newer serial character device,
# appropriate for SmartUPS models using
# a serial cable (not USB).
#
# usb <BLANK> Most new UPSes are USB.
# A blank DEVICE setting enables
# autodetection, which is th best choice
# for most installations.
#
# net hostname:port Network link to a master apcupsd
# through apcupsd's Network Information
# Server. This is used if you don't have
# a UPS directly connected to your computer.
#
# snmp hostname:port:vendor:community
# SNMP Network link to an SNMP-enabled
# UPS device. Vendor is the MIB used by
# the UPS device: can be "APC", "APC_NOTRAP"
# or "RFC" where APC is the powernet MIB,
# "APC_NOTRAP" is powernet with SNMP trap
# catching disabled, and RFC is the IETF's
# rfc1628 UPS-MIB. Port is usually 161.
# Community is "private".
#
# dumb /dev/tty** Old serial character device for use
# with simple-signaling UPSes.
#
UPSTYPE usb
DEVICE [Again select the right options for your ups unit]
Also note that "# usb <BLANK>" is not literal, so don't type <BLANK> just leave a blank space. [In other words, just have this:
DEVICE
with nothing after it]

Now save the file the text editor and then close it.

Now edit this file:
/etc/default/apcupsd

# Apcupsd-devel internal configuration

APCACCESS=/sbin/apcaccess
ISCONFIGURED=yes
See the "ISCONFIGURED=no". Change the no to yes just like in my example.

It will say:
ISCONFIGURED=yes

Save button in the text editor and then close the editor.

Keeping your terminal open type, as root:
/sbin/apcupsd

and also make sure it's set to start by default, you can use rcconf or sysv-rc-conf to check this.

Now do this to make sure the service is started properly:
/etc/init.d/apcupsd restart

Look for any errors, if you don't see any thing great.

Keeping your terminal open type:
cat /var/log/apcupsd.events

Don't do any thing in here, just look. It is a log file. Look for an entry like this:
Sun Aug 06 11:15:00 PDT 2006 apcupsd 3.12.1 (06 January 2006) debian startup succeeded



Congratulations. Hope this helps.

Back to top
Display posts from previous:   

All times are GMT - 8 Hours