I need to be able to save the state of a Centos-based Google Compute instance when it first receives a preemption signal. The documentation very clearly indicates that a "ACPI G2 Soft Off" signal is sent 30 seconds before a preemptible shutdown. Unfortunately, Google has given no examples to demonstrate how to capture this signal and I have not yet found a way to capture it.
My initial attempts have all been focused around the ACPI Interface using the acpid daemon. Using it, I have been able to capture the shutdown (button/power) event without any problems. But no matter what event I try to capture (button, power, sleep) I have not been able to capture the state transition to the G2 state, which I presume is what I am looking for.
Has anyone successfully managed to capture the preemption signal in a Centos (or any Linux) environment?