One way to do this is via the
/sys/power interface. The usual way to induce hibernation (used by various higher level tools) is to write to a couple of the fields there:
echo shutdown > /sys/power/disk
echo disk > /sys/power/state
I believe the first one sets the methodology and the second one triggers the change.1 However, if you read from these nodes, you get a list of possibities:
> cat /sys/power/disk
platform [shutdown] reboot suspend
> cat /sys/power/state
freeze standby mem disk
disk are available, the machine can be put into hibernation.
1 You can also set
/sys/power/disk to do the same thing via the system's ACPI hardware, presuming the driver works properly, and
echo mem > /sys/power/state puts the machine into suspend (state saved to ram).