如何自动休眠并重新唤醒我的 Ubuntu 服务器?

How can I automatically hibernate and reawaken my Ubuntu server?

我有一台 Ubuntu 10.10 机器,它应该是服务器。它只使用大约 150W 到 运行,但电不是免费的:(实际上没有人在夜间使用它,我想让它自动休眠和自动唤醒。我知道 rtcwake 命令,但我不确定如何让它自动休眠。

谁能给我一些关于如何做到这一点的想法?就像将它设置为每天 10:00 下午休眠并在 6:45 上午醒来。

这个问题在这里有答案:https://askubuntu.com/questions/61708/automatically-sleep-and-wake-up-at-specific-times

基本上,解决方案是使用 rtcwake--mode 选项。这是来自 man rtcwake 的描述:

-m mode | --mode mode
  Use standby state mode. Valid values are:

    standby  ACPI state S1. This state offers minimal, though real, power savings,
             while providing a very low-latency transition back to a  working
             system. This is the default mode.

    mem      ACPI state S3 (Suspend-to-RAM). This state offers significant power
             savings as everything in the system is put into a low-power state,
             except for memory, which is placed in self-refresh mode to retain
             its contents.

    disk     ACPI state S4 (Suspend-to-disk). This state offers the greatest power
             savings, and can be used even in the absence of low-level platform
             support for power management. This state operates similarly to
             Suspend-to-RAM, but includes a final step of writing memory contents
             to disk.

    off      ACPI state S5 (Poweroff). This is done by calling  '/sbin/shutdown'.
             Not officially supported by ACPI, but usually working.