[mythtv-users] Querrying Recording Status

Joseph A. Caputo jcaputo1 at comcast.net
Fri Feb 27 13:49:46 EST 2004


On Friday 27 February 2004 12:33, Michael Starks wrote:
> I have found that Myth/IVTV benefit from a frequent reboot. 
> Otherwise, weird things begin to happen.  This is more of an ivtv
> problem but it seems clear that a nightly reboot scheduled via cron
> would help.  So, the question is.. how can I query Myth to see if it
> is currently recording something?  I know MythWeb does it so it is
> possible. Finally, does it return an exit code that I can act on in a
> shell script or maybe I can just look for a string, such that if it
> is not recording then reboot but if it is, don't.

mythbackend will report its status via an http connection to port 6544 
(unless you've changed the port number in mythtv-setup).  Use lynx, 
curl, or <insert CLI/shell-based http method here> to retrieve the 
HTML-formatted status page and parse it.  What you'll get will look 
like this:

[snip stylesheet stuff in front]

<body>

  <h1>MythTV Status</h1>
  <div class="content">
    <h2>Encoder status</h2>
    Encoder 1 is local on mythtv01 and is not recording.<br />
  </div>


[snip upcoming schedule]


More information about the mythtv-users mailing list