LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   Power failure and system integrity. (https://www.linuxquestions.org/questions/general-10/power-failure-and-system-integrity-4175458962/)

stf92 04-21-2013 12:29 AM

Power failure and system integrity.
 
Hi:
At home, sometimes the mains voltage drops for a split second, as I can see at night because the lights go down. How do I know that system integrity has not been damaged or the system has not destabilized? Is there a program that runs some checks to see if everything is in order?

Or perhaps the most secure thing to do is to reboot the system?

unSpawn 04-21-2013 03:47 AM

Quote:

Originally Posted by stf92 (Post 4935630)
At home, sometimes the mains voltage drops for a split second, as I can see at night because the lights go down.

If you can not trust your power company to properly handle power surges then IMHO you shouldn't look towards software to fix what should be fixed in different ways. Maybe instead it's time to look into investing in an UPS (depending on your power needs it shouldn't really be that expensive), or if brown / blackouts also occur frequently a SOHO backup generator. Or maybe, depending on how mission-critical your systems are, maybe ponder moving them to a facility outside of the geographical region with large enough infrastructure like AWS or equivalent. Or maybe, if that is all too expensive, syncing valuable content to storage (preferably elsewhere?) often.


Quote:

Originally Posted by stf92 (Post 4935630)
How do I know that system integrity has not been damaged or the system has not destabilized? Is there a program that runs some checks to see if everything is in order? Or perhaps the most secure thing to do is to reboot the system?

Since about version 2.0 the Linux kernel includes mechanisms you shouldn't call "self-healing" but that check, correct or reject things. Three examples of which people often encounter are segfaults and OOMs (basically the kernel balking trying to keep its sanity process-wise), those in the network stack (search for example for "TCP: Treason uncloaked!") and kernel behavior regarding file system state (as in 'tune2fs -e'). With the move to journaling file systems though the responsibility for fscking "dirty" changed so many people will only notice discrepancies when the kernel decides to mark it read-only.

sundialsvcs 04-21-2013 09:41 AM

Remember, hard-drives and such use direct-current motors, which are extremely intolerant of even slight changes in input voltage. (They slow down.) You must take steps to assure stable power. A UPS is a mandatory first-step.

stf92 04-21-2013 10:58 AM

On second thought, I remember an old processor like Zilog's Z80 had a pin labeled NMI (non maskable interrupt). The manual says "Its usual function is to provide immediate response to important signals such as an impending power failure". The 80286 also has such a pin. So it is very likely that when the source voltage goes below a predetermined value, a high priority interrupt is triggered and the system responds by making a cold start. Or just the RESET line is asserted. If the system does not reset then, it would mean the voltage drop was not fatal and everything is OK.


All times are GMT -5. The time now is 02:10 AM.