[mythtv-users] Shutdown/Wakeup wiki question

Craig Huff huffcs at yahoo.com
Sun May 13 23:57:22 UTC 2007


Chad,

I don't see that anyone responded yet to your inquiry.

I too, had trouble making sense of all the settings.

I ended up leaving all the settings you mentioned in nvram-setup (Myth Backend settings) as shown in the wiki, except for the PreShutdown Check Command, but that's a long story -- I wrote a script to do more processing besides calling "mythshutdown --check" buried inside the script.

The time format specifies how the $time parameter will be formatted in the "Set wakeup time command" command string.

You might try changing this:
  echo "$time" > /proc/acpi/alarm
to this for testing purposes:
  echo "$time" | tee -a /tmp/alarmtimes > /proc/acpi/alarm

Then you can see exactly what is being sent to /proc/acpi/alarm by viewing the contents of /tmp/alarmtimes.  Once you have everything working to your satisfaction, remember to change the command back and delete the /tmp/alarmtimes file.  Otherwise, it could grow too big and potentially crash your system.

I chose to take advantage of whatever processing mythshutdown provides for checking what's going on before it decides it is ok to shutdown the system and let it pass the wakeup time along per the settings in MythWelcome's configuration page (as also explained in the wiki page).

It looks like your settings might work, but the best way to check is to follow these steps:
1) Bring up the system and see what the setting in /proc/acpi/alarm is with
    # cat /proc/acpi/alarm
2) Change it to some other value following the format of the response you get (in case your set up is working already ;-] )
3) Let your system shutdown as you reported before
4) Bring it back up immediately and see what the alarm setting is now.

If it is working correctly, the response will match the time your system should wake up for the next recording to start (with whatever lead time you specified to allow the system to come up completely).

On my system, I mostly changed the settings in the MythWelcome Settings dialog.  I ended up not using nvram-wakeup and wrote my own scripts to set the alarm time and shut down my system and put them in the appropriate places in that dialog.  If nothing else, I don't have to worry about nvram-setup and MythBackend conflicts ;-).
 
Craig Huff

----- Original Message ----
From: Chad <masterclc at gmail.com>
To: Discussion about mythtv <mythtv-users at mythtv.org>
Sent: Friday, May 11, 2007 2:52:31 AM
Subject: [mythtv-users] Shutdown/Wakeup wiki question

Hello!

I'm finally getting around to setting up shutdown/wakeup stuff on my
system.  This is really quite cool!

I'm mostly confused on the settime script (and what follows it).

Here is what I do manually to "make it work":

echo "YYYY-MM-DD hh:mm:ss" >/proc/acpi/alarm
shutdown -h now

where YYYY-MM-DD hh:mm:ss is something like 2007-05-11 23:10:00 to
have the system woken up on May 11th 2007 at 11:10pm.

So, what I've put in the first box (wakeup time format) is:
yyyy-MM-dd hh:mm:ss

And then in the second box (set wakeuptime command):
echo "$time" >/proc/acpi/alarm
and the server halt command:
shutdown -h now

And I'm not sure if it will work.  But nonetheless I would like to
understand what the settime script is supposed to be doing.

*update*
My backend just shutdown automatically.  I don't know when it will be
coming back up, but so far the auto shutdown seems like it may have
worked!  :)

Anyway, so if some kind soul could explain why the settime script (and
the related scripts/setup) would want to be used, it would be much
appreciated.  I've spent a considerable amount of time reading up on
hwclock and date, both of which are amazingly in depth and pretty
cool.  So I sort of understand it a bit better, but I still don't see
the rationale.

Thanks!

-Chad
_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users







       
____________________________________________________________________________________Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20070513/dadc21da/attachment.htm 


More information about the mythtv-users mailing list