Go to Post Remember that though we come from different backgrounds and x, y, z, we are all on each other's side. We want people to love STEM, and think FIRST is a great tool to fulfill that desire. - PayneTrain [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > Website Design/Showcase
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 19-11-2013, 22:49
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Lightbulb Keeping a Server alive

Hey guys,
My RPi Web server always crashes at the wrong times (when I am not at home). I came up with this solution to reset it automatically:

Here is the sequence:
i2c interface between MCU and Pi
MCU controlling power to Pi via relay
MCU keeps pinging the Pi via i2C (sending a packet and waiting for response)
If the MCU fails the ping 5 times in a row, calls the reboot command (sudo reboot)
MCU waits 2 minutes
MCU pings the Pi a few times to see if it is alive again
Otherwise, MCU resets Pi by unplugging it and plugging it back in (relay)
MCU calls command to clear our corruptions on the HDD
MCU reboots server
Server up again!
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:01.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi