Network UPS Tools
Last updated 2008/03/18
Upsmon runs this command when the system needs to be brought down. If it is a slave, it will do that immediately whenever the current overall power value drops below the MINSUPPLIES value above. When upsmon is a master, it will allow any slaves to log out before starting the local shutdown procedure.
Return to the Suffield Academy Network Documentation Homepage
A printable version of this documentis also available.
- Network UPS Tools
- Server Setup
- Compiling NUT
- Replacing Batteries
- Iv. Contents UPSMON User Manual 2. Uninstall procedure for UNIX 74 3. Uninstall procedure for Novell Netware 74 4. Uninstall procedure for Mac OS X 74 VIII. Configuration for expert users 75 1. Manual changes of the UPSMON.INI parameters 75 2. Console execution of Upsagent 75 IX. Communication port specifications 77.
- Transfer files via USB from your Android to your Mac. BitTorrent, Inc. One of the best choices to download torrents. The world's most annoying goose has arrived on Mac. Build and create, your imagination is the only limit.
Introduction
To prevent data loss and corruption, Suffield has severalUniterruptable Power Supplies (UPSes) that providebattery-backed power in the event of an electrical outage.
Most of our UPSes have a serial port, which allows a computer runningmonitoring software to receive status updates from the unit. Thisway, the host can shut down when the batteries of the unit run low.
Because each of our UPSes have more than one server attached to them,we needed a centralized way to manage the UPSes and shut down allaffected servers during an outage. We settled on a software packagecalled NUT, which stands forNetwork UPS Tools.
The software is easy to compile for UNIX-based operating systems, andthere is also a Windows client available. NUT provides monitoring,reporting, alerts, and a client-server model that allows for verycomplex setups involving multiple servers and UPSes.
Suffield's Setup
At Suffield Academy, we have a single centralized host that acts asthe master server for UPS information. It has a multi-port serialcard, and all UPS units are attached directly to it. All other hostsconnect to this server via the network and poll it for UPS statusinformation.
This centralized setup allows us to easily add new servers to ourpower configuration. We simply add client software to the machine andconfigure it to poll a particular UPS instance on the server. Theserver automatically broadcasts power outage events to the clients,which shut themselves down before the batteries are completelydrained.
Server Setup
Suffield uses a setup where all the UPS units are connected to asingle centralized server. This section deals with setting up such acentralized system, though it is relatively straightforward to adaptit to a multiple-master configuration as well.
Install the Software
Get and install the
nut
package. This means compiling it fromsource, or downloading a version through your distribution's packagingsystem. Note that some package systems break NUT up into severalpieces (e.g., drivers, client, and server), so you may need toinstall more than one package.Under Debian Linux (our platform of choice), this ought to do it:
Port Identification
The first step is to get a list of the port devices on your server,and figure out which ones go with which UPS. For example, if you'veplugged a UPS into serial port 1, it might be connected on
/dev/ttyS0
under Linux. If you have multiple serial ports(perhaps through an add-on board or other interface), you'll need tocome up with a mapping of all the device names to the ports they use.We highly recommend labelling the ports externally so that you mayeasily verify their device assignments.
You must change the permissions on all ports so they are accessible bythe daemon running NUT. Under Debian, the files should be owned touser
nut
and group nut
. Additionally, make sure no otherusers have write access to the device:Configuring the UPSes
Begin by editing the
ups.conf
file. This file defines all the UPShardware that is directly connected to this machine.For each UPS, you must specify the following:
- A name for the UPS
- The device it is connected to
- A short description
- When to shut down the load (
sdorder
) - How to shut down the load (
sdtype
-- certain models only)
The
sdorder
flag allows certain UPSes to be powered down beforeothers. Use this to enforce an ordering on the powerdown sequence(lower numbers are powered down before higher numbers; -1 excludesfrom the sequence entirely).The
sdtype
is special to the apcsmart
driver (which we usewith our APC UPSes). It determines the shutdown command to send tothe UPS (e.g., power off but don't restart automatically, poweroff now, power off with delay).A sample stanza might look like:
Note: we name our UPS hardware after bratty spoiled people (the'SSW'naming scheme), which is why you'll see several women's names in oursample configs.
Configuration Access Controls
Once you've defined the hardware attached to the machine, you must nowspecify who has access to the hardware (via the
upsd
daemon).Configuring Network Access
Begin by editing the
upsd.conf
file. This file allows you tospecify ACL statements defining network hosts (or blocks).You must add two lines for each host or netblock you wish grant accessto. The first defines the host/netblock with a name, and the secondgrants (or revokes) access. Any configuration should include entriesfor the local machine, and a default deny:
Finer-grained control of who can log in from where is possible bycombining ACLs with user-based permissions (see next section).
Configuring User Access
You may further restrict who has access to which UPS (and what theycan do with it) by specifying users. In our case, the 'division oflabor' is quite clear-cut (a server which controls all the hardware,and numerous clients that may only poll for status). Thus, we onlyneed a few users: one with full control, one that can monitor and takeaction on all UPSes, and one that can only monitor.
If your setup is more complex, you may need additional users.Additionally, you may wish to create individual users for particularmachines for finer-grained control.
Here's a sample minimum configuration:
Configuring Monitoring
The server is now configured to 'listen' to several pieces of UPShardware. We must now specify which UPSes this machine will monitorand interact with, so that we can automatically shut down machines,send pages and e-mails, and take other actions.
We do this by editing the
upsmon.conf
file. This file is quitelarge, so we'll take several steps to make all the edits necessary.Monitoring
You must specify the UPSes you wish to monitor. Since we have a 'onecentral server' approach, we add monitoring lines for all UPSesattached to the machine.
The central server should be allowed to interact with the UPS hardware(i.e., turn it off and on), so we use our 'master monitor' nameand password for each UPS.
Note that each
MONITOR
line must have a 'power value' associatedwith it, specifying how many outlets on the current machine arepowered by this UPS. Unfortunately, setting the power value to 0means that the system will not automatically report status on theUPS. Thus, for a central master system, you'll need to assign apositive integer for every UPS that you're managing.This complicates things a little, as now you have a machine thatappears to be powered by many UPSes. The remedy is as follows:
- Set the power value of the UPS(es) that provide power to the serverhigh enough so that it is greater than the power value of all theother UPSes combined.
- Set the
MINSUPPLIES
value to this high value.
The net effect is that the UPSes connected to the server will be'weighted' to count more than the other UPSes. This way, the systemwon't actually initiate a shutdown until it's lost the UPSes that arecruicial to its operation, but will still process events from theother UPSes.
External Processes
NUT has the ability to run an external program whenever an event isreceived from a UPS. To make this as flexible as possible, NUTincludes a binary called
upssched
which processes events from theUPS and fires off a script of your choosing when they occur.It's a little complicated because of this extra binary, but it workswell and is quite flexible.
Begin by editing
upsmon.conf
and adding an entry forNOTIFYCMD
. We use the built-in upssched
binary, as itprovides several useful features (like timers):(Note that the location of the binary may be different on yoursystem.)
Once you've done that, move down in the file and add entries for
NOTIFYFLAG
. We must tell upsmon
what to do with each event itreceives from a UPS; it can be any combination of the following:- Write a message to the system log
- Write a message to all logged in users
- Execute the
NOTIFYCMD
- Ignore the event
We've opted to log all messages to syslog and execute
upssched
:Now, save your changes and edit the file
upssched.conf
. This filedetermins what upssched
does when it receives an event. At first,the file seems a little limiting; you may only specify one script toexecute for all events. However, it provides one very importantfeature which makes it worth it: timers.Upsmon Macos
upssched
has the ability to trigger a timer for any event, andto cancel a timer that has not executed. For example, you could set a30-second timer to send an e-mail when an UPS goes on battery, andthen cancel the timer when the UPS goes back on line power. Thisgives you an easy way to 'buffer' events before they get acted on,which is very useful for power 'blips' (e.g., outages lastingfewer than 30 seconds).Begin by declaring the command to execute for all events. We havewritten our own script, called
upssched-dispatch
(download it from our website),which is written in Perl:You may need to specify values for
PIPEFN
and LOCKFN
,depending on your operating system layout and configuration defaults.For example, on a Debian system you need the following:Finally, you must specify the events you wish to act on. We do thisby specifying
AT
commands in the config file. The general formis:The event may be any UPS event (e.g.,
ONBATT
, COMMBAD
).The upsname is the name@host identifier for the UPS. The action isone of EXECUTE
, START-TIMER
, or CANCEL-TIMER
. Thearguments get passed to your command script.You need to pick an arrangement of actions such that you're notifiedof all the events you want to hear about. Seeour configuration filefor an example of how we've done it.
One important note: you may use
*
in place of a particular UPSname. However, if you do so with a timer, you may find that someevents get masked by others. If you're going to use timers, youshould set a specific timer for each individual UPS.Enable NUT
Now that NUT is configured, you're ready to turn it on. Under somesystems, you may need to edit a file so NUT knows to officially launchand take over power management for your system.
Under Debian, you must edit the
/etc/default/nut
file and enablethe UPSD and UPSMON subsystems.Once you've done this, you can start the daemon, and check your syslogfile to see if it's started properly. You should see status messagesfrom all your UPSes.
NUT CGI
NUT includes one final piece of functionality: the ability to reportUPS status via a web interface. Most packaged versions of NUT includethis functionality as a separate install, so it may not be includedwith the standard NUT daemon.
The CGI is simple to configure; enable it as you would any other CGI(see your web server documentation for more info), and then add thefiles
hosts.conf
, upsstats.html
, upsstats-single.html
, andupsset.html
to your configuration directory (you may omitupsset.html
if you do not wish to allow editing UPS configurationsvia the web).The
hosts.conf
file simply lists the UPSes you wish to makeavailable via the web interface.The HTML files contain a template file that is used by the CGI togenerate pages about all (or one) UPS(es). The default files show areasonable amount of information, though you may wish to edit them toyour taste (to display additional information, or to alter theformatting).
Compiling NUT
Precompiled versions of NUT exist for many free operating systems(such as Linux or the BSDs). If you use one of these operatingsystems, consult your package manager to see if a ready-made versionis available.
We have compiled our own versions of the NUT software for theoperating systems that we use at Suffield (see previous sections fordownloads). Here is a brief guide for compiling from scratch, gearedtowards Mac OS X.
Getting the Sources
There are three major versions of NUT available as of this writing:
- The 'old' 1.4 series.
- The 'stable' 2.0 series.
- The 'unstable' 2.1 series.
While the 1.4 and 2.0 series are protocol-compatible (i.e., a 1.4client can talk to a 2.0 server), the configuration files andstructure are not compatible. Thus, you should try to stick withthe same major release across platforms. We currently use the stable2.0 series.
Download the latest stable client from the NUT downloads page:
Unpack the distribution on your machine, and move into the top-leveldirectory.
Add a User
For security purposes, NUT prefers to run under its own username. Youshould create a local username on your machine using the standardaccount creation tools. The user should not have login access to theaccount, so disable logins via a bogus password or other accountlocks.
We use
nut_upsmon
as the username for our custom installations.Build the Software
In the top-level configuration directory, run the
configure
script. You may wish to provide options to configure
to customizeits behavior; here are the options we use:--prefix=/usr/local/nut_upsmon
, which locates all the installedsoftware to a single directory on the filesystem (makes for easierpackaging).--with-statepath=/usr/local/nut_upsmon/state
, which tells NUT tostore driver information in the local software tree. Defaults to/var/state
, but we move it to make it easier to track.--with-user=nut_upsmon
, which is the user we created in theprevious step.--with-drivers=apcsmart
, which reduces the drivers weuse. In reality, the clients probably won't need any drivers, asthey'll be querying our master server. We throw the drivers in 'forfree' in case we need them (we only use APC model UPSes, so this is aneasy choice). You should include only the UPSes that your site uses.
Once the configure step is done, run
make
to compile the software.When
make
is finished, you may install the software directly byrunning make install
, or you may divert the install to anotherdirectory for packaging. Since we build packages, we opt for thelatter:Configure the Software
You'll need to add configuration files to
/usr/local/nut_upsmon/etc/
for the clients. Because we run acentralized server, the clients should not need any configurationfiles dealing with the 'server' parts of NUT. At a minimum, you'llneed an upsmon.conf
file (specifying a remote UPS to monitor), andyou may optionally want an upssched.conf
file if you wish toperform additional tasks (such as early shutdowns).Our setup involves three custom files, which you may download below:
upsmon.conf
(download),which specifies a remote server to query for UPS state information.upssched.conf
(download),which specifies a special script (early-shutdown
; see below) toexecute when a UPS has been on battery for a certain amount of time.This allows certain machines to be shutdown before the battery goescritical.early-shutdown
(download), which is a script thatreceives events fromupssched
and shuts the machine down early.
Launch the Software
The software should be configured to run on boot. For UNIX-basedsystems, this probably involves editing the init scripts on theplatform.
For Mac OS X, we prefer to use
launchd
, which is Apple's new wayof automatically running software starting with 10.4. Unfortunately,nut
doesn't play nice with launchd
by default, as it detachesand forks from the controlling terminal.We've written a simple wrapper script that sits between
launchd
and upsmon
(the client part of nut
). It's calledupsmon_launchd_wrapper
, and you candownload it from our site. You'll also need thelaunchd plist file,which should be placed in the /Library/LaunchDaemons
folder andactivated.Replacing Batteries
When to Replace?
Ordinarily, the UPS will let you know when it thinks it's time toreplace its battery. Most UPSes self-test on a regular basis, and ifone of these tests shows that the battery isn't holding a propercharge, a REPLBATT message will be issued by NUT. Do not ignorethese messages! Batteries that don't hold a charge may providelittle (or no) runtime.
Replacing the Battery
Order a replacement battery for the UPS. In the case of APCSmart-UPSes, the batteries can be swapped while the UPS is poweredon. Simply unscrew the bezel, pull the large power connectors, andremove the old battery. Replace with the new battery and reverse thesteps to close the UPS up.
Updating the Battery Date Variables
APC UPSes have internal variables that allow you to keep track of whenthe battery was installed. Unfortunately, these variables are not setautomatically, so you'll need to freshen them up when you add the newbattery.
To do this, run the
upsrw
command, and provide the date (you'llneed the master user password):We use a textual month to prevent ambiguity in date format.
Refreshing UPS Battery Data
Once the battery is installed, you'll need to let the UPS know thatthere's a new battery. APC recommends waiting at least 8 hours for the battery to get a full charge before you re-run the self test.Once 8 hours have elapsed, issue a self-test and the 'replace battery'light should go out.
Unfortunately, this process isn't perfect, and sometimes the UPS willstill think it needs a new battery. This can manifest in one of twoways:
- The UPS continues to fire a REPLBATT event (the red light on thefront panel remains lit)
- The UPS reports a 'low battery' condition, even though it is online power and not over load. You will note that the estimatedruntime is lower than it should be (possibly only 1-4 minutes).
If this happens, try the following until the situation is resolved:
The Easy Way
Issue a self-test on the UPS, by holding in the test button (orstarting the test from software). The 'replace battery' light shouldgo out after the test.
Upsmon For Mac Os
The Hard Way
If the self-test doesn't seem to 'take', you can perform a runtimecalibration. You can start this by issuing an ups command:
The calibration process must be started with the ups at a 100% charge!The calibration also must have a load attached (if you're nervousabout production machines being attached, find a 'dummy' load to run.
The process puts the UPS on battery, and drains the battery to 25%before automatically switching to line power. The UPS uses the loaddata and time to compute the new runtime estimate.
The Really Hard Way
If a software calibration doesn't help, then a forced calibration maybe necessary. The following are taken from the NUT FAQ(http://www.networkupstools.org/faq/) and also from phone instructionsgiven by an APC technition.
- Disconnect any serial monitoring cables (we don't want the serverinterfering with the UPS)
- Hook up a dummy load (we're going to drain the UPS completely, sodon't use any production machines). Ideally, the load should be about30% of the UPS capacity (2 out of 5 LEDs lit on the front).
- With the load attached and stable, pull the plug. The NUT FAQ saysthat the UPS must remain grounded, but APC didn't mention this. Ifyou want to stay grounded, keep the UPS plugged in, but attach it to adevice that can cut the circuit without disconnecting from ground (asurge protector, perhaps).
- Kick back and wait for the UPS to drain completely. It will beep alot; just go do something else for a while and let it drain.
- Once the UPS has drained, plug it back in and turn it back on. TheUPS should now have re-calibrated itself with the runtime data.
On this page
Description
UPSmon is a multiplatform client-server software that enables remote monitoring of the UPS with SNMP, HTTP, and UDP.
* Scheduled and event-triggered actions (remote and local messages, email, sms)
* HTTP communication with standard internet browsers
* SNMP communication with standard NMS
* Local and remote shutdown
* Cascade monitoring and cross-platform interoperability with other servers
* Control logic for...
Read more
* Scheduled and event-triggered actions (remote and local messages, email, sms)
* HTTP communication with standard internet browsers
* SNMP communication with standard NMS
* Local and remote shutdown
* Cascade monitoring and cross-platform interoperability with other servers
* Control logic for...
Read more
- Rate:
- Release Date:08/07/2011
- License:Freeware
- Category:Network Tools
- Developer:UpsTechnet
- Downloads:442
- Size:9.21 Mb
- Price: Free
To free download a trial version of Upsmon, click here
To visit developer homepage of Upsmon, click here
To visit developer homepage of Upsmon, click here
Advertisement
System Requirements
Upsmon requires Windows.
Upsmon v.5.1.001 Copyright
Shareware Junction periodically updates pricing and software information of Upsmon v.5.1.001 full version from the publisher using pad file and submit from users. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators, cd key, hacks is illegal and prevent future development of Upsmon v.5.1.001 Edition. Download links are directly from our publisher sites. Links Upsmon v.5.1.001 from Bittorrent, mediafire.com, uploadfiles.com, hotfiles.com rapidshare.com, megaupload.com, netload.in, storage.to, depositfiles.com and other files hosting are not allowed. The download file is obtained directly from the publisher, not from any Peer to Peer file sharing applications such as Shareaza, Limewire, Kazaa, Imesh, eDonkey, eMule, Ares, BearShare, Overnet, Morpheus, BitTorrent Azureus and WinMX.
Review This Software
More Upsmon Software
Advertisement
Upsmon v.5.1.001
UPSmon is a multiplatform client-server software that enables remote monitoring of the UPS with SNMP, HTTP, and UDP.
- Category: Network Tools
- Developer: UpsTechnet - Download - Free
UPSMONITOR v.5 3
The UPSMON is a client for all Microsoft platforms, whereas the JAVAMON can be started on all operating systems, that support JAVA.
- Category: Utilities
- Developer: Generex GmbH - Download - Buy: $90.25
- bacs - battery analyze care system - battery analyser - battery care - battery management
UPSSuite v.1 1
The UPS-Management Software is a client/server application for networks and local workstations. The server module of the UPS-Management Software is UPSMAN, which communicates via RS-232/USB or network cable with the UPS.
- Category: Utilities
- Developer: Generex - Download - Free
- bacs - battery analyze care system - battery analyser - battery care - battery management
Rccmd v.3.0
RCCMD is the most widely used shutdown client/server solution for UPS secured network environments.
- Category: Server Tools
- Developer: Generex GmbH - Download - Buy: $81.47
- battery analyze care system - battery analyser - battery care - battery management - batterie management
BACS Utilities v.1.0
The BACS Utilities retrieves, analyzes and displays data records from the BACS WEBMANAGER. BACS Programmer is a tool for BACS service staff. A new and useful software that you must have it on your computers.
- Category: Utilities
- Developer: Generex Systems GmbH - Download - Free
- bacs - battery analyze care system - battery analyser - battery care - battery management
UPSManagementSoftwareSuite v.1.1.1.1
The UPS management software UPSMAN communicates with Unterinteruptible Power Supplies (UPS) and other devices via serial, USB or network interfaces in order to receive status information and measurement data.
- Category: Utilities
- Developer: Generex - Download - Free
- bacs - battery analyze care system - battery analyser - battery care - battery management