[mythtv-users] Shutdown/Startup help
huffcslists at gmail.com
Wed Sep 19 18:53:38 UTC 2007
On 9/19/07, Mike Perkins <mikep at randomtraveller.org.uk> wrote:
> Now I have just about got my system to the "walk away quietly" stage, I
> like to shut down my systems overnight to save energy, theoretically, at
> rate. I have followed the various methods for shutdown and startup in the
> but they are not really appropriate. I'm sure I saw something a long while
> perhaps when I first came here, but I can't find anything relevant in the
> lists, so any suggestions gratefully received...
> My setup consists of a mixture of Myth and non-Myth. I have a backend-only
> master server, a frontend, several workstations, one of which is a slave
> as well, and a couple other servers. One of these other servers is the
> to rule them all", a mini-ITX box and runs DHCP, LDAP, two printers, a
> scanner, oh, and LTSP which is handy for when I build my diskless
> All of my boxes also run Bacula, which means each box has to be alive at
> time or other to be backed up. All the boxes respond to wake-on-lan, so
> I've no
> problem there.
> So I have recordings, mythfilldatabase, possible overnight transcodes,
> saves, actually watching stuff and normal use of workstations to
> coordinate. I
> remember seeing something about writing to a file on the master server,
> then triggers off stuff, but I can't find it.
> As I say, suggestions gratefully received.
> Mike Perkins
>  Of course, I am about to destabilise things with what I am asking
>  I know. Even Goooogle defeats me sometimes.
>  I hope to use LDAP to control logins, Samba, DHCP, etc, etc. Anyone
> there who would be willing to share experiences, preferably off list...
> mythtv-users mailing list
> mythtv-users at mythtv.org
Caveats: I know what Backula is, but haven't used it. Don't know what LTSP
Know enough that I don't want to mess with LDAP badly enough to learn it.
tried Suspend2 (now TuxOnIce) for suspending Linux boxen. Only used Fedora
I have my systems using the ACPI wakeup functionality rather than
and Suspend2 to power down when not in use. Since they are *all* MythTV
they all use MythShutdown which in turn calls a shell script of mine to do
keeping before calling the Suspend2 command "hibernate". My housekeeping
determining whether the box should wake up *earlier* than MythTV thinks it
in my case to comply with the "Suggested next fill time" from Schedules
has been reported that this is more of a suggestion than a demand, but I
the system in place, so... This could be extended in your case to reference
file of your choosing to obtain times for extra activities, like when the
be "awake" to do Backula backup work.
I have also configured my systems so the frontends use Wake-on-lan to wake
the backend. If/when I set up a slave backend, I would set up the backend,
in turn, to
wake it/them up with WOL.
1) I found out (the hard way, naturally) that current Linux kernels support
default rather than APM, which is what nvram-wakeup uses as documented.
I suppose one could figure out how to use it to modify the ACPI alarm clock
but it wasn't exactly obvious how. APM and ACPI are at least treated as
exclusive, although I don't know that they *are*. I had nvram-wakeup all
couldn't get the !*&#@6489 system to wake up until I learned this and
ACPI functions built into the kernel.
2) Around Linux kernel release 2.6.21 (FC6) and the match for Fedora 7, the
ACPI support interface changed and broke my systems' ability to wake by RTC
I had to roll back my kernel to 2.6.20. YMMV.
(See my bug report http://bugzilla.kernel.org/show_bug.cgi?id=8995)
3) The old ACPI interface is to read/write to /proc/acpi/alarm to see the
and write new alarm times. Typically, systems use UTC time, not local time,
they're dual-booting Windoze, so the alarm times have to be UTC times, not
times. With this old interface, at least the Fedora Core kernels need a
/etc/init.d/halt because, at least *my* motherboards, reset the alarm if the
updated, which is part of the default halt processing. I had to modify
to check if the alarm was set and, if so, skip posting the system time to
This wasn't an issue for me since I'm running ntpd anyway to get time
from the internet.
4) The new ACPI interface, which as I mentioned above doesn't work for me,
read/write to /sys/class/rtc/rtc0/wakealarm the seconds since the Unix
not as bad as it sounds (really!). It just means you ought to use the date
to translate for you. The present time in this format is returned by "#
date -u +%s".
Read the man-page for details on how to specify other times (like when the
should wake up for Backula runs). I don't know whether this new interface
same issue with /etc/init.d/halt, but it does have another twist: The alarm
reset before it can be set/changed. Resetting is reportedly generically
setting to *any* past time value, but it is simplest to just set it to zero
"# echo 0 > /sys/class/rtc/rtc0/wakealarm; \
echo $time_to_wakeup > /sys/class/rtc/rtc0/wakealarm").
If this hasn't overwhelmed you and you have questions, I'll try to answer
someone else doesn't beat me to it). ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mythtv-users