Here is a thread with a couple of ideas on how you can catch the hibernate event and log it yourself: http://serverfault.com/questions/199895/how-can-i-flush-my-ssh-keys-on-power-management-activity/199896#199896https://serverfault.com/questions/199895/how-can-i-flush-my-ssh-keys-on-power-management-activity/199896#199896
- Use dbus-python
- Write PM scripts
I have never used dbus myself, but if you need help, here are some references: