rtcwake -m off works?

General support questions
Post Reply
mathog
Posts: 258
Joined: 2008/07/09 23:52:06

rtcwake -m off works?

Post by mathog » 2020/07/09 19:42:27

The cooling is going off in our machine room tomorrow so I'm setting up the machines to power off and back on around that event - without being near them. Usually I just use ether-wake but thought I would give rtcwake a shot. This command:

Code: Select all

rtcwake -m off -s 300

worked properly for a CentOS 7 Dell PowerEdge T630. However when it was run on three CentOS 6.10 machines, a Dell Poweredge T620, a Dell Precision T1700, and a "Supermicro X8DTH-i/6/iF/6F/X8DTH" it did not work on any of them. They all emitted a message like:

Code: Select all

rtcwake: wakeup from "off" using /dev/rtc0 at Thu Jul  9 11:32:10 2020
but then nothing happened. On the T620, which at least had what looked like a viable wake up time, I then did a manual:

Code: Select all

poweroff
but it did not come back up. It was eventually rebooted using ether-wake. I'm not sure if the T1700 will even respond to ether-wake (it was only recently moved to this room, and I did not configure it.) Even stranger, while the time on the T620 was 5 minutes in the future, on the T1700 it was 55 minutes in the past!

I thought at first that this might be a Dell hardware (or BIOS) thing but with the addition of the SuperMicro this looks more like a CentOS 6 software issue. In case it is the latter, has anybody else seen this, and hopefully found a way around it?

Maybe follow it with a manual:

Code: Select all

echo off > /sys/power/state
Hmm, no, that isn't a state option.

Thanks.

Note added: Rebooted the T1700 and tried the rtcwake again. This time the wake time was 5m in the future. The system had been up a very long time, perhaps it was a daylight savings time issue. In any case, as before, the command did not actually shut down the machine.

Note added: On the 3 CentOS 6 machines following the rtcwake command this:

Code: Select all

cat /proc/driver/rtc
rtc_time	: 16:35:48
rtc_date	: 2020-07-09
alrm_time	: 16:40:46
alrm_date	: ****-**-09
alarm_IRQ	: no
alrm_pending	: no
24hr		: yes
periodic_IRQ	: no
update_IRQ	: no
HPET_emulated	: yes
DST_enable	: no
periodic_freq	: 1024
batt_status	: okay
shows that the alarm time was set but there was no associated IRQ or pending set.
I tried hacking the /etc/init.d/halt file and commenting out the hwclock line, then doing

Code: Select all

rtcwake -m off -s 300
sync
poweroff
but it never came up. Using

Code: Select all

 rtcwake -m on -s 5
waited the 5 seconds and then came back. Not much help though because it was already known that the wake time was being set, just not acted on.

Post Reply