S
S
Sdelan_v_CCCP2014-08-01 08:08:28
linux
Sdelan_v_CCCP, 2014-08-01 08:08:28

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

6 answer(s)
S
Sergey, 2014-08-01
@Sdelan_v_CCCP

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.

F
falsebyte, 2014-08-01
@falsebyte

You need a UPS with an RS232 or USB port, they can not only signal with a speaker that there is no power.

S
Sergey Petrikov, 2014-08-01
@RicoX

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.

T
Taras M, 2014-08-01
@kalduntus

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.

S
Serg Prool, 2014-08-01
@prool

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

A
Alexey Cheremisin, 2014-08-02
@leahch

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 question

Ask a Question

731 491 924 answers to any question