[mythtv-users] Carbon Footprint

Bill Meek keemllib at gmail.com
Thu Sep 5 19:03:52 UTC 2013


On 09/05/2013 01:03 PM, Daryl McDonald wrote:
...
 > 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?

We can't tell from this line. But, you've collected the proper logs
below...

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

OK, that's good. You've moved on to the next problem. For now, let's leave
checklogin.sh removed. You'll have to address keeping up the system
later. (solve one problem at a time)

> 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:-
>         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

New trick for you. Take the time in seconds above (1378403399) and plug them
into the following:

     date --date='@1378403399'

the result is: Thu Sep  5 12:49:59 CDT 2013 in my time zone, so you'll
have to run the command in yours. But it suggests that there was a recording
scheduled, perhaps at 13:00 AND that you've told mythbackend to wake-up 10
minutes early.

If you used the command: mythbackend --setverbose idle,system, there would
have been more information in the log for when the command exited (remember
the result code when checklogin.sh was failing?)

> 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?

Yes, the command above is correct (without the quotes, which I'm sure you
added for readability.)

ls -l /usr/bin/setwakeup.sh does show that that command is executable of
course!

$time gets passed to the setwakeup.sh script as $1. So, yes, it's correct.

If you manually run the date command in the above script:

     date -u --date "`date --date @1378403399 +%F" "%T`" +%s

Guess what, it returns: 1378403399, the same value the backend passed
to the script in the 1st place. No harm done. Personally, I don't understand
why it's used. I'll let someone else comment on that.

Let's run the setwakeup.sh command as the mythtv user (in order to test
that the sudoers.d/mythtv file is doing it's job. Do this:

     sudo su mythtv
     sudo /usr/bin/setwakeup.sh 1390000000
     exit

You *shouldn't* get prompted for a password. What is the result?

-- 
Bill


More information about the mythtv-users mailing list