Contents

Usage

Miscellaneous Status Information Scripts provide a way for users to add additional information to the "Miscellaneous" section of the backend status page, available through MythWeb's Backend Status page or http://[hostname]:6544/ . Specify the full path to the Miscellaneous Status Information script in the setting Miscellaneous Status Application in mythtv-setup General settings on the page Miscellaneous Settings. The setting can be specified per-backend, allowing different backends to provide different status information (note, though, that the MythWeb Backend Status page will always show the master backend status).

An XML version of the backend's status including this information is also available through the Services_API. Use: <BackendIP>:6544/Status/GetStatus.

The easiest way to configure your Miscellaneous Status Information script is to specify a user-created script that simply calls other scripts. For example, create a script, misc_status_info.sh and place it in /home/mythtv/bin/misc_status_info.sh, then set Miscellaneous Status Application to /home/mythtv/bin/misc_status_info.sh. Then, to update your Miscellaneous Status Information output, simply edit the script.

Example Scripts

Writing Miscellaneous Status Information Scripts

Backend Status Format

The miscellaneous status information is output in the <Miscellaneous> element of the backend status document. Each piece of information is output using a single XML tag, <Information>, with any of 3 attributes, "display", "name", and "value":

The value of the display attribute is inserted directly into the HTML backend status page. If the display value does not contain any "<p>" or "<br>" HTML breaks, a line break tag (<br />) will be written after the display value. If the display value provides any HTML breaks, no line breaks will be appended to the value (so the display value must provide all the breaks). The name and value attributes are only accessible through the XML backend status page. The display value may contain HTML markup, though doing so may "break" the backend status page, causing it to render incorrectly, so including HTML markup should be done with care.

Script Output Format

The script should output the three values on a single line delimited with []:[], i.e.:

display[]:[]name[]:[]value

Values may be omitted, as long as the order (and placement) remains constant:

display
[]:[]name[]:[]value

If four (or more) fields are output on a line, the extra fields will be ignored.

The script should provide output quickly to ensure the status page is returned in a reasonably short period of time. If you would like to provide information that requires a significant amount of time to compute (or that comes from a remote system whose response time is unknown), you may want to set up another script, i.e. in a cron job, and poll the data at appropriate intervals and write the output to a file, which could then be read (or simply cat'ed, if in the proper format) by the miscellaneous status script.

Thermal Information

Note that previously, MythTV provided CPU temperature information in the "Machine information" section of the status page. The values were retrieved directly using libsensors. The libsensors dependency has since been removed and those wanting this type of information should make it available through the miscellaneous status application.

Previously, CPU temperature was output in XML format as:

<Thermal temperature="53.5 &#8451;" />

and rendered to HTML as:

Current CPU temperature: 53.5 &#8451;.<br />

To get equivalent output using the miscellaneous status info, create a script or program that outputs information such as: