Prevent unwanted host sleep while networked

May 15, '06 07:30:00AM

Contributed by: robg

With the new child in the house, I've lately found myself working in many locations at many odd hours of the night. The end result is that my 12" PowerBook is getting a lot of exercise lately, including a lot of hint writing and editing. (And it's also making me yearn for a 15" Core Duo machine; as much as I love travelling with my 12" PB, it's not the ideal machine from which to work remotely within the house. The lack of pixels leads to too much reliance on Exposé to help get things done.)

My Dual G5 desktop runs a local copy of Geeklog, so I do all the previewing and editing of stories from its database on the G5. When working on the PB, I enter the G5's IP address to load the submitted stories, preview my edits, and then publish to the G5. (Later on, I dump the SQL data files from the G5 and upload to the web server to publish the hints.)

I was doing this the other evening when the G5 suddenly stopped serving pages. So I put down the PB, walked over to the den, and found that the G5 had decided it was time for its pre-set "sleep if idle for 30 minutes" timeout. But clearly the machine wasn't idle -- it was serving web pages to the PowerBook. I guess, though, from the system's perspective, this didn't show as activity as far as the sleep schedule was concerned (no mouse movement or screen updates).

I didn't really want to disable sleep on the G5, so after a bit of expermentation, I found the solution: to keep a networked machine awake, you simply have to connect to it via file sharing. On the PowerBook, I mounted my home directory from the G5, and went back to work. Hours later, the G5 was still awake. I unmounted the drive when I was done, and the G5 fell asleep again as scheduled.

I assume there are other tricks to keeping a "non active" networked machine awake (setting a cron task to do something every so many minutes?), but this one worked for me.

Comments (7)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20060515062018776