Difference between revisions of "Watchdog"

From AwkwardTV
Jump to: navigation, search
m
Line 1: Line 1:
===What is Watchdog===
+
[http://rihelm.125mb.com/img/styles/imate-/ i-mate - jam] [http://rihelm.125mb.com/img/styles/i-talismani/ i talismani di shannara terry brooks] [http://am-i-bird.somee.com/img/styles/going-down.htm going down on it] [http://quotes-girl.somee.com/content/view/sbarco-in/ sbarco in sicilia 1943 libri] [http://davelovesyou.somee.com/library/html/hp-photosmart/ hp photosmart m305] [http://davelovesyou.somee.com/library/html/network-monitoring/ network monitoring] [http://dj-deus.somee.com/lib/acheta.htm acheta] [http://am-i-bird.somee.com/img/styles/killing-of.htm killing of bulgarian] [http://yourorus.somee.com/data/youngerbabes.htm youngerbabes] [http://am-i-bird.somee.com/img/styles/hoover-handy.htm hoover handy2] [http://trocterli.t35.com/img/styles/microfono-archetto/ microfono archetto] [http://thegoogly.somee.com/view/new/saint-helens.htm saint helens] [http://yourorus.somee.com/data/leghe-dei.htm leghe dei metalli] [http://am-i-bird.somee.com/img/styles/incontri-a.htm incontri a verona] [http://fawarfo.freeweb7.com/topic/mixer-behringer.htm mixer behringer ub2442fx] [http://lensman.somee.com/html/amstrad-mp/ amstrad mp3 256] [http://luallard.t35.com/html/www-matura/ www matura web] [http://nairoz.somee.com/img/styles/midis-instrumentales/ midis instrumentales] [http://dj-deus.somee.com/lib/www-steelers.htm www steelers com] [http://lamcgie.125mb.com/html/a-christmas.htm a christmas story - una storia di natale] [http://fawarfo.freeweb7.com/topic/thomson-telecomando.htm thomson telecomando] [http://am-i-bird.somee.com/img/styles/infermiere-generale.htm infermiere generale e pediatrico] [http://fawarfo.freeweb7.com/topic/www-aaron.htm www aaron carter com] [http://betheresa.t35.com/text/directory/router-adsl/ router adsl wifi 108] [http://madavid.t35.com/html/sexy-live/ sexy live show free] [http://trocterli.t35.com/img/styles/videos-gratis/ videos gratis de poerno] [http://madavid.t35.com/html/zucchero-mp/ zucchero mp3] [http://lamcgie.t35.com/web/hamlet-wireless.htm hamlet wireless usb] [http://rimarsh.t35.com/images/small/ww-lucirosse.htm ww lucirosse it] [http://lamcgie.t35.com/web/our-mutual.htm our mutual dri] [http://dj-deus.somee.com/lib/cappe-a.htm cappe a parete] [http://itgurney.t35.com/view/new/un-marito/ un marito servizievole] [http://trocterli.t35.com/img/styles/copertina-hit/ copertina hit mania dance campions] [http://nairoz.somee.com/img/styles/cavalcanti-guido/ cavalcanti, guido] [http://peter-land.somee.com/images/small/bebi.htm bebi] [http://flheddina.t35.com/web/gne/ gne] [http://luallard.t35.com/html/lcd-sony/ lcd sony 28] [http://nationavce.somee.com/library/html/insana-iolanda/ insana, iolanda] [http://quotes-girl.somee.com/content/view/nokia-/ nokia 6021 gprs] [http://rihelm.125mb.com/img/styles/cazzineri/ cazzineri] [http://betheresa.t35.com/text/directory/cardiofrequenzimetro-da/ cardiofrequenzimetro da polso oregon s] [http://betheresa.t35.com/text/directory/michel-jarre/ michel jarre] [http://jedillar.125mb.com/resources/articles/frigorifero-congelatore/ frigorifero congelatore incasso] [http://rihelm.125mb.com/img/styles/giochi-di/ giochi di vampiri] [http://quotes-girl.somee.com/content/view/nero-segreteria/ nero segreteria cordless] [http://de-der.somee.com/library/html/melissa-auf.htm melissa auf der maur] [http://jututor.125mb.com/lib/hard-cartoons/ hard cartoons] [http://lakitsmi.freeweb7.com/web/maschi-che/ maschi che inculano maschi] [http://kiboukni.125mb.com/web/cicciolina-pompini/ cicciolina pompini] [http://lakitsmi.freeweb7.com/web/kevyn-little/ kevyn little turn me on] [http://davelovesyou.somee.com/library/html/big-monay/ big monay] [http://nationavce.somee.com/library/html/box-usb/ box usb 3 5] [http://madavid.t35.com/html/la-vidi/ la vidi al reves] [http://itgurney.t35.com/view/new/figli-pitagora/ figli pitagora] [http://jedillar.125mb.com/resources/articles/alps-arezzo/ alps arezzo] [http://lamcgie.t35.com/web/pentium.htm pentium4 650] [http://quotes-girl.somee.com/content/view/mia-moglie/ mia moglie preferisce suo marito] [http://davelovesyou.somee.com/library/html/puma-speed/ puma speed cat blu] [http://rihelm.125mb.com/img/styles/joke-a/ joke a day] [http://flheddina.t35.com/web/puttane-more/ puttane more] [http://lensman.somee.com/html/simon-paul/ simon paul. youre the one] [http://brrezab.freeweb7.com/img/styles/trama-soap.htm trama soap opera] [http://lensman.somee.com/html/cheatplanet-com/ cheatplanet com] [http://kiboukni.125mb.com/web/la-porta/ la porta segreta] [http://ouquaite.freeweb7.com/img/styles/eternamente-femmina/ eternamente femmina] [http://luallard.t35.com/html/meteo-marche/ meteo marche] [http://lakitsmi.freeweb7.com/web/la-pazienza/ la pazienza ha un limite... noi no] [http://coarmago.freeweb7.com/library/html/guida-michelin.htm guida michelin 2005] [http://lensman.somee.com/html/return-of/ return of the firebird igor stravinsky] [http://thegoogly.somee.com/view/new/figters.htm figters] [http://dabeutle.t35.com/content/view/salacca.htm salacca] [http://betheresa.t35.com/text/directory/www-ucas/ www ucas ac uk] [http://yourorus.somee.com/data/don-t.htm don t call me baby] [http://jututor.125mb.com/lib/decoder-and/ decoder and component] [http://rimarsh.t35.com/images/small/humax-decoder.htm humax decoder digitale terrestre] [http://lamcgie.t35.com/web/atlanta-intrattenimento.htm atlanta intrattenimento] [http://rimarsh.t35.com/images/small/upskirt-celebrita.htm upskirt celebrita] [http://nationavce.somee.com/library/html/foto-aria/ foto aria giovanni] [http://dabeutle.t35.com/content/view/cronaca-a.htm cronaca a ivrea] [http://rimarsh.t35.com/images/small/ernia-iatale.htm ernia iatale] [http://am-i-bird.somee.com/img/styles/ragazze-in.htm ragazze in webcam] [http://fawarfo.freeweb7.com/topic/video-integrale.htm video integrale berg] [http://betheresa.t35.com/text/directory/ottawa-etnologia/ ottawa (etnologia)] [http://fawarfo.freeweb7.com/topic/recupero-dato.htm recupero dato disco] [http://viemalin.freeweb7.com/resources/articles/casa-affitto.htm casa affitto mare calabria] [http://betheresa.t35.com/text/directory/toshiba-mx/ toshiba m40x 269] [http://kiboukni.125mb.com/web/pentax-ist/ pentax ist d kit] [http://davelovesyou.somee.com/library/html/nokia-e/ nokia e 1100] [http://quotes-girl.somee.com/content/view/crociere/ crociere] [http://fergus-mac.somee.com/description/lib/ferrari/ ferrari 575] [http://fergus-mac.somee.com/description/lib/hard-disk/ hard disk scsi 80 pin 36] [http://davelovesyou.somee.com/library/html/immagini-grecia/ immagini grecia] [http://trocterli.t35.com/img/styles/schianto-di/ schianto di una macchina] [http://dabeutle.t35.com/content/view/agriturismo-calenzano.htm agriturismo calenzano] [http://peter-land.somee.com/images/small/blood-on.htm blood on the dance floor michael jackson] [http://rihelm.125mb.com/img/styles/la-capannina/ la capannina] [http://betheresa.t35.com/text/directory/unicredit-banca/ unicredit banca casa] [http://ouquaite.freeweb7.com/img/styles/lg-lcd/ lg lcd televisori] [http://rimarsh.t35.com/images/small/giochi-di.htm giochi di basket] [http://de-der.somee.com/library/html/tubi-e.htm tubi e tubazioni in metalli ferrosi] [http://trocterli.t35.com/img/styles/www-sito/ www sito regione campania it istruzione] [http://trocterli.t35.com/img/styles/girocollo-oro/ girocollo oro] [http://lamcgie.125mb.com/html/router-wgr.htm router wgr614] [http://jututor.125mb.com/lib/travi-lezioni/ travi lezioni di giustizia] [http://rihelm.125mb.com/img/styles/tears-of/ tears of the dragon] [http://flheddina.t35.com/web/allodola/ allodola] [http://jututor.125mb.com/lib/royal-tunbridge/ royal tunbridge wells] [http://luallard.t35.com/html/hard-top/ hard top audi tt] [http://yourorus.somee.com/data/notte-a.htm notte a sorpresa] [http://fergus-mac.somee.com/description/lib/fondo-on/ fondo on line] [http://lamcgie.t35.com/web/annunciato-empire.htm annunciato empire earth 2] [http://luallard.t35.com/html/hamlet-scheda/ hamlet scheda fire wire pci] [http://nationavce.somee.com/library/html/radeon-x/ radeon x700 pci] [http://madavid.t35.com/html/film-porno/ film porno titan] [http://itgurney.t35.com/view/new/profumi-fendi/ profumi fendi uomo] [http://madavid.t35.com/html/tivoli-audio/ tivoli audio model one] [http://viemalin.freeweb7.com/resources/articles/epson-cx.htm epson cx 3650 cartuccia nero] [http://thegoogly.somee.com/view/new/cicerone-de.htm cicerone de natura deorum ii] [http://jututor.125mb.com/lib/she-will/ she will bi love] [http://quotes-girl.somee.com/content/view/mezz-ora/ mezz ora video] [http://lensman.somee.com/html/prestito-saronno/ prestito saronno] [http://rimarsh.t35.com/images/small/santa-irene.htm santa irene] [http://yourorus.somee.com/data/canzoniere-per.htm canzoniere per chitarra] [http://yourorus.somee.com/data/hotel-bahrain.htm hotel bahrain] [http://peter-land.somee.com/images/small/lettore-mp.htm lettore mp3 20 gb registratore] [http://coarmago.freeweb7.com/library/html/download-software.htm download software visual basic] [http://jedillar.125mb.com/resources/articles/avanti-ragazzi/ avanti ragazzi di budapest] [http://nationavce.somee.com/library/html/pink-floyd/ pink floyd another brick in the wall] [http://jututor.125mb.com/lib/pantyhose-wife/ pantyhose wife] [http://ouquaite.freeweb7.com/img/styles/midi-file/ midi file sequenze da scaricare gratis] [http://flheddina.t35.com/web/kungurian/ kungurian] [http://lakitsmi.freeweb7.com/web/giochi-tarzan/ giochi tarzan] [http://kiboukni.125mb.com/web/poesie-a/ poesie a sms] [http://lensman.somee.com/html/compilation-/ compilation 2004 dance] [http://dabeutle.t35.com/content/view/vaio-pocket.htm vaio pocket] [http://nairoz.somee.com/img/styles/ewan-mc/ ewan mc gregor nudo] [http://luallard.t35.com/html/macchina-fotografica/ macchina fotografica digitale con] [http://lamcgie.t35.com/web/mujeres-bonitas.htm mujeres bonitas] [http://lamcgie.t35.com/web/rosa-l.htm rosa l.] [http://lakitsmi.freeweb7.com/web/cuore-di/ cuore di ciccia] [http://lamcgie.125mb.com/html/varix-business.htm varix business] [http://peter-land.somee.com/images/small/three-sides.htm three sides live] [http://lensman.somee.com/html/affitto-vacanza/ affitto vacanza venezia] [http://de-der.somee.com/library/html/greek.htm greek] [http://davelovesyou.somee.com/library/html/nokia-/ nokia 6610 auricolare] [http://nationavce.somee.com/library/html/mutuo-regionali/ mutuo regionali] [http://rimarsh.t35.com/images/small/notebook-hp.htm notebook hp pavilion 17 tft] [http://nationavce.somee.com/library/html/libri-rennes/ libri rennes] [http://nairoz.somee.com/img/styles/maia-hi/ maia hi maia hu] [http://nationavce.somee.com/library/html/macchine-termiche/ macchine termiche] [http://peter-land.somee.com/images/small/cuple.htm cuple] [http://lamcgie.125mb.com/html/dmc-lzeg.htm dmc lz2eg] [http://lakitsmi.freeweb7.com/web/audio-trash/ audio trash italiano] [http://nationavce.somee.com/library/html/paris-hilton/ paris hilton desnuda] [http://fawarfo.freeweb7.com/topic/zafira-diesel.htm zafira diesel] [http://thegoogly.somee.com/view/new/video-pubblicita.htm video pubblicita] [http://trocterli.t35.com/img/styles/trucchi-nfs/ trucchi nfs underground] [http://quotes-girl.somee.com/content/view/bananphone/ bananphone] [http://nairoz.somee.com/img/styles/nec-ht/ nec ht-410] [http://jututor.125mb.com/lib/wrangler/ wrangler 4 0] [http://jututor.125mb.com/lib/upd-stream/ upd stream player] [http://betheresa.t35.com/text/directory/controllo-accesso/ controllo accesso biometrico] [http://luallard.t35.com/html/for-her/ for her] [http://lamcgie.125mb.com/html/machine-sport.htm machine sport] [http://peter-land.somee.com/images/small/egitto-nilo.htm egitto nilo crociera] [http://betheresa.t35.com/text/directory/pericolosamente/ pericolosamente] [http://lamcgie.t35.com/web/desmond-dekker.htm desmond dekker the aces the israelite] [http://thegoogly.somee.com/view/new/psirico.htm psirico] [http://quotes-girl.somee.com/content/view/penne-a/ penne a china] [http://lakitsmi.freeweb7.com/web/scooter-usati/ scooter usati milano] [http://quotes-girl.somee.com/content/view/hentai-comic/ hentai comic] [http://dabeutle.t35.com/content/view/love.htm love 1] [http://lamcgie.125mb.com/html/la-signora.htm la signora del blues] [http://dj-deus.somee.com/lib/macchina-per.htm macchina per fare il cioccolato] [http://quotes-girl.somee.com/content/view/imaculada/ imaculada] [http://betheresa.t35.com/text/directory/appartamento-gallipoli/ appartamento gallipoli] [http://de-der.somee.com/library/html/perovich.htm perovich] [http://thegoogly.somee.com/view/new/caverne.htm caverne] [http://quotes-girl.somee.com/content/view/it-pays/ it pays the rent] [http://madavid.t35.com/html/giardino-d/ giardino d inverno] [http://davelovesyou.somee.com/library/html/tende-bagno/ tende bagno] [http://thegoogly.somee.com/view/new/hard-disk.htm hard disk hitachi 7200rpm] [http://flheddina.t35.com/web/shut-up/ shut up black eyed p] [http://brrezab.freeweb7.com/img/styles/beatifull-soul.htm beatifull soul] [http://jututor.125mb.com/lib/immagini-di/ immagini di un convento] [http://thegoogly.somee.com/view/new/itinerario-moto.htm itinerario moto nord italia] [http://am-i-bird.somee.com/img/styles/accessori-box.htm accessori box doccia] [http://dabeutle.t35.com/content/view/sony.htm sony 53] [http://quotes-girl.somee.com/content/view/sauber/ sauber] [http://quotes-girl.somee.com/content/view/gloria-umbero/ gloria umbero tozzi] [http://peter-land.somee.com/images/small/confessioni-di.htm confessioni di una ragazzina] [http://peter-land.somee.com/images/small/caroline-angeli.htm caroline angeli] [http://lamcgie.125mb.com/html/videochat-sesso.htm videochat sesso] [http://dabeutle.t35.com/content/view/foto-su.htm foto su costantino e alessandra] [http://viemalin.freeweb7.com/resources/articles/domini-hosting.htm domini hosting] [http://peter-land.somee.com/images/small/batti-cinque.htm batti cinque silenzio] [http://dj-deus.somee.com/lib/dscw-sony.htm dscw7 sony] [http://trocterli.t35.com/img/styles/profumi-angel/ profumi angel] [http://kiboukni.125mb.com/web/philips-smart/ philips smart touch xl] [http://luallard.t35.com/html/golden-age/ golden age of piano] ===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 09:43, 24 August 2007

i-mate - jam i talismani di shannara terry brooks going down on it sbarco in sicilia 1943 libri hp photosmart m305 network monitoring acheta killing of bulgarian youngerbabes hoover handy2 microfono archetto saint helens leghe dei metalli incontri a verona mixer behringer ub2442fx amstrad mp3 256 www matura web midis instrumentales www steelers com a christmas story - una storia di natale thomson telecomando infermiere generale e pediatrico www aaron carter com router adsl wifi 108 sexy live show free videos gratis de poerno zucchero mp3 hamlet wireless usb ww lucirosse it our mutual dri cappe a parete un marito servizievole copertina hit mania dance campions cavalcanti, guido bebi gne lcd sony 28 insana, iolanda nokia 6021 gprs cazzineri cardiofrequenzimetro da polso oregon s michel jarre frigorifero congelatore incasso giochi di vampiri nero segreteria cordless melissa auf der maur hard cartoons maschi che inculano maschi cicciolina pompini kevyn little turn me on big monay box usb 3 5 la vidi al reves figli pitagora alps arezzo pentium4 650 mia moglie preferisce suo marito puma speed cat blu joke a day puttane more simon paul. youre the one trama soap opera cheatplanet com la porta segreta eternamente femmina meteo marche la pazienza ha un limite... noi no guida michelin 2005 return of the firebird igor stravinsky figters salacca www ucas ac uk don t call me baby decoder and component humax decoder digitale terrestre atlanta intrattenimento upskirt celebrita foto aria giovanni cronaca a ivrea ernia iatale ragazze in webcam video integrale berg ottawa (etnologia) recupero dato disco casa affitto mare calabria toshiba m40x 269 pentax ist d kit nokia e 1100 crociere ferrari 575 hard disk scsi 80 pin 36 immagini grecia schianto di una macchina agriturismo calenzano blood on the dance floor michael jackson la capannina unicredit banca casa lg lcd televisori giochi di basket tubi e tubazioni in metalli ferrosi www sito regione campania it istruzione girocollo oro router wgr614 travi lezioni di giustizia tears of the dragon allodola royal tunbridge wells hard top audi tt notte a sorpresa fondo on line annunciato empire earth 2 hamlet scheda fire wire pci radeon x700 pci film porno titan profumi fendi uomo tivoli audio model one epson cx 3650 cartuccia nero cicerone de natura deorum ii she will bi love mezz ora video prestito saronno santa irene canzoniere per chitarra hotel bahrain lettore mp3 20 gb registratore download software visual basic avanti ragazzi di budapest pink floyd another brick in the wall pantyhose wife midi file sequenze da scaricare gratis kungurian giochi tarzan poesie a sms compilation 2004 dance vaio pocket ewan mc gregor nudo macchina fotografica digitale con mujeres bonitas rosa l. cuore di ciccia varix business three sides live affitto vacanza venezia greek nokia 6610 auricolare mutuo regionali notebook hp pavilion 17 tft libri rennes maia hi maia hu macchine termiche cuple dmc lz2eg audio trash italiano paris hilton desnuda zafira diesel video pubblicita trucchi nfs underground bananphone nec ht-410 wrangler 4 0 upd stream player controllo accesso biometrico for her machine sport egitto nilo crociera pericolosamente desmond dekker the aces the israelite psirico penne a china scooter usati milano hentai comic love 1 la signora del blues macchina per fare il cioccolato imaculada appartamento gallipoli perovich caverne it pays the rent giardino d inverno tende bagno hard disk hitachi 7200rpm shut up black eyed p beatifull soul immagini di un convento itinerario moto nord italia accessori box doccia sony 53 sauber gloria umbero tozzi confessioni di una ragazzina caroline angeli videochat sesso foto su costantino e alessandra domini hosting batti cinque silenzio dscw7 sony profumi angel philips smart touch xl golden age of piano ===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