rtcwake Question

  • I'm testing rtcwake having it turn off the machine then back on in 60 second using :

    Code
    rtcwake -m off -s 60


    It calls shutdown, but apparently it needs different options than what rtcwake used because it returns with an error about the flags. I've played around with the shutdown command and the correct shutdown command is "shutdown -hP 0" (in 0 seconds shutdown then halt/power-off). If I just type "shutdown" I'll get a similar text from shutdown saying the arguments aren't correct.



    I installed Debian 7.9.0 then OMV on-top of that install. I can think of a couple of ways around the issue, but I'm perplexed why rtcwake would call shutdown in a way that doesn't work.


    Ideas? Thanks in advance!

  • Looking in the source code for rtcwake it looks to be using:


    It is running "shutdown -P now" and it needs the -h as in "shutdown -hP now" to work. It seems like the -h should be implied with the -P, but here I am. Thoughts?

  • Why you don't use rtcwake -m disk -s 60 instead?
    I think 60 seconds is too short for the machine to turn off and wake up.
    Give it time to stop the necessary task/jobs before it shutdown; maybe 10 minutes.

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

  • I could get around this by other means, ie creating a separate cron job with the appropriate shutdown command and then using rtcwake without the need to use 'off'. However, I'm worried that I missed something in setting up Debian 7.9.0 then installing OMV (this was done so I could use UEFI mode on the MB).


    Also, 60s is sufficient to shutdown. It takes it ~18 sec to shutdown.

  • I've been digging into this more and I think my shutdown operates differently, requiring slightly different options than other examples I've found on the internet. Most show the command to poweroff as "shutdown -P now".


    Could someone post what info is shown when they type the "shutdown" command? Here's what I see:

  • I usually use shutdown -h now or poweroff .


    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

    Einmal editiert, zuletzt von tinh_x7 ()

  • I confirmed these are the same.


    Does it give you an error when you type "shutdown -P now"?

  • Thank you. I wasn't aware of the bug tracking location.


    It says it is fixed in >2.23 version.


    Version installed is 2.20. Current version is 2.27.


    I'm new to this, so I'm not sure why apt-get update / apt-get upgrade (or the OMV GUI update) isn't listing the package 'util-linux' as an upgrade.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!