home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / admin / 7056 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  1.5 KB

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