[mythtv-users] Requesting some sample kill a watt meter numbers

Alan Anderson andersonas at comcast.net
Thu Jan 20 17:23:00 UTC 2011


On Wednesday, January 19, 2011 10:10:20 pm Iain Buchanan wrote:
> On Mon, 2011-01-17 at 13:36 -0500, Joe Hickey wrote:
> > I will look into the possibility of mythshutdown, I wasn't aware you
> > could shut the master backend down and have it automatically set the
> > bios to restart.  The problem is that I do run mythweb and I'd miss
> > being able to go on that and schedule a recording from work, etc.
> 
> Wake On Lan!  It can be configured, in some cases, to work over your
> router from "outside".
> 
> HTH,

If it helps I use the following script on the Frontend right after the network 
starts to boot the backend.  Or you can run it any time you need to look at 
the backend mythweb.  


The wakeonlan perl script is:
http://gsd.di.uminho.pt/jpo/software/wakeonlan/


If the IP is pingable it exits.  If its not pingable it sends the wakeonlan 
twice then sleeps for 60 seconds giving the backend time to boot and start 
mythbackkend service.

Basically turning on either frontend boots the backend via wakeonlan if its 
not already up. Shut the frontends down and if the backend isnt busy it shuts 
down after a 120 second timeout.   Nvramwakeup and mythshutdown allow the 
backend to power its self off when its not used.  nvramwakeup boots it when a 
recording is due.  This script boots the backend at other times as needed.

#!/bin/sh

# Mythtv backend IP and  mac
CLIENT_IP=192.168.1.20
CLIENT_MAC=00:1c:13:79:5e:7c
#  
if ping -c 1 ${CLIENT_IP} >/dev/null
  then
 #   echo "${CLIENT_IP} ok"
  else
 #   echo "${CLIENT_IP} dropped one"
    sleep 0.1 
    if ! ping -c 1 ${CLIENT_IP} >/dev/null
    then
#      echo "${CLIENT_IP} dropped two, sending wakeonlan"
     /usr/local/bin/wakeonlan -p 69 $CLIENT_MAC 
      sleep 0.2
      /usr/local/bin/wakeonlan -p 69 $CLIENT_MAC
      sleep 60
    fi
  fi



More information about the mythtv-users mailing list