1 Technical notes on my code submission of 30 Nov 99
5 - Some enhancements to the cgi programs, documentation,
6 and tweeking of buffer lengths.
8 Changes submitted this submission:
9 - I've added a new man page for apcnetd. This page
10 will be expanded in the coming weeks.
11 - I've added several new .man files, but will shortly
12 convert them to sgml format. They are the beginning
13 of the documentation for STATUS output and EVENTS.
14 - To ensure that we don't get string buffer overflows
15 (as has happened to me), I've increased the lengths
16 of some strings. In one case (the UPS name), I reduced
17 the length. This is probably a bit overkill, but I
18 prefer not to have buffer overflows.
19 - I added new capability codes to fetch the EPROM capabilities
20 string, which is 254 bytes long. It provides the valid
21 EPROM settings for all versions of the model. Although
22 this information is obtained from the UPS, it is currently
23 not used, and I will not develop it further until after
25 - I started adding the code to determine the length of time
26 since the last self test. This code is turned off and
27 will not be developed further until after the offical
29 - I added additional documentation received from APCC as
30 well as other sources.
31 - I added several new status variables to the STATUS output.
32 These were previously overlooked.
33 - I enhanced the CGI programs to have a red bar indicating
34 below what battery percentage that apcupsd will force a
36 I also added a red bar indicating the point at which the remaining runtime
37 becomes too low and apcupsd will force a system shutdown.
38 - Updates to the man pages.
39 - Fixed the -i option for apcnetd (called by inetd).
44 - Update apcupsd.man and apcnetd.man, and create
45 new sgml documentation for EVENTS, DATA, LOGGING,
46 and STATUS output as well as documenting the
47 network "programming" interface.
48 - Document the CGI programs and how to write them.
49 - Fix the battery voltage display in the cgi to handle
50 battery voltages of 12 and 48 volts as well as
52 - Add and test a bunch of events that email a message.
53 - Check and double check killpwr changes (one pass made).
54 - Expand Last UPS Self Test field in cgi program
55 - Document log_event for developers -- especially
57 See info in developers/apcupsd.logging
58 - Document the new configuration options.
59 - Document installation, particularly the chkconfig:
61 However, since one day it will be
62 networked, it might be better to start it after the network is up, so
63 S20/K99 is probably the best. In the latest development stream, I have
64 redone the RedHat installation and added the following two lines to the
65 top of the apcups script (now renamed to apcupsd) so that the proper
66 links are setup during the install:
68 # chkconfig: 2345 20 99
69 # description: apcupsd monitors power and takes action if necessary
71 If you add those lines to the top of your existing apcups script
72 (presumably in /etc/rc.d/init.d/apcups) and then delete the old startup
76 recommended links with:
79 All the necessary links will be setup so that it apcupsd starts and
80 stops automatically in each appropriate runlevel. If you are not
81 familiar with chkconfig, try: man chkconfig
82 - Automatic conversion of old apcupsd.config files
84 - Produce a RPM for RedHat
88 - Add more commands (individual variables) to apcnetd
89 - Accumulate time on batteries and number of transfers
90 to batteries. Perhaps save history in file so that the
91 info can be recovered if apcupsd restarts.
92 - Fix apcupsd so that it respawns the server if it
93 dies (limit number of times). This will avoid the
94 possibility that someone can bring down our apcupsd
95 by connecting via Internet (denial of service attack,
96 or exploit possible buffer overflow).
97 - Make apcaccess use the network code as an option.
98 - Remember date and time when apcupsd started.
99 - Eliminate rest of character command codes using new
100 capabilities code in apcsetup.c (for setup stuff).
101 - Eliminate the rest of the printfs().
102 - Eliminate as many error_aborts as possible in making
104 - Possibly retab new cgi/net server code
105 - Apparently during self test, apcupsd thinks that the
106 power was lost. Distinguish this condition!
107 - Check out apmd and see if we should interface to it.