[mythtv-users] Carbon Footprint

Daryl McDonald darylangela at gmail.com
Thu Sep 5 18:03:40 UTC 2013


On Thu, Sep 5, 2013 at 11:01 AM, Bill Meek <keemllib at gmail.com> wrote:

> On 09/05/2013 09:23 AM, Daryl McDonald wrote:
>
>> The system did not shut down, here is the log level debug status:
>>
>>   daryl at daryl-A780L3C:~$ mythshutdown -v general --loglevel debug
>> --status
>>
> ...
>
>  2013-09-05 10:11:22.482614 I  Mythshutdown: --status returned: 0
>> daryl at daryl-A780L3C:~$
>>
> ...
>
>  And this backend log: "http://paste.ubuntu.com/**6066654/<http://paste.ubuntu.com/6066654/>
>> "
>>
>
> On the bright side, you're using the proper tools to diagnose the
> problem. But you're not understanding their value. There was no
> need to pastebin the above log. You should have looked at the end
> especially line 16327. That explains the reason that shutdown didn't
> happen. Note that the most recent run of your backend starts at line
> 16223. Posting From there until the end of the log allows folks
> trying to help you to get directly to the problem. Sorry, pet peeve
> of mine.
>
> Maybe you don't understand exit codes. In *this* case (and typically
> for shell scripts,) 0 = success and non zero = failure.
>
> Look at either of the checklogin.sh scripts. See what exit codes they
> return. Remember you can run them manually from the command line to see
> the result.
>
> As I mentioned yesterday, for testing purposes, you can just remove the
> checklogin.sh script from your MythTV setup and test idle shutdown again.
>
> --
> Bill
>
> ______________________________**_________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/**listinfo/mythtv-user
>

I found this line (16220)  E Scheduler scheduler.cpp:2820 (ShutdownServer)
SetWakeuptimeCommand failed, shutdown aborted
Is this an indication that there is a problem with my setwakeup script?

I did remove the checklogin.sh and the box still did not shut down.

Another look at the BE log reveals:

Sep  5 13:46:15 daryl-A780L3C mythbackend[4114]: N Scheduler
scheduler.cpp:2814 (ShutdownServer) Running the command to set the next
scheduled wakeup time :-#012#011#011#011#011#011#011 sudo
/usr/bin/setwakeup.sh 1378403399
Sep  5 13:46:16 daryl-A780L3C mythbackend[4114]: E Scheduler
scheduler.cpp:2820 (ShutdownServer) SetWakeuptimeCommand failed, shutdown
aborted
Sep  5 13:48:16 daryl-A780L3C mythbackend[4114]: I HouseKeeping
housekeeper.cpp:225 (RunHouseKeeping) Running housekeeping thread
daryl at daryl-A780L3C:~$

And here is my setwakeup.sh:

#!/bin/sh
#
# set ACPI Wakeup time
# usage: setwakeup.sh seconds
#    seconds - number of seconds from epoch to UTC time (time_t time format)
#
# set UTCBIOS to true if bios is using UTC time
# set UTCBIOS to false if bios is using local time

UTCBIOS=false

if $UTCBIOS
then
    #utc bios - use supplied seconds
    SECS=$1
else
    #non utc bios - convert supplied seconds to seconds from
    #epoch to local time
    SECS=`date -u --date "\`date --date @$1 +%F" "%T\`" +%s`
fi

echo 0 > /sys/class/rtc/rtc0/wakealarm       # clear alarm
echo $SECS > /sys/class/rtc/rtc0/wakealarm   # write the waketime

And in the backend UI the command is "sudo /usr/bin/setwakeup.sh $time" as
per the Wiki. Does my setwakeup.sh need the suffix "$time"? Am I near or on
the right track?

Daryl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130905/8b56cc65/attachment.html>


More information about the mythtv-users mailing list