Page 3 - Contents; Verifying a Source Installation
Contents Apcupsd User’s Manual . . . . . . . . . . . . . . . . . . . . . . . . 6 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 New Features . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 How To Use This Manual . . . . . . . . . . . . . . . . . . . . . . . 9 Bas...
Page 4 - apcaccess Test
Checking Your Configuration File . . . . . . . . . . . . . . . . 44 Arranging for Reboot on Power-Up . . . . . . . . . . . . . . . 45 Making sure apcupsd Is Running . . . . . . . . . . . . . . . . 46 Configuration Examples . . . . . . . . . . . . . . . . . . . . . . . . 47 Simple USB Configuration ....
Page 5 - Master/Slave Configurations
Apcupsd Notification and Events . . . . . . . . . . . . . . . . 70 hid-ups and USB Specific Information . . . . . . . . . . . . . 71 apcupsd Network Monitoring (CGI) Programs . . . . . . . . . 71 Setting up and Testing the CGI Programs . . . . . . . . . . . 71 Configuring Your EEPROM . . . . . . . ....
Page 9 - Credits
Alert messages . . . . . . . . . . . . . . . . . . . . . . . . . . 189 Register 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Register 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Register 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Interpreta...
Page 10 - List of Figures; Windows Install - Winzip Unpack
List of Figures Multimon Main Page . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Multimon Statistics Display . . . . . . . . . . . . . . . . . . . . . . 74 Windows Install - Explorer Window . . . . . . . . . . . . . . . . . 116 Windows Install - Winzip Unpack . . . . . . . . . . . . . . . ....
Page 11 - List of Tables; Single Character Commands
List of Tables Supported UPS Models . . . . . . . . . . . . . . . . . . . . . . . . 13 Supported Features . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 RS232 Wiring and Signal Conventions . . . . . . . . . . . . . . . . 148 Single Character Commands . . . . . . . . . . . . . . . . . . . ...
Page 12 - New Features; Change Log for current version
Apcupsd User’s Manual Release Notes This release contains a good number of cleanups and bug fixes to prior 3.10.xversions, and is intended to be the official release. See the ChangeLog belowfor more details. New Features - Implement USB on all *BSD systems. Note, the kernel drivers on most of these ...
Page 13 - Change Log for older versions
page. Change Log for older versions ----> Release 3.10.16 04Nov04- Adam has fixed the killpower problem for USB so that the USB now properly turns off the power. Nice job. - Converted manual from docbook to texinfo format. There is some cleanup to be done, but we get an index. - Thanks to Adam fo...
Page 15 - Quick Start for Beginners
How To Use This Manual This is the manual for apcupsd, a daemon for communicating with UPSes(Uninterruptible Power Supplies) made by American Power Corporation(APC). If you have an APC-made UPS, whether sold under the APC name-plate or OEMed (The HP PowerTrust 2997A UPS has been tested as a“smartups...
Page 17 - Supported Operating Systems, UPSes and Cables
9. To verify that your UPS is communicating with your computer and will do the right thing when the power goes out, read and follow theinstructions in the Testing (see Testing Apcupsd) section. 10. If you run into problems, read the Troubleshooting (see Troubleshooting Your Installation ) section of...
Page 21 - Here is a diagram that summarizes the possibilities:; Apcupsd Known USB Issues; USB is only supported on Linux and *BSD systems (though
powers a single computer. This is the most common configuration. If you’reworking with just one machine and one UPS, skip the rest of this section. Your choices become more interesting if you are running a small cluster or abig server farm. Under those circumstances, it may not be possible or evende...
Page 22 - HID MAX USAGES undefined
driver to be enabled on other platforms, it will only compile and run onLinux and *BSD systems. - Workaround: Try using UPS in serial mode instead of USB. - Problem: Linux 2.4 series kernels older than 2.4.22 do not bind the USB device to the proper driver. This is evidenced by /proc/bus/usb/devices...
Page 23 - Checking Out Your USB Subsystem; To interpret the codes in this file,; Driver
Checking Out Your USB Subsystem You can skip this section if your UPS has an Ethernet or RS232-C interfaceor you are not running on a Linux kernel. If it has a USB interface, youneed to make sure that your USB subsystem can see the UPS. On a Linuxsystem this is easy, just do this from a shell prompt...
Page 24 - Note that the IOgear device is using the
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=051d ProdID=0002 Rev= 1.00 S: Manufacturer=American Power Conversion S: Product=Back-UPS 350 FW: 5.2.I USB FW: c1 S: SerialNumber=BB0115017954 C:* #Ifs= 1 Cfg#= 1 A...
Page 27 - devfs
where you replace the [ and ] with braces and the serial number with theone that correspnds to your UPS. Some kernels ship, such as Mandrake 10, ship with CON- FIG USB DYNAMIC MINORS turned on. This is not ideal for running with apcupsd, and the easiest solution is to turn CON-FIG USB DYNAMIC MINORS...
Page 28 - source
Finally, check that appropriate USB devices exist. On a Red Hat systemyou can do this: esr@grelber$ ls /dev/usb/h*/dev/usb/hiddev0 /dev/usb/hiddev12 /dev/usb/hiddev2 /dev/usb/hiddev6 /dev/usb/hiddev1 /dev/usb/hiddev13 /dev/usb/hiddev3 /dev/usb/hiddev7 /dev/usb/hiddev10 /dev/usb/hiddev14 /dev/usb/hid...
Page 32 - Building and Installing apcupsd; Installation from Binary Packages; command. You’re done, and can now skip the
The DEVICE setting is blank on purpose; apcupsd will automatically locateyour UPS. The delay-, timeout-, and NIS-related settings should be configured as peryour usual preference. Building and Installing apcupsd Installation from Binary Packages Red Hat Linux: For Red Hat systems, apcupsd is availab...
Page 33 - Installation from Source; start
Installation from Source Installation from source might have to be be done different ways dependingon what system you are running. The basic procedure involves getting asource distribution, running the configuration, rebuilding, and installing. The basic installation from a tar source file is rather...
Page 34 - which
without redoing the configuration process by simply editing the apcupsd.conffile. Other configuration options can be used to set up the installation of HTMLdocumentation and optional modules, notably the CGI interface that enablesthe UPS state to be queried via the Web and the optional powerflute cu...
Page 36 - Configure Options; configure
The purpose of modifying the system halt files is so that apcupsd will berecalled after the system is in a stable state. At that point, apcupsd willinstruct the UPS to shut off the power. This is necessary if you wish yoursystem to automatically reboot when the mains power is restored. If youprefer ...
Page 38 - highly
—enable-test This turns on a test driver that is used only for debugging. By default it is disabled. —enable-nis Turns on the Network Information Server (NIS) code within apcupsd. This is enabled by default. If you do not want to access thestatus of the UPS from the network and you are not controlli...
Page 39 - Recommended Options for most Systems
—with-nis-port= < port > This option allows you to specify what port apcupsd will use for the Network Information Server (the CGI pro-grams). The default is system dependent but usually 3551 becausethat port has been officially assigned to apcupsd by the IANA. Thisoption simply sets the approp...
Page 40 - Compilers and Options; script does not know about. You can specify initial values for
./configure --prefix=/usr --sbindir=/sbin --enable-usb \ --enable-pthreads and you can optionally build and install the CGI programs as follows: ./configure --prefix=/usr --sbindir=/sbin --enable-usb \ --enable-cgi --with-cgi-bin=/home/httpd/cgi-bin \--enable-pthreads Compilers and Options Some syst...
Page 41 - Operating System Specifics; Win32 (see Windows Systems with CYGWIN Installed)
Operating System Specifics With the exception of Linux SUSE and Linux Red Hat systems used bythe developers, we rely on users to help create installation scripts and in-structions as well as to test that apcupsd runs correctly on their system.As you can imagine, most of these people are system admin...
Page 42 - make install
DEVICE /dev/tty01 In addition, you should ensure serial port lock file in apcupsd.conf is definedas: LOCKFILE /var/spool/locks Unlike the Linux systems, the system halt routine is located in /sbin/rc0,so after the make install , please check that this file has been correctly updated. The start/stop ...
Page 43 - option on the apcupsd command line.
single process, and thus is less efficient (consumes more CPU time) than theforking version of apcupsd. We hope to rectify this in a future version byusing the FreeBSD LinuxThreads implementation of pthreads. On the FreeBSD OS, there is no known way for a user program to get controlwhen all the disk...
Page 50 - After Installation; Checking Your Configuration File
After which, you can do a: make And to install apcupsd, do: make install Finally, you should follow the Win32 (see Installation on Windows) instal-lation instruction, skipping the part that describes unZipping the binaryrelease. After Installation Checking Your Configuration File Once you have insta...
Page 51 - usb; Arranging for Reboot on Power-Up
Note that you should enter “/dev/usb/hiddev[0-15]” literally as shown. The“[0-15]” expression tells apcupsd to search all hiddev devices until it finds aUPS. You can restrict the search to a subset of devices by using somethinglike “[0-4]”, but keep in mind this will limit apcupsd’s ability to locat...
Page 52 - Making sure apcupsd Is Running
to Power On . This means that whenever the power is applied they are on. The only way to shut them off is to pull the plug or to have a specialprogram that powers them off (/sbin/poweroff on Linux systems). If after making all the changes suggested above, you cannot get yourcomputer to automatically...
Page 53 - To stop apcupsd you can do the following:; Configuration Examples; A Simple USB Configuration
To start apcupsd manually (as you will probably do immediately followingthe installation), enter the following: /etc/rc.d/apcupsd start Normally, when properly installed, apcupsd will be started and stopped au-tomatically by your system. Unfortunately, the details are different for eachsystem. Below...
Page 54 - A Simple Configuration for a SmartUPS
Notice that we have not specified a device. In doing so, apcupsd will tryall the well known USB ports. We strongly recommend you use this (emptydevice address) form unless you have a good reason to do otherwise. An alternate way of specifying the device is to specify a range of deviceaddressess as f...
Page 55 - A Simple Configuration for a Simple Signaling or Dumb; with; A Simple Master Configuration
Normally you would have many more configuration directives to completelycustomize your installation, but this example shows you the minimum re-quired. A Simple Configuration for a Simple Signaling or Dumb If you have a simple signaling or dumb UPS such as a BackUPS, you willneed to know exactly what...
Page 56 - A Simple Slave Configuration; UPSCABLE ether
## apcupsd.conf v1.1 ##UPSCABLE smartUPSTYPE smartupsDEVICE /dev/ttyS0LOCKFILE /var/lockUPSCLASS netmasterUPSMODE netNETTIME 10NETPORT 6666SLAVE slave1.mynetwork.comSLAVE slave2.mynetwork.com Note, the main difference from the stand alone configuration is that you havespecified UPSCLASS netmaster an...
Page 57 - Variation on the Master/Slave Configuration; ple Configuration for a SmartUPS
Please note, there are reports that you must use UPSTYPE smartups on the slave even if the master is using UPSTYPE dumb . This is apparently some bug in the new dumb driver. In this configuration, the shutdown will be initiated by the master. It is alsopossible to specify BATTERYLEVEL, MINUTES, and ...
Page 59 - Testing Apcupsd; After you start apcupsd, execute the following command:
UPS). The :3551 that follows the NIS server address is the port to use. Thedefault is 3551, but older versions of apcupsd used port 7000. Please do not confuse this NIS server/slave mode with the old master/slavenetwork configuration that is described above. This is a master/slave setup,but much sim...
Page 61 - apcaccess
Logging Test Once you have established that the proper processes are running, do a tailof the system log file, normally /var/log/messages: tail /var/log/messages You should see output that looks similar to the following: Dec 5 17:01:05 matou apcupsd[5917]: apcupsd 3.7.2startup succeeded And if you h...
Page 64 - Communications Test; apccontrol
If you see a message to the effect of: attach_shmarea: shared memory version mismatch (or UPS not yet ready to report) or if all the displayed values are zero, you have not waited long enough.Wait a bit longer and then re-execute the apcaccess status command. If you see a message to the effect of: A...
Page 65 - Simulated Power Fail Test; BATTCHG
At the same time, it sends the same message to the system log and to thetemporary EVENTS file (/etc/apcupsd/apcupsd.events). Plug the serial port plug back into your computer, and within about 12seconds, apcupsd should reestablish communications and broadcast and logthe following message: Communicat...
Page 67 - IMPORTANT; System Shutdown Test
At this point, we recommend that you do a simulated power down of yoursystem. If you are adventuresome or have been through this before, skipto the next section in this manual and do the real power fail shutdown. Ifyou continue with the simulated power down and if all goes well, apcupsdwill go throu...
Page 68 - Full Power Down Test; when it detects a power failure situation (the pres-
Now when you pull the power plug, and either the timer expires or thebatteries are exhausted (see the next section for more details), the systemshould be fully shutdown. After performing this test, please be sure to restore /etc/apcupsd/apccontrolto its previous state. Full Power Down Test To comple...
Page 69 - UPSTYPE smart
look at the “Shutdown grace delay”. Shutdown Sequence If you experienced so problems with the above testing procedures, or if youare porting apcupsd to another system, or you are simply curious, you maywant to know exactly what is going on during the shutdown process. If so,please see the Shutdown S...
Page 71 - Troubleshooting Your Installation; Known Problems with USB UPSes; Some Cheaper Models Do Not Have Battery Charge:
should some how become disconnected during the test. Item 5 is used to program the EEPROM. Please see the Configuration Directives Used to Set the UPS EPROM chapter of this manual for the details. Item 6 will initiate a direct communication between your terminal and theUPS at which point, you can en...
Page 72 - Monitoring and Tuning your UPS
Power Off (killpower) of UPS Does Not Work: Currently (as of 3.10.6) the code to power off the UPS works only if you havea Linux kernel version 2.4.22 or greater, or you have applied the patches inthe examples directory to your kernel. apcupsd Cannot Reconnect After a Reboot: If apcupsd does not con...
Page 73 - eprom
you to do this include one command-line utility (apcaccess) and a GUI youcan use through a Web browser. You can also use apctest to tune someparameters of the UPS itself. apcaccess apcaccess is a program (normally found in /sbin/apcaccess) that permits youto print out the complete status of your UPS...
Page 76 - Apcupsd Notification and Events
ted values that can be set in the EPROM. For information about chang-ing these values, see the section on tuning EEPROM parameters (seeConfiguring Your EEPROM). A typical output from apcaccess eprom is: Valid EPROM values for the SMART-UPS 1000 Config Current Permitted Description Directive Value Va...
Page 77 - NETSERVER on
hid-ups and USB Specific Information The UPS has an internal set of timers and remaining capacity counters,which it uses to determine when to shutdown. These are in addition to the apcupsd counters BATTERYLEVEL and MINUTES. As a conse-quence, apcupsd will shutdown on the first limit that triggers (e...
Page 80 - system
multimon.cgi: This program monitors multiple UPSes at the same time. A typical output ofmultimon.cgi as displayed in your Web browser might look like the following: The machines monitored as well as the values and their col- umn headings are all configurable (see /etc/apcupsd/hosts.conf and/etc/apcu...
Page 85 - Configuring Your EEPROM; apcupsd No Longer Configures EEPROM:
Configuring Your EEPROM If you have a SmartUPS, there are depending on the UPS at least 12 differentvalues stored in the EEPROM that determine how the UPS reacts to variousconditions such as high line voltage, low line voltage, power down graceperiods, etc. In general, for the moment, we do not reco...
Page 88 - Maintaining Your UPS; important
Valid EEPROM values for the SMART-UPS 1000 Config Current Permitted Description Directive Value Values ===================================================================Upper transfer voltage HITRANSFER 253 253 264 271 280 Lower transfer voltage LOTRANSFER 196 196 188 208 204 Return threshold RETUR...
Page 89 - What Various People Have to Say about Batteries; Here is what John Walker has to say about APC UPS batteries:
found that it takes several discharge/charges before the runtime calibrationis accurate. Take care not to discharge your battery too much as it tends toshorten the battery life. What Various People Have to Say about Batteries Here is what John Walker has to say about APC UPS batteries: I thought I’d...
Page 91 - Finally, here is what Carl Erhorn has to say about batteries:
The 1250 can outrun the 3000 by a factor of two under identicalpercentages, or run head to head for the same time. SMART-UPS 3000 is a 48V based or 4 batteries. Smart-UPS1250 is a 24V based or 2 batteries. Cheers, Andre HedrickLinux ATA Development Finally, here is what Carl Erhorn has to say about ...
Page 93 - My comments on this proceedure:
Background: An APC Smart-UPS has a microprocessor which calculates run-time primarily based on the load attached to the UPS and onits battery capacity. On the right side of the front display panelthere is a vertical graph of five LEDs. Each LED is an indica-tion of battery charge in increments of tw...
Page 94 - —Carl
monitoring software. Set the UPS shutdown time to 2 minutes, all other settings tonominal, and disconnect the serial port cable from the UPS be-fore running the recalibration. If you leave a monitoring programrunning through the serial port, it will turn the UPS off early,and you don’t want to do th...
Page 95 - Where Carl Suggests You Get Batteries
Where Carl Suggests You Get Batteries Hi, Folks. I’m just replacing the batteries in one of my SmartUPS models,and it occurs to me that some of you may not know about theplace I get them from. I have no relationship with this com-pany, other than as a customer, but I feel they know what theyare doin...
Page 96 - Here is a link to the APC Battery Store.; Frequently-Asked Questions; Why all the craziness with custom serial cables?
and have never been disappointed. The owner of the place alsois very good on technical issues, so if you have questions on theirproducts, he can get as technical as you need to go. Regards,--Carl Here is a link to the APC Battery Store. Frequently-Asked Questions See the bugs section of this documen...
Page 98 - is
A: No, the error is not serious. Unfortunately, the documentation in the area of master/slaves is not very detailed, and for that reason, yourslave setup is not totally correct as explained below. On master machines, we modify /etc/rc.d/init.d/halt to re-invokeapcupsd with the --killpower option (ac...
Page 103 - apccontrol Command Line Options; printf ‘‘Power problems please logoff.’’
want to send an email message to root. At present the arguments thatapccontrol recognizes are: When apcupsd detects an event, it calls the apccontrol script with fourarguments as: apccontrol < event > < ups-name > < connected > < powered > where: event is the event that occur...
Page 107 - Server/Slave Networking using NIS and the NET Driver:
port), which is called the master, can provide information to other machinespowered by the UPS, called slaves. When the master detects a power failure,it will notify all the slaves (maximum of twenty). If the master detects thatthe battery is low, it will also notify the slave so that the slave may ...
Page 112 - Controlling Multiple UPSes on one Machine; Configuration; The First Copy of apcupsd:
Controlling Multiple UPSes on one Machine You may want to use your server to control multiple UPSes. This is possibleby proper configuration and by running one copy of apcupsd for each UPSto be controlled (recall the Configuration types.). Configuration The way to accomplish the above is to ensure t...
Page 114 - Support for SNMP UPSes; snmp To run apcupsd with an SNMP UPS, you need the following things:; Connecting an SNMP UPS; where the directive is made by four parts:
a serial port card for it, or perhaps use a USB UPS. To ensure that it isproperly shutdown if Computer A goes down, you could run a second copy ofapcupsd on Computer B as a slave connected to the main copy of apcupsd onComputer A. Thus Computer B would be running two slaves, one driven bythe master ...
Page 116 - Running the server as a child of apcupsd; NETSERVER
parameter to 180 seconds or more, depending on how much time yoursystem shutdown requires to umount all the filesystems. • Change /etc/rc.d/apcupsd script adding the ’—kill-on-powerfail’ tothe apcupsd invocation. • Restart your apcupsd With this setup your UPS operations should be safe. Alternate Wa...
Page 117 - Running apcnisd from INETD
be necessary if you use the default apcupsd.conf, since it is already turnedon. Although this method is simple, it affords no protection from the outsideworld accessing your network server unless you are behind a firewall. Inaddition, if there is a bug in the network server code, or if a malicious u...
Page 118 - Running apcnisd Standalome; SERVER
Next, you must modify /etc/inetd.conf to have the following line: apcnisd stream tcp nowait root /usr/sbin/tcpd /sbin/apcnisd -i If you do not want to run the TCP wrapper, then the line should be enteredas follows (not tested): apcnisd stream tcp nowait root /sbin/apcnisd -i Please check that the fi...
Page 119 - apcupsd System Logging; log; Logging Types
/sbin/apcnisd The advantage of running the network information server standalone is thatif for some reason, a client causes the network server to crash, it will notaffect the operation of apcupsd. apcupsd System Logging The apcupsd philosophy is that all logging should be done through the sys- log f...
Page 120 - Implementation Details
For more details on STATUS logging, see the Status (see apcupsd Status Logging) section of the Technical Reference. Logging Events logging consists of logging events as they happen. For example,successful startup, power fail, battery failure, system shutdown, ... See the manual section on customizin...
Page 121 - First as root, you create the named pipe:; Developers Notes
More work needs to be done to the code to ensure that it corresponds to theabove levels. As a practical example of how to setup your syslog() to use the new log-ging feature, suppose you wish to direct all DATA logging to a file named/var/log/apcupsd.data, all EVENTS to the standard /var/log/message...
Page 122 - Installation; WinZip
Installation: Windows The Windows Version of apcupsd The Windows version of apcupsd has been tested on Win95, Win98, WinMe,WinNT, WinXP, and Win2000 systems. This version of apcupsd has beenbuilt to run under the CYGWIN environment, which provides many of thefeatures of Unix on Windows systems. It a...
Page 123 - Yes
• When Zip says that it has one file and asks if it should unpack it intoa temporary file, respond with Yes . • Ensure that you extract all files and that the extraction will go intoC: \ 122
Page 126 - Start
What is important to verify in the DOS window is that the root di-rectory \ is mounted on device c: \ . The DOS window will be followed immediately by a Windows dialoguebox as follows: ! -- imagename=“Windows Install - Success” -- ¿ • On Windows 98, to actually start the service, either reboot the m...
Page 128 - Close apcupsd
charged, the plug icon will become a plug with a lightning bolt in the middle to indicate that the battery is charging. Installation Directory The Win32 version of apcupsd must reside in the c: \ apcupsd \ directory, and there must be a c: \ tmp directory on your machine. The installation will do th...
Page 130 - Post Installation
automatic service, using the Control Panel : reset apcupsd to Automatic startup in the Startup dialogue, then restart apcupsd in the Services di- alogue as shown above in the installation instructions. Frequently after anupgrade, you will click on the Start button and after a few seconds, the system...
Page 131 - Utility Functions; Services
and stopping apcupsd do not work. Use the services control panel instead. On Win95 systems, there are reports that the PIF files do not work. Ifyou find that to be the case, the simplest solution is to use the batch filesthat we have supplied in the c:/apcupsd/bin directory. Also, on Win95systems, w...
Page 132 - Stop; Disclaimer; doshutdown
The functions of Stop , ups-events , and ups-status can be more easily invoked by right clicking on the apcupsd icon in the system tray and selectingthe desired function from the popup menu. Disclaimer Some of the features such as EEPROM programming have not been exhaus-tively tested on Win32 system...
Page 133 - Email Notification of Events; back; Killpower under Windows; To implement this feature, you need to add the
Email Notification of Events On Win95/98 systems, it is possible to receive notification of apcupsd eventsthat are passed to apccontrol. This is possible using a simple email programthat unfortunately is not functioning 100% correctly. In addition, I (Kern)was not able to make this program work on W...
Page 134 - to; Power Down During Shutdown; Nevertheless some people prefer to do a full power down.
c:\apcupsd\apcupsd.exe /service found under the key: HKEY_LOCAL_MACHINE Software\Microsoft\Windows\CurrentVersion\RunServices to c:\apcupsd\apcupsd.exe /service -p If you have a Smart UPS, you can configure the kill power grace period,and you might want to set it to 3 minutes. If you have a dumb UPS...
Page 136 - Depending on whether or not you have
Installation: Serial-Line UPSes Overview of Serial-Interface UPSes If you have a UPS that communicates via serial port, you need to do twothings before you can even think about configuring the software. First, youneed to figure out whether it’s a dumb (voltage-signalling) UPS or speaksthe apcsmart p...
Page 137 - Cables; If you have an apcmart UPS, and you build your own cable, build a; Smart-Custom Cable for SmartUPSes
Connecting a APC USB UPS to either a PC USBor Serial Port An interesting fact is that the USB ports (actually an RJ45 connector)on APC UPSes not only speak USB, but also serial apcsmart and dumbvoltage-signalling as well! This is something that one of our users discoveredby accident. With the Custom...
Page 138 - Smart Signalling Cable for BackUPS CS Models
When using this cable with apcupsd specify the following in apcupsd.conf: If you have an OS that requires DCD or RTS to be set before you canreceive input, you might try building the standard APC Smart 940-0024Ccable listed below. UPSCABLE smartUPSTYPE apcsmartDEVICE /dev/ttyS0 (or whatever your ser...
Page 140 - Voltage-Signalling Cable for “dumb” UPSes; List of components one needs to make the Simple cable:
Voltage-Signalling Cable for “dumb” UPSes NOTE. YOU DO NOT HAVE THIS CABLE UNLESS YOUBUILT IT YOURSELF. THE SIMPLE-CUSTOM CABLE ISNOT AN APC PRODUCT. For “dumb” UPSes using voltage signalling, if you are going to build yourown cable, we recommend to make the cable designed by the apcupsd teamas foll...
Page 141 - Finally, here is another way of looking at the CUSTOM-SIMPLE cable:
5. Double check your work. We use the DTR (pin 4 on the female connector) as our +5 volts power forthe circuit. It is used as the Vcc pull-up voltage for testing the outputs onany “UPS by APC” in voltage-signalling mode. This cable may not work ona BackUPS Pro if the default communications are in ap...
Page 142 - Other APC Cables that apcupsd Supports
n/c | 1 | Frame/Case Gnd (optional) | 9 | 22 Note: the <- and -> indicate the signal direction. Optional connections of original SIMPLE-CUSTOM specificationthat are not used. 4.7K ohm DTR 4 --[####]--* Note needed | RxD 2 ----------*--------- 3 Not used by Apcupsd When using this cable with ap...
Page 143 - Voltage Signalling
Voltage Signalling Features Supported by Apcupsd for Vari-ous Cables The following table shows the features supported by the current versionof apcupsd (3.8.5 or later) for various cables running the UPS in voltage-signalling mode. Cable Power Loss Low Battery Kill Power Cable Discon- nected 940-0020...
Page 144 - The Back-UPS Office 500 signals; It appears that the signals work as follows:; Analyses of APC Cables
Note 2: the same as note 1 except that the line is normally closed, and opens when the line voltage fails. The Back-UPS Office 500 signals The Back-UPS Office UPS has a telephone type jack as output, which lookslike the following: Looking at the end of the connector: 6 5 4 3 2 1 _____________ | . . ...
Page 146 - , who disassembled the original
940-0023A Cable Wiring: This diagram is for informational purposes and may not be complete, wedon’t recommend that use it to build you build one yourself. This cable canonly be used on voltage-signalling UPSes, and apparently only provides theOn Battery signal. As a consequence, this cable is pretty...
Page 151 - From Jan Babinski jbabinsk at pulsarbeacon dot com: (many thanks)
_______________________| . . . . . . . . . . || | ----------------------- |____| From Jan Babinski jbabinsk at pulsarbeacon dot com: (many thanks) The BackUPS XS1000(BX-1000) ships with the 940-0127B usb cable andthe optional 940-0128D serial cable. I’m trying to get it running underOpenBSD so usb i...
Page 154 - RS232 Wiring and Signal Conventions
action = ioctl(TIOMCBIS, DTR) set DTR (kills power) RS232 Wiring and Signal Conventions DB-25 Pin # DB-9 Pin # Name DTE-DCE Description 1 — FG – Frame Ground/Chassis GND 2 3 TD – > Transmitted Data, TxD 3 2 RD < – Received Data, RxD 4 7 RTS – > Request To Send 5 8 CTS < – Clear To Send 6...
Page 155 - Ioctl to RS232 Correspondence; Testing Serial-Line UPSes
The diagram above represents the Female end of the cable. Themale end is the same, but looking from inside the cable. DTE : Data Terminal Equipment (i.e. computer)DCE : Data Communications Equipment (i.e. UPS)RxD : Data received; 1 is transmitted "low", 0 as "high"TxD : Data sent; 1 ...
Page 156 - Establishing Serial Port Connection
to cause premature shutdowns of the UPS power, we strongly recommend, especially for voltage- signaling (dumb) UPSes, that you do most of the ini-tial testing with your computer plugged into the wall rather than your UPS.Thus if the UPS power is suddenly shut off, your computer will continueto run. ...
Page 157 - root
• Make sure you are doing your testing as root otherwise, you may have permissions problems accessing the serial port. • You may have cabling problems, either with an incorrect cable, or theincorrect cable specification directive in the configuration file. • You may have a problem with the /etc/apcu...
Page 159 - Using apctest on Serial-Line UPSses; UPSTYPE backups
Using apctest on Serial-Line UPSses On an apcsmart serial-line UPS, apctest will give you access to the batteryof low-level tests we described in apctest. If you have a voltage-signallingUPS, it enables a different test repertoire which is described here, Amongother things, if you are uncertain abou...
Page 160 - Expected apctest Signals for a UPS:; RTS
3) Test 3 - no power4) Test 4 - low battery (requires test 3 first)5) Test 5 - battery exhausted6) Test 6 - kill UPS power7) Test 7 - run tests 1 through 58) Guess which is the appropriate cable9) quit Select test number: Run tests 1, 2, and 3. Note, none of the currently supported cables willindica...
Page 161 - Troubleshooting Serial Line communications; Determining Which Voltage-Signaling Cable You Have; not; Once you have established serial communications
Expected apctest Signals for a BackUPS Pro: If you have configured your UPS as: UPSTYPE backupsproUPSCABLE APC_940_0095A or APC_940_0095C here are the typical signals you would expect to see in the output from thevarious tests of apctest: Test 1 normal: RTS not set Test 2 no serial cable: not import...
Page 162 - Recalibrating the UPS Runtime; Shutdown apcupsd
Testing Apcupsd) section. One additional note applies: Bizarre Intermittent Behavior: In one case, a user reported that he received random incorrect values fromthe UPS in the status output. It turned out that gpm, the mouse controlprogram for command windows, was using the serial port without using ...
Page 163 - Status Logging On Serial-Line UPSes
damage to the UPS. Try sending an upper case Y to the UPS (with-out a return at the end). It should respond with SM. If this is not thecase, read the chapter on testing. If you fat finger the Y and entery instead, no cause for alarm, you will simply get the APC copyrightnotice. • when you are sure y...
Page 164 - BackUPS and NetUPS Simple Signals; DATA Logging; This feature is somewhat outdated and not often used.
MAINS : LineVoltageState LASTEVNT : LastEventObserved BackUPS and NetUPS Simple Signals LINEFAIL : OnlineStatusBATTSTAT : BatteryStatus DATA Logging This feature is somewhat outdated and not often used. Data logging consists of periodically logging important data concerningthe operation of the UPS. ...
Page 165 - General Configuration Directives
Technical Reference Configuration Directive Reference Configuration directives in /etc/apcupsd/apcupsd.conf control the behaviorof the apcupsd daemon. For most installations it is only necessary to set ahandful of general directives. The rest can be left at their defaults unlessyou have an exotic co...
Page 167 - Configuration Directives used during Power Failures; annoyme
NISPORT < port > This configuration directive specifies the port to be used by the apcupsd Network Information Server. The default is platform dependent, but typically 3551, which we have received fromIANA as the official apcupsd networking port. If you change thisport, you must manually chang...
Page 169 - apcaccess status
minutes specifies that apcupsd should prohibit logins when the re- maining runtime in minutes reaches 110% or less than the valuespecified on the MINUTES configuration directive. Thus if MINUTES is set to 3, apcupsd will prohibit logins when the remaining runtime is less than 3 minutes (3 X 110% = 3...
Page 170 - Configuration Directives used to Control System Logging
the slaves to perform a shutdown then apcupsd will sleep for 30 sec-onds before issuing the shutdown of its own computer. If you needthe master to wait additional time before shutting down (to allow forshutdown of slower slaves or of slaves running software that requiresmore time to shutdown – e.g. ...
Page 171 - Configuration Directives for Sharing a UPS
the Data (see DATA Logging) section of this manual for additionaldetails. FACILITY < log-facility > The facility directive can be used to change the system logging class or facility. The default is DAEMON . This parameter can be useful if you wish to direct the apcupsd systemlogging informatio...
Page 174 - Configuration Directives Used to Set the UPS EPROM; option is specified on the apcupsd command line, and the
SLAVE directives be put in your /etc/hosts file so that apcupsd will be able to resolve the machine name during startup and shutdowneven if DNS is not running. Alternatively, you can use IP addresseson the MASTER and SLAVE directives, but this is less flexible. USERMAGIC < user defined magic >...
Page 176 - apcaccess eeprom; apcupsd Status Logging; Status report format
RETURNCHARGE < min. batt. charge level > This parameter specifies what battery percentage charge is necessary before the UPSwill supply power to your equipment after a power down. Differ-ent values are permitted based on the UPS model, classification, andmanufacture date. Use apcaccess eeprom ...
Page 177 - Status Report Example; An example of output from an international SmartUPS 1000 follows:
Status logging consists of periodically logging ALL available informationconcerning the UPS. Since the volume of data is rather large (over 1000bytes per status), the STATUS data is not automatically sent to the systemlog file, instead, it is written as a series of data records to a specific file(no...
Page 179 - Status Report Fields
Status Report Fields The meaning of the above variables are: APC is the header record indicating the STATUS format revision level, the number of records that follow the APC statement, and the numberof bytes that follow the record. DATE is the date and time that the information was last obtained from...
Page 182 - Logging the STATUS Information; The Shutown Sequence and its Discontents; Shutdown Sequence
Logging the STATUS Information If specified in the configuration file, the STATUS data will also be written tothe system log file. Please note, that it would not normally be wise to writethis data to a normal system log file as there is no mechanism in syslog()to rewind the file and hence the log fi...
Page 184 - option. This will cause apcupsd to program the
This final step is important if you want to ensure that your systemwill automatically reboot when the power comes back on. The actualcode used on the Red Hat version is: # See if this is a powerfail situation. # ***apcupsd*** if [ -f /etc/apcupsd/powerfail ]; then # ***apcupsd*** echo # ***apcupsd**...
Page 186 - Shutdown Problems; just after the line that reads
Configuration section of this manual for more information. See the EEP- ROM (see Configuring Your EEPROM) of this manual for further detailson how to change these EPROM values. Shutdown Problems Obviously if your halt script is not properly modified, apcupsd will not beable to shut off the power to ...
Page 187 - Startup; Windows Considerations; APC smart protocol; Bible
Startup Normally, apcupsd is automatically started when your system is rebooted.This normally occurs because the startup script apcupsd is linked into theappropriate places in /etc/rc.d. On most Linux systems, there is a programcalled chkconfig(8) that will automatically link the startup script. Thi...
Page 188 - NUT; Description
and information graciously supplied by APC. Hopefully, the additions madeherein can benefit the original author and his programming pro ject, andmaybe some day, the apcupsd pro ject and the NUT pro ject can join forces. Description Here’s the information on the elusive APC smart signaling protocol u...
Page 189 - The Smart Protocol; Code
diagram are used to keep PowerChute happy by allowing cable detection.If you use the NUT apcsmart driver, those pins don’t matter. Many thanks to Steve Draper for providing this scan. For additional information on cables, see the section on custom cables (seeCables) in this manual. The Smart Protoco...
Page 195 - Alert messages; Character
Alert messages These single character messages are sent by the UPS any time there is anAlert condition. All other responses indicated above are sent by the UPSonly in response to a query or action command. Character Description ! Line Fail - sent when the UPS goes on-battery, repeated every 30second...
Page 197 - Interpretation of the Old Firmware Revision
= messages. Bit Meaning 0 Output unpowered due to shutdown by low battery 1 Unable to transfer to battery due to overload 2 Main relay malfunction - UPS turned off 3 In sleep mode from @ (maybe others) 4 In shutdown mode from S 5 Battery charger failure 6 Bypass relay malfunction 7 Normal operating ...
Page 198 - Interpretation of the New Firmware Revision; EEPROM Values
I == International 230 Volts A == Asia ?? 100 Volts J == Japan ?? 100 Volts Interpretation of the New Firmware Revision New Firmware revison and model ID String in NN.M.L is the format where NN == UPS ID Code. 12 == Back-UPS Pro 65013 == Back-UPS Pro 100052 == Smart-UPS 70060 == SmartUPS 100072 == S...
Page 200 - Programming the UPS EEPROM
DFO == (4)-all-countries (D)omestic (I)nternational (A)sia (J)apan (M) North America - servers. RSP == Total number possible answers returned by a given CMD.FSZ == Max. number of field positions to be filled.FVL == Values that are returned and legal. Programming the UPS EEPROM There are at this time...
Page 201 - Acknowledgements; Apcupsd — RPM Packaging FAQ; Answers; How do I build Apcupsd for platform xxx?
Acknowledgements The apcupsd has a rather long and tormented history. Many thanks to theguys that, with time, contributed to the general public knowledge. Pavel Korensky < pavelk at dator3.anet.cz > , Andre M. Hedrick < hedrick at suse.de > , Christopher J. Reimer < reimer at doe.carl...
Page 203 - Contributors; Current Code Maintainer and Pro ject Manager:
in your home directory (or edit the file if it already exists) and addthe following line: %_topdir /home/myuser/redhat Credits The success of apcupsd is due to the many people that helped in develop-ment, testing and in many other ways. Thank all the developers that worked hard to make APCUPSDone of...
Page 205 - Pro ject Discussions:; Disclaimer: NO WARRANTY
Pro ject Discussions: APCUPSD Mailing List Thanks to American Power Conversion (APC) who helped in giving techni-cal information on their UPSes. A special thanks to APC who gave me (Riccardo) a Smart UPS1400 INETwhen my old Back UPS v/s 650’s battery died. Thank you guys, your helphas been invaluabl...
Page 206 - Kernel Config; A typical USB section of a .config file might be:
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THEPROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFEC-TIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,REPAIR OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW ORAGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, ORANY OTHER PARTY WHO MAY...
Page 224 - Index; time in seconds
Index /about , 129/events , 129/help , 129/install , 129/kill , 129/remove , 129/run , 129/service , 129/servicehelper , 129/status , 129—disable-install-distdir , 33—enable-apcsmart , 31—enable-cgi , 31—enable-dumb , 31—enable-master-slave , 31—enable-net , 31—enable-nis , 32—enable-powerflute , 31...