If I use my mac as a server, is there a way to have it wake up only when someone is trying to access it? I don't want to have it on all the time just in case someone wants to look at the site (it won't be used very often). I also have a PC I might use as a server. Any way to do this with either of these machines, or any other server software? And then also go back to sleep if it's not being accessed for a certain amount of time? Thanks.

link|improve this question
feedback

migrated from serverfault.com Aug 29 '10 at 20:21

This question came from our site for system administrators and desktop support professionals.

4 Answers

If you have your Mac connected to an Airport base station, you can enable "wake for network access" in the Energy Saver preference pane, and any network activity detected that is bound for your Mac will cause the Airport to send a wake-on-LAN (WOL) packet automatically. If your Mac is asleep, it will wake and provide the requested service, which should include the built-in Apache web server ("Web Sharing" in the Sharing preference pane.)

Support for this depends on your Mac hardware model. Some models can send the packet over wireless, others (like my Mac mini that does this) requires a Ethernet connection.

More info: http://support.apple.com/kb/HT3774

link|improve this answer
feedback

This (OSX v10.6.4) screen has a "Wake for network access option. I've never tested it myself, but it's probably a good place to start. Energy Saver Control Panel screen capture

link|improve this answer
Hmm...I'm on 10.6.4 and it just says "wake for ethernet network access". It's a macbook btw – marty Aug 29 '10 at 18:10
That should probably work still. The above screenshot was taken on a Macbook Pro. I don't know this for sure, but perhaps the MBP supports this on both the wired and wireless network cards, and the Macbook only supports this on the wired port. – ErikA Aug 29 '10 at 19:07
feedback

You ask two questions:

Question: How can I wake up a Computer by accessing it via the Network? Answer: Your NIC needs to support Wake On LAN http://en.wikipedia.org/wiki/Wake-on-LAN. On Generic PCs this is configured in the BIOS. For Mac see answer of ErikA.

Question: How can I send an unused computer to sleep? Answer: Configure the Energy Settings of your OS appropriately to send the computer to sleep.

link|improve this answer
feedback

A potential problem with this approach is that the client's system may timeout and give up before your Mac has had a chance to get ready to receive and respond to the packets. If they know about this and know how to work around it that might be ok. You've also got to figure in the security issues of using your personal system as a server. I hope you've thought of that already.

Older systems can be pretty energy efficient. You might want to measure your old PC and see. I've got a web/file server that's an AMD/64 X2 with 3 Gig RAM and 400 GB HD and it idles at around 45 watts. In this state the monitor is off but everything else on the server is still active and ready to go instantly. Where I live that costs about $2.00 per month in electricity.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown