From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <97185864728002.tru64-unix-managers.marc@archive.invalid> From: emanuele.lombardi () casaccia ! enea ! it Date: Wed, 18 Oct 2000 08:45:19 +0000 To: tru64-unix-managers Subject: how to detect voltage on a pin of the serial interface? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=97185864728002 Hi alpha gurus, today I need to check the presence of electric voltage on a pin of the serial interface of a alpha machine running 5.0a. The reason is that my UPS five minutes before "death" zeroes the voltage on a known pin of the serial interface. I would like to have a daemon checking the pin and, as soon as there is no more voltage, broadcast a shutdown command to all my machine (via rsh or ssh). I guess a C program should be able to test the presence of the voltage on the pin, but I have no knolewdge about this topic so I ask your help. I only need a piece of code which returns 1 or 0 according to the voltage level on the pin. From that code I will (I hope) be able to do the rest. Thank you very much, Ciao from Italy, Emanuele -- $$$ Emanuele Lombardi $$$ mail: AMB-GEM-CLIM ENEA Casaccia $$$ I-00060 S.M. di Galeria (RM) ITALY $$$ mailto:emanuele.lombardi@casaccia.enea.it $$$ tel +39 06 30483366 fax +39 06 30483591 $$$ $$$ ||| $$$ \|/ ;_; $$$ What does a process need | /"\ $$$ to become a daemon ? | \v/ $$$ | | $$$ - a fork o---/!\--- $$$ | |_| $$$ | _/ \_ $$$* Contrary to popular belief, UNIX is user friendly. $$$ It's just very particular about who it makes friends with. $$$* Computers are not intelligent, but they think they are. $$$* True programmers never die, they just branch to an odd address $$$* THIS TRANSMISSION WAS MADE POSSIBLE BY 100% RECYCLED ELECTRONS