• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Powering it On and Off  (Read 2603 times)

Karma: 1
Posts: 15

View Profile WWW
« on: September 25, 2009, 10:32:27 AM »

Hi all,

Dev on the plugs going well btu we've hit a question... anyone know how to add an on off switch on to the plug that will safe shutdown or 5 second press kill the unit?
We have got a reset but we really need a power switch option or some ideas on how to do it?

Sco Logic

Principal Software Engineer
Global Moderator
Jr. Member

Karma: 2
Posts: 87

Principal Software Engineer -- Oracle Corporation

View Profile
« Reply #1 on: January 07, 2010, 05:28:17 PM »

I just experienced an SDHC corrupted card.  The SheevaPlug affected has been subject to multiple down times when power to the building is turned off.  This brings me to wonder: is there a way to signal the SheevaPlug to power down and not restart remotely?

It seems to me if the Plug is running and then suddenly the power goes off, there is a risk of the process which writes to memory of doing something that may cause the memory not to be closed properly which may, in turn, lead to other complications.  This is all speculation on my part as I'm not familiar with the working of memory cards, I can just relate to my experience with hard disks.

I guess what I'm getting at: I'd like to be able to power down my SheevaPlug remotely so I don't have to worry about the effects of a power outage.  I'm pretty sure it cannot be done, but hope the Plug developers take note.  In a commercial environment, power outages are a scheduled item and it's inconvenient to have someone right at the plug to bring it down and pull the cord out.

The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation.

Global Moderator
Sr. Member

Karma: 4
Posts: 273

View Profile
« Reply #2 on: January 07, 2010, 05:48:12 PM »

It would seem to me you have a few options.  If you are only concerned about a random power failure causing file system damage, you could always log into your Plug remotely and (as root) run "shutdown now".  This would cause the Plug to terminate Linux under controlled conditions and go to a quiescent state, but it will not power down.  Indeed, from this state, you'd then have to power cycle it (or physically hit the internal reset switch) to cause it to come back up.

If you want to actually power down the Plug, you'll have to be more imaginative:  Solutions like X-10 come to mind, but of course that would require another means (secondary to simple ethernet access) of control at the physical location of the Plug.  I understand there are dead-man switches available on the internet that cycle the power if they are not hit by a watchdog reset every so often -- say from a serial port.  Perhaps some variant of something like that could be pressed into service to do what you want.  YMMV.
« Last Edit: January 07, 2010, 05:49:59 PM by restamp » Logged

Pages: [1]
Jump to: