[MacTUG] Caffeinated prevents sleep not auto logoff

Donald Duff-McCracken dsmccrac at uwaterloo.ca
Wed Feb 24 13:32:10 EST 2016


Yesterday I incorrectly remembered what the caffeinate command does. I was using it in a process where I needed to control autologoff and sleep and attributed caffeinate incorrectly to helping with the autologoff issue. It does not but it is a nice product for occasionally keeping your mac from sleeping. What is nice is that caffeinate only prevents sleep for the current session.

We do have our lab computers set to sleep as most modern applications are respected by microsoft’s and apple’s energy management software, so that if you were performing a long render in a 3d package, the mac would not start sleeping until it is done. However some apps will not be respected by sleep such as some things in terminals, xwindows etc.

So I use the built-in caffeinate command. I put together a little automator app that lets folks know that until the next logout session the mac will not sleep and then runs this command — caffeinate -im

It is a nice way to have sleep behaving most of the time but not when you need it not to.

WHY SLEEP?
The Mac OS is not one of those old unix OS that needs to be awake at night to swap log files etc. Apple has been rolling out OS X for years with sleep enabled and so clearly this is not an issue for most situations. Additionally I can wake my macs from ARD if I need to. I also have the sleep command settings to ensure that every mac is awake at a certain period every weekday morning if I need to do something. I also have a fairly generous ‘wait time’ before a mac goes to sleep (30-45 min) so that usually during the day the macs are awake enough for me to send out updates etc.

I am talking Lab macs in this context. There are some times when non lab macs cannot sleep, such as the case where there is legitimate need to remote into the device. I would be interested to hear of situations where a device cannot sleep - other than servers ;-)

Even if my lab of Macs slept only 10 hours a day (they likely sleep more) my modest 50 macs save 9,000KWH which probably saves the university about $900 bucks and a pretty serious greenhouse gas offset.

------------------------------------
Donald Duff-McCracken
Technical Services Manager
Mapping, Analysis & Design
Faculty of Environment
University of Waterloo
(519) 888-4567 x32151
https://uwaterloo.ca/environment-computing/about/people
------------------------------------
This email communication is intended as a private communication for the sole use of the primary addressee and those individuals listed for copies in the original message. The information contained in this email is private and confidential and If you are not an intended recipient you are hereby notified that copying, forwarding or other dissemination or distribution of this communication by any means is prohibited.  If you are not specifically authorized to receive this email and if you believe that you received it in error please notify the original sender immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uwaterloo.ca/pipermail/mactug/attachments/20160224/ea221af5/attachment.html>


More information about the MacTUG mailing list