Ubuntu – Power Management – Sleep / Wake up Server when accessed

power-managementsambaserverwakeonlanxubuntu

I have a headless HP Proliant Microserver with ubuntu installed. This machine has samba shares on it serving media and I usually rdp or ssh into it. Now my issue is I want the machine to go into sleep mode(so the state is saved from ram to the harddrive) and it will seem like it is turned off after an hour of idling.

If there is any attempt to access the samba share through LAN I would like it to wake up. Now my motherboard supports this function, can anyone point me in the right direction for achieving this easily?

Thanks

Best Answer

The best instruction I have found on the web was the XBMC wiki for WOL. In short (more info in the link):

  1. You need to enable WOL on your motherboard;
  2. Install ethtool: sudo apt-get install ethtool;
  3. Set Wake-on-LAN options: sudo ethtool -s eth0 wol g;
  4. Get it enabled at system start-up with an init script. There's an init script in the wiki link.

Untested; info from the wiki link

Related Question