02.12.2015 Views

Network UPS Tools User Manual

Network UPS Tools User Manual

Network UPS Tools User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Network</strong> <strong>UPS</strong> <strong>Tools</strong> <strong>User</strong> <strong>Manual</strong> 81 / 84<br />

The drivers stored status data in an array. At first, they passed this data to upsd by saving it to a file. upsd would reread this file<br />

every few seconds to keep a copy for itself. This was later expanded to allow shared memory mode, where only a stub would<br />

remain on the disk. The drivers and server then passed data through the shared memory space.<br />

upsd picked up the ability to monitor multiple drivers on the system, and the "upsname@hostname" scheme was born. Access<br />

controls were added, and then the network code was expanded to allow TCP communications, which at this point were on port<br />

3305.<br />

J.3 <strong>Network</strong> <strong>UPS</strong> <strong>Tools</strong><br />

J.3.1<br />

September 1999: new name, new URL<br />

Several visitors to the web page and subscribers to the mailing lists provided suggestions to rename the project. The old name<br />

no longer accurately described it, and it was perilously close to APC’s "Smart-<strong>UPS</strong>" trademark. Rather than risk problems in the<br />

future, the name was changed. Kern Sibbald provided the winner: <strong>Network</strong> <strong>UPS</strong> <strong>Tools</strong>, which captures the essence of the project<br />

and makes for great short tarball filenames: nut-x.y.z.tar.gz.<br />

The new name was first applied to 0.42.0, released October 31, 1999. This is also when the web pages moved from the old<br />

http://www.exploits.org/~rkroll/smartupstools/ URL to the replacement at http://www.exploits.<br />

org/nut/ to coincide with the name change.<br />

More drivers were written and the hardware support continued to grow. upsmon picked up the concepts of "master" and "slave",<br />

and could now handle environments where multiple systems get power from a single <strong>UPS</strong>. Manager mode was added to allow<br />

changing the value of read/write variables in certain <strong>UPS</strong> models.<br />

J.3.2<br />

June 2001: common driver core<br />

Up to this point, all of the drivers compiled into freestanding programs, each providing their own implementation of main(). This<br />

meant they all had to check the incoming arguments and act uniformly. Unfortunately, not all of the programs behaved the same<br />

way, and it was hard to document and use consistently. It also meant that startup scripts had to be edited depending on what kind<br />

of hardware was attached.<br />

Starting in 0.45.0, released June 11, 2001, there was a new common core for all drivers called main.c. It provided the main<br />

function and called back to the upsdrv_* functions provided by the hardware-specific part of the drivers. This allowed driver<br />

authors to focus on the <strong>UPS</strong> hardware without worrying about the housekeeping stuff that needs to happen.<br />

This new design provided an obvious way to configure drivers from one file, and ups.conf was born. This eventually spawned<br />

upsdrvctl, and now all drivers based on this common core could be started or stopped with one command. Startup scripts now<br />

could contain "upsdrvctl start", and it didn’t matter what kind of hardware or how many <strong>UPS</strong>es you had on one system.<br />

Interestingly, at the end of this month, Arnaud Quette entered the <strong>UPS</strong> world, as a subcontractor of the now defunct MGE <strong>UPS</strong><br />

SYSTEMS. This marks the start of a future successful collaboration.<br />

J.3.3 May 2002: casting off old drivers, IANA port, towards 1.0<br />

During the 0.45.x series, both the old standalone drivers and the ones which had been converted to the common core were<br />

released together. Before the release of 0.50.0 on May 24, 2002, all of the old drivers were removed. While this shrank the list<br />

of supported hardware, it set the precedent for removing code which isn’t receiving regular maintenance. The assumption is that<br />

the code will be brought back up to date by someone if they actually need it. Otherwise, it’s just dead weight in the tree.<br />

This change meant that all drivers could be controlled with upsdrvctl and ups.conf, allowing the documentation to be greatly<br />

simplified. There was no longer any reason to say "do this, unless you have this driver, then do this".<br />

IANA granted an official port number to the project, and the network code switched to port 3493. It had previously been on 3305<br />

which is assigned to odette-ftp. 3305 was probably picked in 1997 because it was the fifth project to spawn from some common<br />

UDP server code.<br />

After 0.50.1, the 0.99 tree was created to provide a tree which would receive nothing but bug fixes in preparation for the release<br />

of 1.0. As it turned out, very few things required fixing, and there were only three releases in this tree.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!