Something keeps waking up my Mac, how do I find out what it is? I have a Mac Pro that draws about 250 watts (so I read somewhere) when it's running full-bore. It apparently draws less than 90 when it's sleeping. For whatever reasons I like to leave it on overnight, but I'd like it to sleep for cost and eco reasons. However, something I have installed keeps waking it up. I've done a fresh reboot, and then told it to sleep once it's fully up and running and before launching any other apps. It won't stay asleep for as long as a half hour (approximately, I haven't timed it) and it certainly won't stay asleep overnight.

By sleep I mean the monitors go dark and the hard drives spin down and the fan stops and power draw is minimised. By wake up I mean a jet takes off in my Mac Pro tower as all the fans and drives spin up together loudly enough to be heard in another room. The monitors may or may not come on, they seem to sleep all right.

FWIW I'm running Snow Leopard on a first-generation Intel Xeon quad-core Mac Pro with 10 GB of RAM, 4 internal hard drives and two monitors, but I think this is a software thing, not hardware, so that shouldn't matter.

How do I find out what process/app/plugin/background operation/preference pane/whatever is waking up my Mac?

Thanks.
You can see a log of power events with pmset -g log or or syslog.

$ pmset -g log | grep ' Wake  ' | tail -n5
10/29/12 10:31:20 PM GMT Wake      Wake due to EHC2/HID Activity: Using BATT (Charge:99%)                       
10/30/12 12:51:56 AM GMT Wake      Wake due to EC.LidOpen/Lid Open: Using BATT (Charge:68%)                     
10/30/12 8:50:33 AM GMT+ Wake      Wake due to EC.LidOpen/Lid Open: Using AC (Charge:100%)
10/30/12 5:12:32 PM GMT+ Wake      Wake due to EC.LidOpen/Lid Open: Using AC (Charge:99%)                       
10/31/12 12:58:01 PM GMT Wake      DarkWake to FullWake due to HID Activity: Using AC (Charge:44%)              
$ syslog | grep 'Wake reason' | tail -n5
Oct 30 03:14:26 MacBook-Air kernel[0] &lt;Debug&gt;: Wake reason: EC.LidOpen (User)
Oct 30 17:12:05 MacBook-Air kernel[0] &lt;Debug&gt;: Wake reason: ?
Oct 30 17:12:31 MacBook-Air kernel[0] &lt;Debug&gt;: Wake reason: EC.LidOpen (User)
Oct 30 23:08:18 MacBook-Air kernel[0] &lt;Debug&gt;: Wake reason: EC.ACAttach EHC2 (Maintenance)
Oct 31 12:57:52 MacBook-Air kernel[0] &lt;Debug&gt;: Wake reason: ?


The post at OS X Daily has descriptions of the abbreviations.


  
  OHC: stands for Open Host Controller, is usually USB or Firewire. If you see OHC1 or OHC2 it is almost certainly an external USB keyboard or mouse that has woken up the machine.
  EHC: standing for Enhanced Host Controller, is another USB interface, but can also be wireless devices and bluetooth since they are also on the USB bus of a Mac.
  USB: a USB device woke the machine up
  LID0: this is literally the lid of your MacBook or MacBook Pro, when you open the lid the machine wakes up from sleep.
  PWRB: PWRB stands for Power Button, which is the physical power button on your Mac
  RTC: Real Time Clock Alarm, is generally from wake-on-demand services like when you schedule sleep and wake on a Mac via the Energy Saver control panel. It can also be from launchd setting, user applications, backups, and other scheduled events.