How to find reason a notebook wakes up?

I’m having a problem with my notebook suspending, but then waking up when I don’t want it to (either immediately, or much later when in the bag – I may have two issues to solve here). But for the moment this question is about troubleshooting: is there a command I can run that will tell me what the trigger was for the last resume action? E.g. whether a key was pressed, or the power button, whether it was a wake-on-lan signal, whether it was switching from AC power to batter, etc, etc.