UPS monitoring

Perry Minyard 3MTA3 perry at bluemtn.uucp
Sat Aug 4 04:59:03 AEST 1990


I just got our network monitoring feature added to our ups and am in
the process of setting up /dev/tty2A to monitor it.   The program that 
I've seen floating around the net doesnt seem to do what I need it to do.

There is a db25 on our ups.
The way our ups works is:   

Two seperate signals are provided by two "dry", isolated relay contacts.
The first signal is connected between pins 1 and 2 of the DB-25 interface.
This circuit is closed when the UPS is turned on and is powered from the AC
mains (normal mode).  This circuit opens when the AC main power fails and the
UPS begins running on it's internal batteries.  This should signal the
system to notify the users that the main power has failed.

The second signal is connected between pins 1 and 3 of the DB-25.  (pin 1
is common to both signal circuits)   This circuit is also normally closed,
except when the UPS gives its warning that approx 60 seconds of energy is
remaining in the batteries.   This should signal the system to SHUTDOWN.

Here is one plan on how this MIGHT work....:

I'll wire +5 volts coming from the serial port to pin 1 on the UPS.
DCD to pin 2 on UPS, and CTS to pin3 on UPS.  (I think this will work?)

I'll jumper DSR to
DTR, so DTR will always be high..   Then all I need to do is check
for Carrier detect (DCD), and CTS (clear to send).   If no carrier
detected, then there is no power; if not clear to send, then shut
down system.

I'd like my C program every 5-10 seconds or so to
check for DCD, and CTS, then handle it appropriatly.  My problem is I
dont know how in Xenix/Unix  how I can check DCD, or CTS on the /dev/tty2A.   

I'm not really sure how to check the status of an address under Xenix...
I'm not a C programmer, but can usually get by with a little help.
-Thanks,

Perry Minyard

-- 
"A mind is a terrible thing to taste."   | Perry Minyard
- Ministry                               | ..!emory!bluemtn!perry
-------------------------------------------------------------------------



More information about the Comp.unix.xenix mailing list