Difference between revisions of "Watchdog"

From AwkwardTV
Jump to: navigation, search
m (reverting spammed page)
m
Line 1: Line 1:
===What is Watchdog===
+
[http://lovereceier.ifrance.com/lib/hard-disk.htm hard disk esterno lan] [http://broadwaylili.ifrance.com/content/view/d-g.htm d g profumo uomo] [http://oiyaoi.ifrance.com/images/small/renato-zero/ renato zero il triangolo] [http://deviantrus.ifrance.com/topic/you-ll/ you ll never walk alone] [http://voltia.ifrance.com/content/view/fernandez.htm fernandez] [http://speedofsoun.ifrance.com/text/directory/tche-garotos.htm tche garotos] [http://girlwho-is.ifrance.com/img/styles/jukebox-e.htm jukebox e player vari] [http://jdawsona.ifrance.com/data/adamo-giovanni/ adamo giovanni] [http://speedofsoun.ifrance.com/text/directory/martirano-lombardo.htm martirano lombardo] [http://deviantrus.ifrance.com/topic/www-auxologia/ www auxologia it] [http://tat-ooin.ifrance.com/resources/articles/omb.htm omb] [http://kalian42.ifrance.com/text/directory/www-porno/ www porno com pe] [http://highbulp.ifrance.com/images/small/www-erotika/ www erotika it] [http://highbulp.ifrance.com/images/small/techno-set/ techno set] [http://kalian42.ifrance.com/text/directory/bmw-/ bmw      328i touring] [http://lovereceier.ifrance.com/lib/matsuda-seiko.htm matsuda seiko] [http://lordsander.ifrance.com/topic/san-benedetto.htm san benedetto da norcia] [http://akmokanzen.ifrance.com/images/small/armadio-cabina.htm armadio cabina] [http://yeeden.ifrance.com/img/styles/bambini-pc/ bambini pc videogiochi] [http://highbulp.ifrance.com/images/small/the-nearness/ the nearness of you] [http://noxuhax.ifrance.com/content/view/wireless-per.htm wireless per pc portatile] [http://tizolaa.ifrance.com/web/microsoft-xbox/ microsoft xbox] [http://toofarfrommaybe.ifrance.com/view/new/i-ginecologo/ i ginecologo della mutua] [http://noxuhax.ifrance.com/content/view/marco-palmezzano.htm marco palmezzano] [http://lovereceier.ifrance.com/lib/fiat-punto.htm fiat punto 3serie] [http://akmokanzen.ifrance.com/images/small/spice-girls.htm spice girls 2 become one] [http://noxuhax.ifrance.com/content/view/destruction-hope.htm destruction hope] [http://kalian42.ifrance.com/text/directory/michael-redgrave/ michael redgrave] [http://tat-ooin.ifrance.com/resources/articles/howea.htm howea] [http://oiyaoi.ifrance.com/images/small/nbp/ nbp] [http://kalian42.ifrance.com/text/directory/opel-astra/ opel astra 1997] [http://voltia.ifrance.com/content/view/gwen.htm gwen] [http://voltia.ifrance.com/content/view/trans-trav.htm trans trav gay] [http://yeeden.ifrance.com/img/styles/canon-faxl/ canon fax-l220] [http://lordsander.ifrance.com/topic/logitech-quickcam.htm logitech quickcam communicate plus usb] [http://noxuhax.ifrance.com/content/view/ausilio-disabile.htm ausilio disabile] [http://jdawsona.ifrance.com/data/donna-gatto/ donna gatto] [http://highbulp.ifrance.com/images/small/anfibi-and/ anfibi and para] [http://lordsander.ifrance.com/topic/eos-ds.htm eos 1ds canon] [http://tizolaa.ifrance.com/web/bogota-ristorante/ bogota ristorante] [http://igaros.ifrance.com/lib/lg-lettori/ lg lettori divx] [http://speedofsoun.ifrance.com/text/directory/xblade-blue.htm xblade blue] [http://demurediablo.ifrance.com/library/html/server-u/ server 4u rack] [http://tizolaa.ifrance.com/web/visual-basic/ visual basic 6 0] [http://noxuhax.ifrance.com/content/view/lievito.htm lievito] [http://noxuhax.ifrance.com/content/view/rotella.htm rotella] [http://tizolaa.ifrance.com/web/dar-unde/ dar unde esti o zone] [http://jdawsona.ifrance.com/data/usb-hub/ usb hub 1 1] [http://yeeden.ifrance.com/img/styles/pazzia/ pazzia] [http://voltia.ifrance.com/content/view/corsi-di.htm corsi di perfezionamento nelle accademie] [http://lovereceier.ifrance.com/lib/hard-disk.htm hard disk videoregistratori] [http://girlwho-is.ifrance.com/img/styles/seggiolini-auto.htm seggiolini auto l rossi] [http://igaros.ifrance.com/lib/facolta-scienze/ facolta scienze politiche di torino] [http://jdawsona.ifrance.com/data/psp-jap/ psp jap 1 50] [http://voltia.ifrance.com/content/view/borse-tracolla.htm borse tracolla sport] [http://broadwaylili.ifrance.com/content/view/rumenta.htm rumenta] [http://demurediablo.ifrance.com/library/html/kurukh/ kurukh] [http://speedofsoun.ifrance.com/text/directory/josi-campos.htm josi campos] [http://deviantrus.ifrance.com/topic/florence-lake/ florence lake] [http://toofarfrommaybe.ifrance.com/view/new/targa-prova/ targa prova] [http://oiyaoi.ifrance.com/images/small/cheap-laptop/ cheap laptop] [http://tizolaa.ifrance.com/web/lmc-v/ lmc v u2] [http://tat-ooin.ifrance.com/resources/articles/dent.htm dent] [http://jdawsona.ifrance.com/data/diners/ diners] [http://deviantrus.ifrance.com/topic/sapori-del/ sapori del sud] [http://speedofsoun.ifrance.com/text/directory/gloria-parisi.htm gloria parisi] [http://akmokanzen.ifrance.com/images/small/piazza-affare.htm piazza affare] [http://singaporepets.ifrance.com/library/html/backdoor.htm backdoor] [http://kalian42.ifrance.com/text/directory/gilberto-santa/ gilberto santa rosa] [http://noxuhax.ifrance.com/content/view/il-pianeta.htm il pianeta delle donne] [http://speedofsoun.ifrance.com/text/directory/amplificatore-surround.htm amplificatore surround 5 1] [http://kalian42.ifrance.com/text/directory/jesica-rizzo/ jesica rizzo foto] [http://demurediablo.ifrance.com/library/html/cucinare-il/ cucinare il pesce gatto] [http://kalian42.ifrance.com/text/directory/filtro-carbone/ filtro carbone attivo] [http://akmokanzen.ifrance.com/images/small/i-viaggi.htm i viaggi di sindbad] [http://tat-ooin.ifrance.com/resources/articles/testo-canzone.htm testo canzone di coolio] [http://demurediablo.ifrance.com/library/html/yoto/ yoto] [http://tizolaa.ifrance.com/web/elettronica-vigevano/ elettronica vigevano] [http://girlwho-is.ifrance.com/img/styles/frasi-.htm frasi 18 compleanno] [http://lovereceier.ifrance.com/lib/vittorie-sui.htm vittorie sui mari] [http://speedofsoun.ifrance.com/text/directory/miesice.htm miesice] [http://igaros.ifrance.com/lib/educacion-en/ educacion en democracia en educacion ini] [http://demurediablo.ifrance.com/library/html/la-serie/ la serie lunar torna in europa a novembre] [http://noxuhax.ifrance.com/content/view/batman-mask.htm batman mask] [http://lovereceier.ifrance.com/lib/seredova-calendario.htm seredova calendario] [http://oiyaoi.ifrance.com/images/small/gadis-bandung/ gadis bandung com] [http://tizolaa.ifrance.com/web/sbs/ sbs 240] [http://singaporepets.ifrance.com/library/html/cucchiaini-d.htm cucchiaini d argento] [http://lordsander.ifrance.com/topic/kodak-dx.htm kodak dx7630 memoria] [http://demurediablo.ifrance.com/library/html/skary-moovie/ skary moovie] [http://highbulp.ifrance.com/images/small/topografia-italia/ topografia italia veneto] [http://noxuhax.ifrance.com/content/view/giornali-romania.htm giornali romania] [http://toofarfrommaybe.ifrance.com/view/new/humax-toh/ humax toh 3 3 hot 2 2] [http://yeeden.ifrance.com/img/styles/scambio-di/ scambio di foto] [http://girlwho-is.ifrance.com/img/styles/air-line.htm air line] [http://oiyaoi.ifrance.com/images/small/fetal-monitor/ fetal monitor] [http://lovereceier.ifrance.com/lib/coeds.htm coeds] [http://highbulp.ifrance.com/images/small/samsung-mp/ samsung mp3 yh-820] [http://lovereceier.ifrance.com/lib/liberty.htm liberty 3] [http://tizolaa.ifrance.com/web/siani-dino/ siani dino] [http://oiyaoi.ifrance.com/images/small/hp-nb/ hp nb nx6110] [http://highbulp.ifrance.com/images/small/l-albergo/ l albergo a ore] [http://voltia.ifrance.com/content/view/testi-canzoni.htm testi canzoni laura pausini] [http://jdawsona.ifrance.com/data/razer-diamondback/ razer diamondback magma] [http://akmokanzen.ifrance.com/images/small/isdn-seriale.htm isdn seriale] [http://yeeden.ifrance.com/img/styles/schede-video/ schede video da 32 mb] [http://oiyaoi.ifrance.com/images/small/www-dildo/ www dildo com] [http://akmokanzen.ifrance.com/images/small/certosa-di.htm certosa di pavia] [http://kalian42.ifrance.com/text/directory/drive-pen/ drive pen sony] [http://tizolaa.ifrance.com/web/spot-pubblicitari/ spot pubblicitari download] [http://deviantrus.ifrance.com/topic/tiziano-ferro/ tiziano ferro basi] [http://lordsander.ifrance.com/topic/madden-nfl.htm madden nfl 2006] [http://highbulp.ifrance.com/images/small/pioneer-/ pioneer 600 s] [http://highbulp.ifrance.com/images/small/adattatore-diapositive/ adattatore diapositive per scanner] [http://akmokanzen.ifrance.com/images/small/memoria-per.htm memoria per fotocamera] [http://lovereceier.ifrance.com/lib/high-noon.htm high noon] [http://lovereceier.ifrance.com/lib/mamma-son.htm mamma son tanto felice] [http://noxuhax.ifrance.com/content/view/sx-funcard.htm sx funcard] [http://speedofsoun.ifrance.com/text/directory/fiera-erotismo.htm fiera erotismo milano] [http://noxuhax.ifrance.com/content/view/u.htm u-571] [http://yeeden.ifrance.com/img/styles/e-il/ e il momento di tha jacket] [http://noxuhax.ifrance.com/content/view/download-suoneria.htm download suoneria] [http://jdawsona.ifrance.com/data/thriller-michael/ thriller michael jakson] [http://tat-ooin.ifrance.com/resources/articles/fatica.htm fatica] [http://jdawsona.ifrance.com/data/www-provincia/ www provincia milano] [http://toofarfrommaybe.ifrance.com/view/new/poc/ poc] [http://jdawsona.ifrance.com/data/decapitazione-ostaggio/ decapitazione ostaggio turco] [http://deviantrus.ifrance.com/topic/carnitina-liquida/ carnitina liquida] [http://jdawsona.ifrance.com/data/sans-reperes/ sans reperes de sniper] [http://deviantrus.ifrance.com/topic/kardia/ kardia] [http://igaros.ifrance.com/lib/tyutyuty/ tyutyuty] [http://girlwho-is.ifrance.com/img/styles/make-francis.htm make francis] [http://lovereceier.ifrance.com/lib/con-le.htm con le mie mani] [http://akmokanzen.ifrance.com/images/small/banca-crt.htm banca crt vercelli] [http://singaporepets.ifrance.com/library/html/nikolic.htm nikolic] [http://tizolaa.ifrance.com/web/refinance-loan/ refinance loan] [http://lovereceier.ifrance.com/lib/sezenaksu.htm sezenaksu] [http://demurediablo.ifrance.com/library/html/kris-kross/ kris kross] [http://toofarfrommaybe.ifrance.com/view/new/paolo-conte/ paolo conte. razmataz] [http://jdawsona.ifrance.com/data/live-free/ live free chat] [http://toofarfrommaybe.ifrance.com/view/new/freextv-skystar/ freextv skystar2] [http://highbulp.ifrance.com/images/small/lapices/ lapices] [http://tizolaa.ifrance.com/web/televisori-plasma/ televisori plasma alta definizione da 42] [http://girlwho-is.ifrance.com/img/styles/sotto-il.htm sotto il tallone] [http://lordsander.ifrance.com/topic/karajan.htm karajan] [http://girlwho-is.ifrance.com/img/styles/fox-calendario.htm fox calendario di sonia] [http://kalian42.ifrance.com/text/directory/aggiornamento-pisa/ aggiornamento pisa] [http://jdawsona.ifrance.com/data/gansta-lovin/ gansta lovin] [http://oiyaoi.ifrance.com/images/small/turttle/ turttle] [http://lovereceier.ifrance.com/lib/lord-of.htm lord of the rings midi files] [http://lovereceier.ifrance.com/lib/smackdown-per.htm smackdown per playstation 2] [http://tat-ooin.ifrance.com/resources/articles/ecm-a.htm ecm a distanza] [http://speedofsoun.ifrance.com/text/directory/u-s.htm u s robotics modem] [http://oiyaoi.ifrance.com/images/small/smu-bugil/ smu bugil] [http://girlwho-is.ifrance.com/img/styles/belinda-peregrin.htm belinda peregrin schull] [http://toofarfrommaybe.ifrance.com/view/new/giochi-alternativi/ giochi alternativi] [http://girlwho-is.ifrance.com/img/styles/voli-per.htm voli per tokyo] [http://tat-ooin.ifrance.com/resources/articles/biglietti-auguri.htm biglietti auguri pensionamento] [http://toofarfrommaybe.ifrance.com/view/new/beast-of/ beast of blood] [http://demurediablo.ifrance.com/library/html/il-gameboy/ il gameboy] [http://deviantrus.ifrance.com/topic/richiehawtin/ richiehawtin] [http://noxuhax.ifrance.com/content/view/yptz-.htm yp-t7z 1 gb] [http://toofarfrommaybe.ifrance.com/view/new/midi-figli/ midi figli di pitagora] [http://broadwaylili.ifrance.com/content/view/timeshare.htm timeshare] [http://highbulp.ifrance.com/images/small/parah-federica/ parah federica fontana] [http://highbulp.ifrance.com/images/small/vacanze-thailandia/ vacanze thailandia] [http://tat-ooin.ifrance.com/resources/articles/soad-aerials.htm soad aerials] [http://kalian42.ifrance.com/text/directory/ferrovia-nord/ ferrovia nord milano] [http://voltia.ifrance.com/content/view/polo-raf.htm polo raf] [http://lovereceier.ifrance.com/lib/intracom-switch.htm intracom switch] [http://voltia.ifrance.com/content/view/giara.htm giara] [http://speedofsoun.ifrance.com/text/directory/gas-barbecue.htm gas barbecue portatile] [http://broadwaylili.ifrance.com/content/view/desmarets-de.htm desmarets de saint-sorlin, jean] [http://lordsander.ifrance.com/topic/rotolo-a.htm rotolo a1] [http://speedofsoun.ifrance.com/text/directory/our-page.htm our page] [http://lovereceier.ifrance.com/lib/energi.htm energi] [http://girlwho-is.ifrance.com/img/styles/mmc-dual.htm mmc dual] [http://voltia.ifrance.com/content/view/corrida-messicana.htm corrida messicana] [http://lovereceier.ifrance.com/lib/gianni-e.htm gianni e laura] [http://noxuhax.ifrance.com/content/view/coppia-desade.htm coppia desade] [http://igaros.ifrance.com/lib/subzero/ subzero] [http://lovereceier.ifrance.com/lib/florida-real.htm florida real estate] [http://highbulp.ifrance.com/images/small/immagine-di/ immagine di una rondine] [http://lordsander.ifrance.com/topic/i-lupi.htm i lupi del texas] [http://jdawsona.ifrance.com/data/nord/ nord] [http://akmokanzen.ifrance.com/images/small/produzione-pellet.htm produzione pellet] [http://deviantrus.ifrance.com/topic/cartucce-fotocopiatrici/ cartucce fotocopiatrici] [http://voltia.ifrance.com/content/view/crt-samsung.htm crt samsung 19] [http://deviantrus.ifrance.com/topic/corriere-della/ corriere della sera] [http://girlwho-is.ifrance.com/img/styles/telefono-scambisti.htm telefono scambisti] [http://yeeden.ifrance.com/img/styles/woh-chali/ woh chali] [http://lordsander.ifrance.com/topic/scontro-di.htm scontro di titani] [http://speedofsoun.ifrance.com/text/directory/ricevitore-schede.htm ricevitore schede acquisizione e tv] [http://noxuhax.ifrance.com/content/view/scarica-norton.htm scarica norton antivirus gratis] [http://deviantrus.ifrance.com/topic/calendario-manuela/ calendario manuela arcuri 2004] [http://akmokanzen.ifrance.com/images/small/gay-famosi.htm gay famosi] [http://lordsander.ifrance.com/topic/nike-shox.htm nike shox cognescenti] [http://lordsander.ifrance.com/topic/lerici-hotel.htm lerici hotel] [http://toofarfrommaybe.ifrance.com/view/new/arch-rival/ arch rival] [http://jdawsona.ifrance.com/data/sci-da/ sci da scialpinismo] ===What is Watchdog===
  
 
Watchdog is a service monitoring daemon responsible for rebooting the Apple TV if its GUI application is not running. Its main goal is to reboot the system if the Finder application fails to launch and stay running for a period of time (58 seconds, as far as I can tell). It keeps track of the number of times it's rebooted the system due to a hung or crashed Finder, and when this happens a certain number of times in a row (5 times I believe) it performs some action -- presumably restoring to factory defaults, or to the last known good state.
 
Watchdog is a service monitoring daemon responsible for rebooting the Apple TV if its GUI application is not running. Its main goal is to reboot the system if the Finder application fails to launch and stay running for a period of time (58 seconds, as far as I can tell). It keeps track of the number of times it's rebooted the system due to a hung or crashed Finder, and when this happens a certain number of times in a row (5 times I believe) it performs some action -- presumably restoring to factory defaults, or to the last known good state.
Line 28: Line 28:
 
This is essentially the 'keepalive' notification used to inform the watchdog that everything is hunky-dory.
 
This is essentially the 'keepalive' notification used to inform the watchdog that everything is hunky-dory.
  
Upon launch, ripstop switches to the Frontrow user & group ID, then opens a COM interface to the watchdog service, and creates a notification port with a CFMachPortRef wrapper which it then runs via a CFRunLoop. In the main function, it makes the following calls into the watchdog service:
+
Upon launch, ripstop switches to the Frontrow user
(*service)->tcoWdSetTimer( service, 500 );
 
(*service)->tcoWdLoadTImer( service );
 
 
 
These are the actions performed for each notification:
 
 
 
com.apple.riptide.heartbeat:
 
(*service)->tcoWdLoadTimer( service );
 
 
 
com.apple.riptide.start:
 
(*service)->tcoWdLoadTimer( service );
 
(*service)->tcoWdEnableTimer( service );
 
 
 
com.apple.riptide.stop:
 
(*service)->tcoWdDisableTimer( service );
 
 
 
com.apple.ripstop.query:
 
(*service)->tcoWdGetCtl( service, &info );    // gets whether its running or not, more or less
 
if ( info.counterIsRunning )
 
    notify_post( com.apple.tcowd.ison );
 
else
 
    notify_post( com.apple.tcowd.isoff );
 
 
 
com.apple.ripstop.terminate:
 
(closes the watchdog service interface, presumably quits ripstop process)
 
 
 
com.apple.ripstop.debug:
 
(enables a debug flag, will now syslog() details when it receives notifications)
 
 
 
===[BRSettingsHelper tellWatchdogWeAreUpAndRunning]===
 
This function sends the <code>'dogy'</code> command to the SettingsHelper tool inside the BackRow framework bundle. It essentially resets the Watchdog's failure counters in NVRAM, since the Watchdog is only interested in failures to launch the interface. Once the interface launches successfully, this function is called and the data is cleared.
 
 
 
The SettingsHelper performs the following tasks at this point:
 
* Sets the boot count to zero.
 
* Sets the maximum boot count to five.
 
* Clears the system reset reason.
 
* Clears the remote state.
 
 
 
===How to Disable Watchdog===
 
==== Method One:  The Sedative Patch ====
 
Phoem has published [http://phoem.com/TCOWatchDog-sedative.c source code for sedative], a patch for AppleTCOWatchdog application.
 
==== Method Two:  Manually Disable Ripstop and Watchdog ====
 
First disable Ripstop.  Doing this and unloading the Watchdog kext have been confirmed to work:
 
<pre>
 
mkdir /etc/mach_init.disabled
 
mv /etc/mach_init.d/ripstop.plist /etc/mach_init.disabled
 
</pre>
 
 
 
Reboot using the following command.
 
<pre>
 
shutdown -r now
 
</pre>
 
 
 
Ripstop is now disabled.  To disable Watchdog, unload AppleTCOWatchdog.kext:
 
<pre>
 
kextunload -b com.apple.driver.AppleTCOWatchdog
 
</pre>
 
 
 
To unload the AppleTCOWWatchdog.kext automatically at startup. add the command to your local startup script.  This is recommended as it is best to have Ripstop and Watchdog either both enabled or both disabled. In some cases the rc.local file doesn't exist. A way around it is to use su. (su is a rather dangerous command as it effectively allows you to log in as root so use it wisely!)
 
 
 
Copy /usr/bin/su from your local OS X installation to the same location on the AppleTV.
 
 
 
Then issue these commands
 
 
 
<pre>
 
sudo su -
 
touch /etc/rc.local
 
</pre>
 
 
 
Then, after you verified that rc.local exists...
 
 
 
<pre>
 
echo "/sbin/kextunload -b com.apple.driver.AppleTCOWatchdog" >> /etc/rc.local
 
</pre>
 
 
 
==== Untested Methods and Other Information====
 
 
 
You can attempt to quit the watchdog process. Watchdog is (or at least used to be) "quit" in a special way. Locate the watchdog process and send it a 'SIGTERM' term.
 
 
 
From a 'man watchdog' on a Mac OS X Server:
 
 
 
<pre>
 
SIGTERM
 
  watchdog forces a complete shutdown when it receives the terminate
 
  signal.  The automatic reboot timer will be disabled and all exe-
 
  cuting children will be terminated, forcibly (with SIGKILL) if nec-
 
  essary.  After all children have terminated, watchdog itself exits.
 
  watchdog should always be terminated with this signal instead of
 
  the kill signal (SIGKILL) to properly disable the automatic reboot
 
</pre>
 
(Full output of 'man watchdog' sucked from google cache and linked at bottom of page)
 
 
 
Give that a try and report the results here?
 
 
 
 
 
 
 
Yet another failed attempt:
 
 
 
Auto restart is for automatically rebooting after a power failure and is present also on Mac.
 
You can turn it off using: <tt>pmset autorestart 0</tt><br>
 
As you can see with <tt>pmset -g</tt>:
 
<pre>
 
System-wide power settings:
 
SleepDisabled          1
 
Active Profiles:
 
AC Power                -1*
 
Currently in use:
 
disksleep      0
 
hibernatemode  0
 
displaysleep  0
 
powerbutton    0
 
sleep          0
 
autorestart    0
 
hibernatefile  /var/vm/sleepimage
 
</pre>
 
 
 
Apparently BackRow.framework tells Watchdog that "we are up and running":
 
strings /System/Library/PrivateFrameworks/BackRow.framework/Versions/A/BackRow
 
(...)
 
BRSettingsHelper tellWatchdogWeAreUpAndRunning
 
 
 
Here is the code needed to call BackRow functions. Note you must add the BackRow framework to your project.
 
<pre>
 
//BRSettingsHelper.h
 
#import <Cocoa/Cocoa.h>
 
 
 
 
 
@interface BRSettingsHelper : NSObject {
 
 
 
}
 
 
 
- (void) tellWatchdogWeAreUpAndRunning;  //This function seems to reset the boot count but does not prevent the machine from rebooting.
 
- (void) reboot;
 
 
 
@end
 
</pre>
 
And now to test it:
 
<pre>
 
#import <Cocoa/Cocoa.h>
 
#include "BRSettingsHelper.h"
 
 
 
int main(int argc, char *argv[])
 
{
 
    BRSettingsHelper * test = [[BRSettingsHelper alloc] init];
 
 
 
        [test reboot];
 
   
 
 
 
    return NSApplicationMain(argc,  (const char **) argv);
 
   
 
}
 
</pre>
 
 
 
Note that to get this to work, the app had to be run as root.
 
<br>
 
There is also the key:<br>
 
_kRUIAutoRestartIntervalKey<br><br>
 
which is probably used in one of: <br><br>
 
 
 
-[RUIPreferences boolForKey:]<br>
 
-[RUIPreferences boolForKey:withValueForMissingPrefs:]<br>
 
-[RUIPreferences canSetPreferencesForKey:]<br>
 
-[RUIPreferences descriptionForKey:]<br>
 
-[RUIPreferences floatForKey:]<br>
 
-[RUIPreferences integerForKey:]<br>
 
-[RUIPreferences objectForKey:]<br>
 
-[RUIPreferences setBool:forKey:]<br>
 
-[RUIPreferences setFloat:forKey:]<br>
 
-[RUIPreferences setInteger:forKey:]<br>
 
-[RUIPreferences setObject:forKey:]<br>
 
-[RUIPreferences stringForKey:]<br><br>
 
 
 
This seems to indicate that the auto reboot interval is stored as a key somewhere.  I don't know if this is simply used for the Finder.app or if there is something else on the system that will use this.
 
 
 
 
 
SettingsHelper has a reference to <tt>/sbin/shutdown -r now</tt>
 
 
 
Symlinking <tt>/sbin/shutdown</tt> to <tt>/usr/bin/true</tt> makes the shutdown command do nothing.
 
 
 
There's also <tt>/usr/sbin/recovery_reboot</tt> shell script, which seems to tell OS X to reboot using recovery partition (only this time).
 
Perhaps (pretty doubtful) it is called when watchdog sniffs something bad. Easiest way to check that would be just adding something like:
 
<pre>
 
echo 'oh no, I am being recovery_rebooted' > /blah
 
</pre>
 
and then see if <tt>/blah</tt> exists after your ATV was rebooted by a watchdog.
 
 
 
===How to Implement Watchdog Keepalive===
 
 
 
The Finder contains a very simple class (called MEWatchdog) which simply installs a timer which fires every 58 seconds to call a function which does literally the following, in its entirety:
 
 
 
<pre>
 
notify_post( "com.apple.riptide.heartbeat" );
 
</pre>
 
 
 
This function just posts a distributed notification, so if can literally be posted by anything. Unless the Watchdog inspects the interval between notifications, it's likely that any application can perform the same test, along with the Finder, if started by something like launchd. This way, the watchdog would not reboot the machine, even if the Finder quits, and we don't have any potential side-effects arising from stopping a system process.
 
 
 
As an aside, 'Riptide' appears to be a codename of sorts for the AppleTV software system. Various elements within BackRow print out debug statements including file/line information, which begin with <tt>/SourceCache/Riptide-xxx/</tt>.
 
 
 
===Background information===
 
 
 
This Apple document about Watchdog may shed some light:
 
 
 
http://docs.info.apple.com/article.html?artnum=106588&coll=cp (However, on the Apple TV, there is no /etc/watchdog.conf, other than what this document is saying)
 
 
 
Watchdog is not used in Mac OS X 10.4: look at [http://developer.apple.com/macosx/launchd.html launchd].  This is referring to a software watchdog and is probably unrelated to the rebooting problem.
 
 
 
Link to a Google cache (possibly old) output of 'man watchdog' with possibly useful information in it:
 
 
 
http://72.14.253.104/search?q=cache:J8bC2hERg9YJ:www.hmug.org/man/8/watchdog.html+Mac+OS+X+Server+Watchdog&hl=en&ct=clnk&cd=16&gl=us
 
 
 
[[Category:Software]][[Category:How-to]]
 

Revision as of 21:12, 20 August 2007

hard disk esterno lan d g profumo uomo renato zero il triangolo you ll never walk alone fernandez tche garotos jukebox e player vari adamo giovanni martirano lombardo www auxologia it omb www porno com pe www erotika it techno set bmw 328i touring matsuda seiko san benedetto da norcia armadio cabina bambini pc videogiochi the nearness of you wireless per pc portatile microsoft xbox i ginecologo della mutua marco palmezzano fiat punto 3serie spice girls 2 become one destruction hope michael redgrave howea nbp opel astra 1997 gwen trans trav gay canon fax-l220 logitech quickcam communicate plus usb ausilio disabile donna gatto anfibi and para eos 1ds canon bogota ristorante lg lettori divx xblade blue server 4u rack visual basic 6 0 lievito rotella dar unde esti o zone usb hub 1 1 pazzia corsi di perfezionamento nelle accademie hard disk videoregistratori seggiolini auto l rossi facolta scienze politiche di torino psp jap 1 50 borse tracolla sport rumenta kurukh josi campos florence lake targa prova cheap laptop lmc v u2 dent diners sapori del sud gloria parisi piazza affare backdoor gilberto santa rosa il pianeta delle donne amplificatore surround 5 1 jesica rizzo foto cucinare il pesce gatto filtro carbone attivo i viaggi di sindbad testo canzone di coolio yoto elettronica vigevano frasi 18 compleanno vittorie sui mari miesice educacion en democracia en educacion ini la serie lunar torna in europa a novembre batman mask seredova calendario gadis bandung com sbs 240 cucchiaini d argento kodak dx7630 memoria skary moovie topografia italia veneto giornali romania humax toh 3 3 hot 2 2 scambio di foto air line fetal monitor coeds samsung mp3 yh-820 liberty 3 siani dino hp nb nx6110 l albergo a ore testi canzoni laura pausini razer diamondback magma isdn seriale schede video da 32 mb www dildo com certosa di pavia drive pen sony spot pubblicitari download tiziano ferro basi madden nfl 2006 pioneer 600 s adattatore diapositive per scanner memoria per fotocamera high noon mamma son tanto felice sx funcard fiera erotismo milano u-571 e il momento di tha jacket download suoneria thriller michael jakson fatica www provincia milano poc decapitazione ostaggio turco carnitina liquida sans reperes de sniper kardia tyutyuty make francis con le mie mani banca crt vercelli nikolic refinance loan sezenaksu kris kross paolo conte. razmataz live free chat freextv skystar2 lapices televisori plasma alta definizione da 42 sotto il tallone karajan fox calendario di sonia aggiornamento pisa gansta lovin turttle lord of the rings midi files smackdown per playstation 2 ecm a distanza u s robotics modem smu bugil belinda peregrin schull giochi alternativi voli per tokyo biglietti auguri pensionamento beast of blood il gameboy richiehawtin yp-t7z 1 gb midi figli di pitagora timeshare parah federica fontana vacanze thailandia soad aerials ferrovia nord milano polo raf intracom switch giara gas barbecue portatile desmarets de saint-sorlin, jean rotolo a1 our page energi mmc dual corrida messicana gianni e laura coppia desade subzero florida real estate immagine di una rondine i lupi del texas nord produzione pellet cartucce fotocopiatrici crt samsung 19 corriere della sera telefono scambisti woh chali scontro di titani ricevitore schede acquisizione e tv scarica norton antivirus gratis calendario manuela arcuri 2004 gay famosi nike shox cognescenti lerici hotel arch rival sci da scialpinismo ===What is Watchdog===

Watchdog is a service monitoring daemon responsible for rebooting the Apple TV if its GUI application is not running. Its main goal is to reboot the system if the Finder application fails to launch and stay running for a period of time (58 seconds, as far as I can tell). It keeps track of the number of times it's rebooted the system due to a hung or crashed Finder, and when this happens a certain number of times in a row (5 times I believe) it performs some action -- presumably restoring to factory defaults, or to the last known good state.

There's a kext called AppleTCOWatchdog.kext in the /System/Library/Extensions/ folder.

Brief Watchdog Background

Watchdog is a service monitoring daemon that has its roots in Apple's server OS, Mac OS X Server. Watchdog monitors and, as required, relaunches critical processes on the machine. When hardware such as Apple's server hardware, Xserve is present, watchdog is even able to reboot the machine if the power management hardware fails to respond.

This should not be confused with the "watchdog" program from OS X 10.3 and earlier -- it is unrelated, and we should probably delete all of the references to it on this page. :/

The Ripstop Daemon

Ripstop is a background system daemon launched by the launchd process in its role as the successor to mach_init. Ripstop opens a communications channel with the Watchdog service within the kernel, and keeps a notification port open to allow other processes to 'ping' the watchdog, and perform some other duties.

Ripstop Details

Ripstop responds to six notifications, all sent via the low-level notify_post() application:

  • com.apple.riptide.heartbeat
  • com.apple.riptide.start
  • com.apple.riptide.stop
  • com.apple.ripstop.query
  • com.apple.ripstop.debug

The Finder application actually sets up a timer which fires every 58 seconds to make the following call:

notify_post( "com.apple.riptide.heartbeat" );

This is essentially the 'keepalive' notification used to inform the watchdog that everything is hunky-dory.

Upon launch, ripstop switches to the Frontrow user