I recently purchased an HDHomeRun , so now my 0.20.2 BE/FE combo (Athlon XP 2500+, FC7) is straining to handle the load of HD playback along with commflagging (and the brutal scheduler query I cannot seem to conquer).&nbsp; I have a newer FE machine (Athlon X2 4800, FC8) that has excess capacity, so I began investigating how to off-load some work to that machine.&nbsp; I considered moving mysql to that machine, but commercial flagging became an obvious choice since it is soooo CPU-intensive.&nbsp; That is when I discovered Mythjobqueue.&nbsp; :)<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>I&#39;ve configured my machines to prevent commercial flagging on the BE/FE, and allow it on the FE.&nbsp; I have successfully tested this by manually starting the Mythjobqueue task on the FE machine.&nbsp; Now, I would like to have that task run automatically every time the FE machine comes up (or when the mythtv user logs in).&nbsp; How are you handling this? Does myth have the ability to auto-start this task?&nbsp; Or, can it be a service?&nbsp; Does it need to run as myth user, or can it run as root?&nbsp; <br>

<br>Advice appreciated...<br><br>Try setting up this script. It will watch the mythcommflag job and pause it when cpu utilization is too high.&nbsp; It&#39;s not mine but works great!&nbsp; More information here</blockquote><div>&nbsp;</div>
<div><a href="http://mysettopbox.tv/phpBB2/viewtopic.php?t=16027&amp;highlight=pausecommflag">http://mysettopbox.tv/phpBB2/viewtopic.php?t=16027&amp;highlight=pausecommflag</a> <br></div><div><br>#!/bin/bash<br># pause_commflag.sh&nbsp;&nbsp; v0.1<br>
# Utility to automatically pause &amp; unpause mythcommflag if CPU usage is above a certain level<br># Free for any use.<br># Installation:<br>#&nbsp; cp pause_commflag.sh /usr/local/bin<br>#&nbsp; chmod +x /usr/local/bin/pause_commflag.sh<br>
# Usage: Add to crontab (crontab -e) with logging:<br># * * * * * /usr/local/bin/pause_commflag.sh &gt;&gt;/var/log/mythtv/pause_commflag.log 2&gt;&amp;1<br># Usage: Add to crontab (crontab -e) without logging:<br># * * * * * /usr/local/bin/pause_commflag.sh<br>
<br><br>NOWDATE=$(date)<br>#CPUTHRESHOLD=65<br>#CPUTHRESHOLD=55<br>#CPUTHRESHOLD=50<br>CPUTHRESHOLD=45<br>PROCCOMMFLAG=`pidof mythcommflag`<br>if [ -n &quot;${PROCCOMMFLAG}&quot; ]<br>then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;$NOWDATE&nbsp;&nbsp; COMMFLAG Process FOUND. Checking Frontend CPU usage.&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FRONTENDCPU=`top -b -n 1 -u mythtv | grep mythfrontend | cut -c 43-45`<br>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;Frontend CPU%: $FRONTENDCPU&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [ &quot;$FRONTENDCPU&quot; -ge &quot;$CPUTHRESHOLD&quot; ]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;Frontend CPU usage ($FRONTENDCPU %) is greater than the threshold \<br>($CPUTHRESHOLD %). PAUSE Commflagging&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kill -s STOP $PROCCOMMFLAG<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;Frontend CPU usage ($FRONTENDCPU %) is less than the threshold \<br>
($CPUTHRESHOLD %). CONTINUE Commflagging&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kill -s CONT $PROCCOMMFLAG<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi<br>#else<br>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;No COMMFLAG Process Active&quot;<br>fi <br></div></div>-- <br>Tim<br>