Re: [Apcupsd-users] How to install on Ubuntu/Lubuntu/?buntu
Brought to you by:
adk0212
|
From: John H. <ap...@pr...> - 2012-09-27 21:36:17
|
I came to the same conclusion regarding this Back-UPS ES 350 (BE350U)
after some further testing:
I reverted to the apcupsd.conf the installer had created, using
"UPSCABLE smart" and "UPSTYPE apcsmart" with "DEVICE /dev/tty**" then
rebooted. But running "apcaccess status" returned "Error contacting
apcupsd @ localhost:3551: Connection refused." In fact, it turned out
that the service was not running at all, apparently having gagged on
apcupsd.conf.
But with "UPSCABLE usb" and "UPSTYPE usb" with "DEVICE" (no argument),
"apcaccess status" returns the following healthy-looking results:
APC : 001,034,0853
DATE : 2012-09-27 15:04:40 -0400
HOSTNAME : lubuntu
VERSION : 3.14.10 (13 September 2011) debian
UPSNAME : lubuntu
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2012-09-27 13:37:49 -0400
MODEL : Back-UPS ES 350
STATUS : ONLINE
LINEV : 122.0 Volts
LOADPCT : 2.0 Percent Load Capacity
BCHARGE : 100.0 Percent
TIMELEFT : 108.4 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME : 300 Seconds
SENSE : High
LOTRANS : 088.0 Volts
HITRANS : 138.0 Volts
ALARMDEL : No alarm
BATTV : 13.5 Volts
LASTXFER : Low line voltage
NUMXFERS : 0
TONBATT : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
STATFLAG : 0x07000008 Status Flag
SERIALNO : AB0508340843
BATTDATE : 2005-02-16
NOMINV : 120 Volts
NOMBATTV : 12.0 Volts
FIRMWARE : 800.e5.D USB FW:e5
END APC : 2012-09-27 15:04:44 -0400
So it seems that this unit is fairly smart, even though it uses a simple
signalling cable.
--------------------
On to the next issue.
Disconnecting the USB cable should produce an event in the log file and
it should also post a notification somewhere (on the "wall," whatever
that means).
But apcupsd.conf in its Network Information Server parameters section
designates this log file location:
EVENTSFILE /var/log/apcupsd.events
After pulling the USB plug no such file was generated and I saw no
notification.
I had opened a terminal window in case it wanted to post a message
there, but that was likewise unchanged. (The manual says "If you are
running a window manager such as GNOME and don't have a console window
open, you may not receive the wall messages." Perhaps it means a TTY
virtual screen instead of a terminal window.)
Lubuntu (the flavor of Ubuntu I am running) also runs XFCE Power
Manager, which aims to monitor/notify regarding the UPS. Is this likely
to conflict with apcupsd trying to log events and post notifications?
Does anyone know if XFCE Power Manager and apcupsd are bona fide
alternatives to each other? (And interestingly, when I pulled the plug
above, XFCE Power Manager's indicator simply disappeared and gave me no
notices. After I plugged back in, it reappeared and gave me some sort
of a fresh notice that the UPS was connected/charged.)
On 9/21/2012 2:02 PM, upscope wrote:
>
> On Friday, September 21, 2012 11:39:04 AM John Hupp wrote:
>
> In the meantime, I did decide to simply see if it would work without
> doing the preliminary checks.
>
> I used Synaptic to install apcupsd, apcupsd-cgi (the web report
> interface), and apcupsd-doc (documentation). [By the way, what will
> "apt-get install apcupsd;sleep 22;apcaccess" do? I'm a newbie and
> didn't recognize the syntax beyond "apt-get install <package>."]
>
> This did not produce a working installation. So I looked at
> /etc/apcupsd/apcupsd.conf and changed UPSCABLE from "smart" to "usb"
> and UPSTYPE from "apcsmart" to "usb." On this little test setup I am
> using an APC Back-UPS ES 350 (Model BE350U) with an RJ45-to-USB
> cable. I remember reading something about apcupsd being able to use
> more intelligent signalling/protocol than APC provided for with some
> of these models, and perhaps that is the reason it initially installed
> with "smart," but that didn't seem to work.
>
> Anyone know what UPSCABLE and UPSTYPE are supposed to be for this model?
>
> The original cable was P/N AP9827 aka 940-0127B, a simple signalling
> cable. But that was missing and I borrowed a similarly-terminated
> cable from a Back-UPS ES 725 to get this working while I waited for
> the original replacement to come in.
>
> On openSUSE 12.1 and 12.2 with at Back UPS Pro 1300 I just installed
> the ups and configured /etc/apcupsd.conf as follows:
>
> Code:
>
> --------------
>
> # 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 usb
>
> # 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
>
> # the best choice for most installations.
>
> #
>
> # net hostname:port Network link to a master apcupsd through apcupsd's
>
> # Network Information Server. This is used if the
>
> # UPS powering your computer is connected to a
>
> # different computer for monitoring.
>
> #
>
> # snmp hostname:port:vendor:community
>
> # SNMP network link to an SNMP-enabled UPS device.
>
> # Hostname is the ip address or hostname of the UPS
>
> # on the network. Vendor can be can be "APC" or
>
> # "APC_NOTRAP". "APC_NOTRAP" will disable SNMP trap
>
> # catching; you usually want "APC". Port is usually
>
> # 161. Community is usually "private".
>
> #
>
> # netsnmp hostname:port:vendor:community
>
> # OBSOLETE
>
> # Same as SNMP above but requires use of the
>
> # net-snmp library. Unless you have a specific need
>
> # for this old driver, you should use 'snmp' instead.
>
> #
>
> # dumb /dev/tty** Old serial character device for use with
>
> # simple-signaling UPSes.
>
> #
>
> # pcnet ipaddr:username:passphrase
>
> # PowerChute Network Shutdown protocol which can be
>
> # used as an alternative to SNMP with the AP9617
>
> # family of smart slot cards.ipaddr is the IP
>
> # address of the UPS mgmtcard. username and
>
> # passphrase are the credentials for which the card
>
> # has been configured.
>
> #
>
> UPSTYPE usb
>
> DEVICE
>
> # POLLTIME <int>
>
> # Interval (in seconds) at which apcupsd polls the UPS for status. This
>
> # setting applies both to directly-attached UPSes (UPSTYPE apcsmart, usb,
>
> # dumb) and networked UPSes (UPSTYPE net, snmp). Lowering this setting
>
> # will improve apcupsd's responsiveness to certain events at the cost of
>
> # higher CPU utilization. The default of 60 is appropriate for most
>
> # situations.
>
> #POLLTIME 60
>
> # LOCKFILE <path to lockfile>
>
> /Code
>
> -----------------
>
> The above is not the full conf file. But only the changes I made from
> the default. It may work on your system , If I remember this came from
> the apcupsd documentation.
>
> Russ
>
> --
>
> openSUSE 12.2(Linux 3.4.6-2.10-desktop x86_64)|
>
> KDE 4.8.5 "release 521"|Intel core2duo 2.5 MHZ,
>
> |8GB DDR3|GeForce 8400GS(NVIDIA-Linux-x86_64-304.43)
>
>
>
> ------------------------------------------------------------------------------
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
>
>
> _______________________________________________
> Apcupsd-users mailing list
> Apc...@li...
> https://lists.sourceforge.net/lists/listinfo/apcupsd-users
|