home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!howland.reston.ans.net!paladin.american.edu!darwin.sura.net!sgiblab!bridge2!alantec!paul
- From: paul@alantec.com (G. Paul Ziemba)
- Newsgroups: comp.unix.admin
- Subject: Re: monitoring a UPS from a serial port
- Message-ID: <paul.726878139@alantec>
- Date: 12 Jan 93 22:35:39 GMT
- References: <1993Jan12.014929.21006@murdoch.acc.Virginia.EDU>
- Sender: news@alantec.COM
- Lines: 30
-
- dmm0t@rincewind.mech.virginia.edu (David Meyer) writes:
-
- [UPS has an output signal to indicate battery low...how does one
- wire this up to a unix serial port?]
-
- I've never done this, but here's how I would try to do it. I'd be
- interested to hear if anyone else has tried the same scheme.
-
- I would wire the UPS battery low signal to the CD (carrier detect)
- input of a tty serial port such that the battery low signal would
- make CD active. This might require a transistor and some resistors
- (and possibly +5-12 volts) to get the appropriate voltage level
- and do inversion, if necessary.
-
- Then, I'd set up my /etc/ttytab (or equivalent) to run, instead of
- getty, a program that attempted to open the tty port in the same
- way getty does.
-
- When CD becomes active, the open will complete, and then the program
- can take whatever action is necessary (running shutdown, etc).
-
- I realize that the above description might be slanted toward BSD, but
- I imagine something similar could be done for sysv.
-
- ~!paul
- --
- Paul Ziemba paul@alantec.com alantec!paul 408.955.9000 x227
-
- "The first TV I ever owned...I threw from a third story window at a burglar"
- - sjackson@parc.xerox.com
-