January 16, 201016 yr Yes, but remember that you'd only be able to find out AFTER internet access was restored. So it's really not terribly useful to get email notification AFTER the problem has been resolved. And no, there are (likely) no instructions on setting it up in unraid. You can run unraid under a full slackware distribution and then do anything at all (see instructions elsewhere in the forums). Frozen Bubble anyone? Although this is under the topic UPS support I was also thinking about other problems which might occur while your internet connection is down (due to power outage or for some other reason). My ISP has some service break outs every once in a while and it would be nice to not lose a important notification report just because there is no buffering. I know that periodic reports by unraid_notify pretty much cover all the really important aspects so there is not too much to worry about. I am planning to setup a separate server hosting an email server but I was wondering whether there was a simpler way to solve this for unraid. Specifically I asked what does the term "local mailrelay" refer to. Doing some reading it seems to mean standard email server implementing both the client and server parts of the smtp-protocol. What I was hoping for was even simpler send-buffer processing (i.e try n-times, n-minutes or forever). This could be accomplished even with basic shell scripting using current interfaces, have to do some experimenting...
January 19, 201016 yr Although this is under the topic UPS support I was also thinking about other problems which might occur while your internet connection is down (due to power outage or for some other reason). My experience told me to put the modem under a UPS. In fact, it is near the unRAID server so it use the same UPS.
January 30, 201016 yr Anyone knows if there is a slackware build of latest version of apcupsd 3.14.8 ? I have google it but no luck
February 10, 201016 yr Ok , I have found this apcupsd-3.14.7-i486-1_rlw.tgz But I got a error message when install this Executing install script for apcupsd-3.14.7-i486-1_rlw.tgz. Package apcupsd-3.14.7-i486-1_rlw.tgz installed. /sbin/apcupsd: error while loading shared libraries: libnetsnmp.so.15: cannot open shared object file: No such file or directory Do I need to add some more file to unRAID ? or what can that be why I got this error ? EDIT FYI: This packages is OK apcupsd-3.14.5-i486-1sl.tgz //Peter
February 10, 201016 yr Ok , I have found this apcupsd-3.14.7-i486-1_rlw.tgz But I got a error message when install this Executing install script for apcupsd-3.14.7-i486-1_rlw.tgz. Package apcupsd-3.14.7-i486-1_rlw.tgz installed. /sbin/apcupsd: error while loading shared libraries: libnetsnmp.so.15: cannot open shared object file: No such file or directory Do I need to add some more file to unRAID ? or what can that be why I got this error ? EDIT FYI: This packages is OK apcupsd-3.14.5-i486-1sl.tgz //Peter The version you are attempting to use requires library files that do not exist on unRAID. It is telling you exactly why it cannot run. libnetsnmp.so.15 does not exist on your server. Unless you have a compelling reason to use the newest version, I suggest you use the one most everyone else is using.
February 10, 201016 yr Thanks Joe I think I do what you saying But it was not true what I say about version apcupsd-3.14.5-i486-1sl.tgz I got this messages See the second row ?? Executing install script for apcupsd-3.14.5-i486-1sl.tgz. --- Leaving /etc/apcupsd/apcupsd.conf.new for you to replace /etc/apcupsd/apcupsd.conf Package apcupsd-3.14.5-i486-1sl.tgz installed. And from the syslog Feb 10 20:13:13 Tower apcupsd[12031]: apcupsd FATAL ERROR in smartsetup.c at line 58 Cannot open UPS port : No such file or directory Feb 10 20:13:13 Tower apcupsd[12031]: apcupsd error shutdown completed
February 10, 201016 yr Thanks Joe I think I do what you saying But it was not true what I say about version apcupsd-3.14.5-i486-1sl.tgz I got this messages See the second row ?? Executing install script for apcupsd-3.14.5-i486-1sl.tgz. --- Leaving /etc/apcupsd/apcupsd.conf.new for you to replace /etc/apcupsd/apcupsd.conf Package apcupsd-3.14.5-i486-1sl.tgz installed. And from the syslog Feb 10 20:13:13 Tower apcupsd[12031]: apcupsd FATAL ERROR in smartsetup.c at line 58 Cannot open UPS port : No such file or directory Feb 10 20:13:13 Tower apcupsd[12031]: apcupsd error shutdown completed I see the earlier version does not depend on that library. You now need to figure out how to configure that version. I figured it out for the one in the unMENU package file. You should use that as a guide. There are a whole series of steps you need to perform for the installation, including editing several system files, and creating the interface to the killpower function. My most current unMENU script has the commands shown below in it. Your newer apcupsd package might be compatible, or not. Please let us know. Don't forget, you also need to install the powerdown package for this to work as desired. Joe L. vBATTERYLEVEL=10 #Shutdown will occur when percentage charge remaining is less than this level. vMINUTES=5 #Shutdown will occur when remaining runtime reaches this value. vTIMEOUT=300 #If outage (in seconds) exceeds this value, a shutdown will occur. test -f /etc/apcupsd/apcupsd.conf && rm /etc/apcupsd/apcupsd.conf killall apcupsd 2>/dev/null installpkg apcupsd-3.14.3-i486-1kjz.tgz sed -i -e "s/^DEVICE \/dev\/ttyS0/#DEVICE \/dev\/ttyS0/" /etc/apcupsd/apcupsd.conf sed -i -e "s/^MINUTES 3/MINUTES ${vMINUTES-5}/" /etc/apcupsd/apcupsd.conf sed -i -e "s/^BATTERYLEVEL 5/BATTERYLEVEL ${vBATTERYLEVEL-10}/" /etc/apcupsd/apcupsd.conf sed -i -e "s/^TIMEOUT 0/TIMEOUT ${vTIMEOUT-300}/" /etc/apcupsd/apcupsd.conf sed -i -e "s/WALL=wall/WALL=\"mail -s 'unRAID_Server_UPS_Alert' root\"/" /etc/apcupsd/apccontrol /sbin/apcupsd #Now, put into place the shutdown script replacement echo "/sbin/powerdown" >/etc/apcupsd/doshutdown echo "exit 99" >>/etc/apcupsd/doshutdown chmod 755 /etc/apcupsd/doshutdown sed -i -e "s/\/sbin\/poweroff/\/etc\/apcupsd\/apccontrol killpower; \/sbin\/poweroff/" /etc/rc.d/rc.6
February 10, 201016 yr Hi, i have a file that starts my UPS. so I only change one line what version of the packages I want to try, is this OK ? Viewing: /boot/custom/bin/start_ups.sh #! /bin/bash # Install APC UPS driver module # cd /boot/packages #installpkg apcupsd-3.14.3-i486-1kjz.tgz installpkg apcupsd-3.14.5-i486-1sl.tgz # sed -i -e "s/^DEVICE \/dev\/ttyS0/#DEVICE \/dev\/ttyS0/" /etc/apcupsd/apcupsd.conf sed -i -e "s/WALL=wall/WALL=\"mail -s 'unRAID_Server_UPS_Alert' root\"/" /etc/apcupsd/apccontrol /sbin/apcupsd #Now, put into place the shutdown script replacement echo "/sbin/powerdown" >/etc/apcupsd/doshutdown echo "exit 99" >>/etc/apcupsd/doshutdown chmod 755 /etc/apcupsd/doshutdown sed -i -e "s/\/sbin\/poweroff/\/etc\/apcupsd\/apccontrol killpower; \/sbin\/poweroff/" /etc/rc.d/rc.6 /etc/rc.d/rc.6
February 10, 201016 yr Hi, i have a file that starts my UPS. so I only change one line what version of the packages I want to try, is this OK ? We can't tell... That is what you will tell us. It might work, if the newer version of apcupsd has a apcupsd.conf file in the same format as the older package, and if it works the same way with its control files. You will need to tell us if it works. I can tell you I was a bit surprised to see you invoking rc.6 at the end of your current script. That seems wrong to me. I would think the last thing you need to do is edit it, not re-invoke it and re-start all the services it controls. Was there a reason you needed to do that?
February 10, 201016 yr Joe, the last line is wrong, something happen when I pasted my script. However, I copied your lines and tried, but with no luck, it's the same errors. So back to the old version.
February 11, 201016 yr SOLWED Now I have found a way to get this version running under unRAID -> apcupsd-3.14.5-i486-1sl.tgz Now I looking on a way to find a package for libnetsnmp.so.15 so I can try apcupsd-3.14.7-i486-1_rlw.tgz APC : 001,036,0922 DATE : Thu Feb 11 19:03:44 CET 2010 HOSTNAME : Tower RELEASE : 3.14.5 VERSION : 3.14.5 (10 January 2009) slackware UPSNAME : Tower CABLE : Custom Cable Smart MODEL : Back-UPS ES 550 UPSMODE : Stand Alone STARTTIME: Thu Feb 11 19:03:42 CET 2010 STATUS : ONLINE LINEV : 228.0 Volts LOADPCT : 6.0 Percent Load Capacity BCHARGE : 100.0 Percent TIMELEFT : 37.1 Minutes MBATTCHG : 10 Percent MINTIMEL : 5 Minutes MAXTIME : 300 Seconds SENSE : Medium LOTRANS : 180.0 Volts HITRANS : 266.0 Volts ALARMDEL : Always BATTV : 13.6 Volts LASTXFER : Unacceptable line voltage changes NUMXFERS : 0 TONBATT : 0 seconds CUMONBATT: 0 seconds XOFFBATT : N/A STATFLAG : 0x07000008 Status Flag MANDATE : 2009-09-07 SERIALNO : 3B0937X00942 BATTDATE : 2000-00-00 NOMINV : 230 Volts NOMBATTV : 12.0 Volts FIRMWARE : 828.D3 .I USB FW:D3 APCMODEL : Back-UPS ES 550 END APC : Thu Feb 11 19:04:09 CET 2010
February 11, 201016 yr Since you are trying a newer version I figured I'd look to see the differences from the 3.14.3 version I'm using. The only few that seem to apply I highlighted in blue. Let us know how you do, and the changes you needed to make to get things running on the newest versions. Oh yes, the newest release is less than 1 month old. It is 3.14.8. Release Notes: 3.14.8 -- 16 January 2010 (Maintenance Release) NEW FEATURES * Mac OS X version of apctray (apcagent) for monitoring apcupsd instances. Same feature set as apctray on Windows (monitor multiple instances, get detailed status and events logs). Popup notifications delivered via Growl, if available. * Major update to win32 version of apctray. Includes many visual and usability improvements to match OS X version. * apctest now supports battery calibration and self-test interval control on USB models. Many thanks to James Belleau <[email protected]> for contributing these features. * New SNMP driver that does not require libsnmp.so, thus eliminating issues with not finding the library during shutdown when /usr has been unmounted. The new driver is the default for 'UPSTYPE snmp'. The old driver is still available as "UPSTYPE netsnmp" if needed. BUG FIXES * Add missing NOMINV, NOMOUTV, and NOMPOWER to net clients * Fix missing WALL in apccontrol (debian bug #546019) http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=546019 * Change all time/date strings to simplified ISO format: "YYYY-MM-DD HH:MM:SS +/-UTC" * Fix battery voltage readout on "Back-UPS 500 FW: 6.3.I USB FW: c1" * Remove obsolete image files from source tree * Fix issues with popup.exe running when it shouldn't and sometimes hanging and/or generating an "Interactive Services Dialog Detected" error. * Use /kill switch from the installer to shut down running instances of apcupsd and apctray. This will provide more reliable termination on Vista/Win7. * Update apctest to use 'Q' to exit any menu instead of a number that is always changing. Contributed by James Belleau <[email protected]> * apctest: Fix compiler warnings. Contributed by Andy O'Shaughnessy <[email protected]> 3.14.7 -- 31 July 2009 (Maintenance Release) NEW FEATURES * Multimon CGI programs are included with the Windows binary package BUG FIXES * Windows COM ports above COM9 now work without user needing to manually add \\.\ UNC prefix in apcupsd.conf * Fix configure script not noticing when C++ compiler is missing * Fix for battery date (BATTDAT) displaying invalid values on USB models * Fix version reporting in cgi and examples * Misc documentation fixes for typos, etc. 3.14.6 -- 16 May 2009 (Maintenance Release) NEW FEATURES * Major updates to the User Manual. Rewritten battery maintenance section courtesy of Trevor Roydhouse <[email protected]>. Many other updates including the SmartUPS protocol and OS support sections. Furthermore, the manual is now formatted in reStructuredText (http://docutils.sourceforge.net/rst.html) and as a result is very easy to update. (The only down side is the multi-page HTML version is no longer available; the HTML version is all on a single page.) * New manpages for apcupsd, apcupsd.conf, apctest, apcaccess, and apccontrol. Many thanks to Trevor Roydhouse <[email protected]> for the hard work! * Support for QNX. Tested on QNX 6.3.2. Contributed by Mikhail Gruzdev <[email protected]> * Add support for turning the UPS off completely. This complements existing hibernate (aka killpower) functionality. Turn-off is implemented for apcsmart and USB drivers, subject to support for the relevant commands in the UPS itself. Contributed by Keith Campbell <[email protected]>. BUG FIXES * apcsmart: Deadlock fixes during comms failures. Contributed by Keith Campbell <[email protected]> * linux-usb: Fix out-of-bounds array access. Contributed by David Fries <[email protected]> * Fix build with gcc-4.4. Contributed by Michal Hlavinka <[email protected]> * apcsmart: Fix crash during process shutdown (SIGTERM). Contributed by Andrey Sharandakov <[email protected]> * Several other minor fixes and improvements. See ChangeLog for details. 3.14.5 -- 26 October 2008 (Maintenance Release) BUG FIXES * docs: Document the /refresh switch for apctray. * apctest: Do not create pid file. There is little reason for it since apctest is a command-line tool, not a daemon. Plus nothing ever deletes the file so it interferes with apcupsd operation. * gapcmon: Network connect timeout fix. * Fix a few unsafe uses of sprintf and strcat. * Makefile: Fix cgi build on OpenBSD. libgd on OpenBSD requires X_LIBS for libfreetype and libfontconfig. * gapcmon: Iconify fixes for KDE * Fix LOWBATT glitch handling bug that could cause us to act on a LOWBATT signal immediately instead of waiting for the debounce time. * apctray: Improve multiple instance behavior for /add, /del, and /kill on modern platforms (Win2K and newer). * Support shutting down apcupsd instances running in other sessions (such as terminal services or remote desktop sessions). * Makefile: 'make install' fixes for first install on RedHat/SuSE. * docs: PCNET minimum password length is 15 chars, default username is 'apc', no known way to change the username. * Makefile: Fix dependency build errors on Darwin and other platforms. ('echo -n' is not portable; use 'tr' to strip newline instead) * RPMs: Automatically restart apcupsd when upgrading 3.14.4 -- 18 May 2008 (Maintenance Release) MAJOR CHANGES * Build system rewrite: All Makefiles have been rewritten from scratch. Improvements include reliable dependencies, support for parallel make, elimination of Makefile.in -> Makefile conversion, consistent use of DESTDIR during 'make install', and pretty-printed output during builds. NEW BUILD SYSTEM NOTES - GNU make is required. The configure script checks for this and tells you how to invokve it (on some platforms it is 'gmake' instead of 'make'). - Output during build is pretty-printed by default. To see more details, use 'make VERBOSE=1' for output similar to the old build system. For even more verbosity, use 'make VERBOSE=2'. - Parallel builds work well. If you have a multiprocessor (or multicore) system, try 'make -j<number-of-processors>' for the fastest possible build. * Built-in version of libgd for multimon cgi has been removed. The version previously included in apcupsd was old and likely had security issues. It is safer to use libgd from the target system. Therefore, your system must provide libgd if you choose to build cgi now. Generally this is easy to achieve by installing a vendor-supplied package. * Removal of NLS support: The NLS code was terribly bit-rotted with many non-internationalized messages and almost every translated message was incorrect. At this point the maintenance burden of keeping NLS support building was deemed too high considering the small benefit it was able to provide. * Powerflute has been disabled. It has been broken for the last several releases because it relied on an untrushworthy source of UPS status (rawupsstats) which was itself removed. Powerflute could be converted to use the standard NIS status mechanism and its source code remains in the tree in case someone has the desire to contribute this code. NEW FEATURES * Add POLLTIME directive to control UPS polling interval. This directive specifies the number of seconds to delay between polling the UPS for status. Previously, NETTIME allowed this to be adjusted for network connections only (snmp, pcnet, nis-net). POLLTIME configures the delay for all connection types. NETTIME is accepted as a synonym for compatibility with old config files. BUG FIXES * gapcmon: Corrected the use of NOMPOWER and the calc of current usage amount. Thanks to James Scott Jr <[email protected]>. * Add a heuristic to fix up incorrect NOMINV or NOMOUTV. Some UPSes (RS 500) report decivolts instead of volts. Reported by Kirill S. Bychkov <[email protected]>. * Various build fixes on Solaris and OpenSolaris. Thanks to James Dean <[email protected]> for loaning me an ssh login on his OpenSolaris box. * Fix hal policy file syntax. For some reason this blatantly incorrect file actually works on RHEL5 (hal-0.5.. Thanks to Andrew Telford <[email protected]> for correcting it. * Fix gapcmon build on OpenBSD. * Fix BSD USB driver build. * Fix default NIS port on Debian. Debian is now using the standard NIS port, 3551. Contributed by imacat <[email protected]>
February 11, 201016 yr Yes I now that there are a newer version , but so far I don't have found any version running under slackware, BUT :-) Now also version 3.14.7 are up and running. I'm going to try more to find the latest on, also nice to run the latest version Here is what I did For version 3.14.5 I only needed to update the apcupsd.conf.new in the package. I changeed UPSTYPE apcsmart DEVICE /dev/ttyS0 to.. UPSTYPE usb DEVICE /dev/ttyS0 And for version 3.14.7, there I found a package that have libnetsnmp.so.15. And that packages was net-snmp-5.4a-i486-1kjz.tgz apcupsd.conf.new I changeed UPSTYPE usb DEVICE /dev/usb/hiddev0 to.. UPSTYPE usb DEVICE /dev/ttyS0 UPS Status (from /sbin/apcaccess status) APC : 001,035,0893 DATE : Thu Feb 11 19:29:09 CET 2010 HOSTNAME : Tower VERSION : 3.14.7 (1 August 2009) slackware UPSNAME : Tower CABLE : USB Cable MODEL : Back-UPS ES 550 UPSMODE : Stand Alone STARTTIME: Thu Feb 11 19:28:06 CET 2010 STATUS : ONLINE LINEV : 226.0 Volts LOADPCT : 6.0 Percent Load Capacity BCHARGE : 100.0 Percent TIMELEFT : 37.1 Minutes MBATTCHG : 10 Percent MINTIMEL : 5 Minutes MAXTIME : 300 Seconds SENSE : Medium LOTRANS : 180.0 Volts HITRANS : 266.0 Volts ALARMDEL : Always BATTV : 13.6 Volts LASTXFER : Unacceptable line voltage changes NUMXFERS : 0 TONBATT : 0 seconds CUMONBATT: 0 seconds XOFFBATT : N/A STATFLAG : 0x07000008 Status Flag MANDATE : 2009-09-07 SERIALNO : 3B0937X00942 BATTDATE : 2009-09-07 NOMINV : 230 Volts NOMBATTV : 12.0 Volts FIRMWARE : 828.D3 .I USB FW:D3 APCMODEL : Back-UPS ES 550 END APC : Thu Feb 11 19:29:38 CET 2010
February 11, 201016 yr Now I looking on a way to find a package for libnetsnmp.so.15 so I can try apcupsd-3.14.7-i486-1_rlw.tgz ftp://slackware.osuosl.org/pub/slackware/slackware-current/slackware/n/net-snmp-5.5-i486-2.txz
February 23, 201016 yr Oh yes, the newest release is less than 1 month old. It is 3.14.8. And here is it :-) http://rlworkman.net/pkgs/13.0/i486/apcupsd-3.14.8-i486-1_rlw.tgz Need to update the file apcups.conf.new APC : 001,035,0890 DATE : 2010-02-24 19:58:18 +0100 HOSTNAME : Tower VERSION : 3.14.8 (16 January 2010) slackware UPSNAME : Tower CABLE : USB Cable MODEL : Back-UPS ES 550 UPSMODE : Stand Alone
Archived
This topic is now archived and is closed to further replies.