Shared access to Mac OS X: how to manage wakeonlan and sleep

Jean-Michel Pouré jm at poure.com
Tue Jul 7 00:08:56 PDT 2009


Dear friends,

> Then I assume you are either all on the same subnet as this Power Mac  
> and can therefore send it a wakeonlan signal yourself, or else you  
> have a device on the local subnet (perhaps a router running DD-WRT or  
> another machine that's always on) to which you first connect and tell  
> it to wake the Power Mac.

This is the case. The router is able to pass-on wake on lan over the
Internet.

> It uses the sleepwatcher port if installed, or AppleScript if not.  
> There was some set of circumstances that I cannot recall or test for  
> at the moment whereby sleep wouldn't work, complaining instead of an  
> inability to connect to the windowserver, and I believe it involved  
> being logged in via ssh and/or using screen. I think using  
> sleepwatcher instead of AppleScript may have helped with this, or at  
> least I was testing whether this helped. I have primarily been using  
> Tiger so I don't know if any of this has changed on Leopard.
> 
> sleepwatcher has many more capabilities that might be useful to you  
> if you wanted to write a script or scripts to help you manage the  
> requirements you mentioned.

Thanks.

> > * Is sleep state safe?
> 
> It should be safe to put a machine to sleep in the middle of a  
> compile, and it should resume where it left off when you wake up. If  
> that's what you mean.

I would love a script that scans "ps aux" and makes sure no compilation
is going on. The best way is to scan ssh connections and screen utility.
If compilation are running using screen (Unix command named "screen")
and sshd, when these two processes are not running, no compilation is
going on.

On the converse a connection to SSH should disable sleep.

Bye, Jean-Michel



More information about the macports-dev mailing list