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> 80 / 84<br />

upsstats actually has since returned to using templates, despite having a period in the middle when it used hardcoded HTML.<br />

The images were also created with shell scripts. Each script would call upsc to get the right value (utility, upsload, battcap).<br />

It then took the value, plugged it into a command file with sed, and passed that into fly, a program which used an interpreted<br />

language to create images. fly actually uses gd, just like upsimage does today.<br />

This code later evolved into Smart <strong>UPS</strong> <strong>Tools</strong> 0.10.<br />

J.2 Smart <strong>UPS</strong> <strong>Tools</strong><br />

J.2.1<br />

March 1998: first public release<br />

Version 0.10 was released on March 10, 1998. It used the same design as the pre-release prototype. This made expansion difficult<br />

as the binary structure used for network communications would break any time a new variable was added. Due to byte-ordering<br />

and struct alignment issues, the code usually couldn’t talk over the network to a system with a different architecture. It was also<br />

hopelessly bound to one type of <strong>UPS</strong> hardware.<br />

Five more releases followed with this design followed. The last was 0.34, released October 27, 1998.<br />

J.2.2<br />

June 1999: Redesigned, rewritten<br />

Following a long period of inactivity and two months of prerelease testing versions, 0.40.0 was released on June 5, 1999.<br />

It featured a complete redesign and rewrite of all of the code. The layering was now in three pieces, with the single driver<br />

(smartups) separate from the server (upsd).<br />

Clients remained separate as before and still used UDP to talk to the server, but they now used a text-based protocol instead of<br />

the brittle binary structs. A typical request like "REQ UTILITY" would be answered with "ANS UTILITY 120.0".<br />

The ups-trust425-625 driver appeared shortly after the release of 0.40.0, marking the first expansion beyond APC hardware.<br />

Over the months that followed, the backupspro driver would be forked from the smartups driver to handle the APC Back-<strong>UPS</strong><br />

Pro line. Then the backups driver was written to handle the APC Back-<strong>UPS</strong> contact-closure models. These drivers would later<br />

be renamed and recombined, with smartups and backupspro becoming apcsmart, and backups became genericups.

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

Saved successfully!

Ooh no, something went wrong!