Answer the question
In order to leave comments, you need to log in
How to handle unexpected equipment power off?
In general, the computer sits and works, then the power suddenly turns off (for example, the power cord is pulled out of the outlet). Is it possible to somehow process / catch such an event, and then send a notification over the network that the computer has been turned off? Is this implemented for example in linux? And how to see how it is implemented?
PS In theory, it seems like the charge in the computer remains for a few milliseconds.
Answer the question
In order to leave comments, you need to log in
Processors have an internal interrupt that means "power off". Those. as soon as the power is turned off, this interrupt is triggered and the necessary instructions are executed. Another question is that these instructions may not be executed (the power will run out), and another question is that at this time other peripheral devices may already be turned off (they have run out of power), so the most reliable is a UPS with signal processing from it.
You need a UPS with an RS232 or USB port, they can not only signal with a speaker that there is no power.
If the socket is not smart, then no, some switches can do this via SNMP Trap, but a regular PC is unlikely to be configured this way.
Hmm, in fact, when powered from the network in the usb port, rs232 has 5v, but I think it will not be possible to process it internally, very little time,
Option number 1: purely electronics, relay / trigger controller-network.
Option number 2: BBP
Option number 3: something like proline.biz.ua/lan-controller or something similar.
What if it's on the other side? Some external server pings your computer (for example, every second) and in the absence of a ping sounds the alarm
If the computer is connected to an ethernet switch, then configure snmp-traps in the switch settings, and catch them on the server. If the link is lost, then most likely the computer is completely de-energized, since usually even when the link is turned off, the link is active for ethernet wakeup!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question