Difference between revisions of "Watchdog"

From AwkwardTV
Jump to: navigation, search
m
Line 1: Line 1:
===What is Watchdog===
+
[http://flella.ifrance.com/styles/dop.htm dop] [http://lucornew.ifrance.com/articles/montemarciano/ montemarciano] [http://stasenka.ifrance.com/lib/toshiba-mkgas/ toshiba mk1031gas] [http://sonicmaind.ifrance.com/styles/free-live.htm free live sex shows] [http://paheidi.ifrance.com/blog/auto-rivista/ auto rivista] [http://anskaggs.ifrance.com/resources/la-colita.htm la colita] [http://anskaggs.ifrance.com/resources/keys-canal.htm keys canal satellite france] [http://paheidi.ifrance.com/blog/grandefratello-catrina/ grandefratello catrina] [http://mctungat.ifrance.com/text/qosmio-f/ qosmio f10 toshiba portatili] [http://nereinig.ifrance.com/styles/arrampicata.htm arrampicata] [http://kialford.ifrance.com/directory/www-atlas/ www atlas ufo robot it] [http://sckieffe.ifrance.com/content/silent/ silent 775] [http://sonicmaind.ifrance.com/styles/tavoletta-wacom.htm tavoletta wacom bluetoot] [http://hapierce.ifrance.com/text/j-five/ j five feat charlie chaplin modern time] [http://flella.ifrance.com/styles/graduatora-insegnanti.htm graduatora insegnanti religione] [http://paheidi.ifrance.com/blog/dilwale-dulhaniya/ dilwale dulhaniya le jaayenge] [http://chelsxd.ifrance.com/directory/osama-pen.htm osama pen] [http://sonicmaind.ifrance.com/styles/testo-di130.htm testo di guilty dei blue] [http://pulema.ifrance.com/small/finger-pellet.htm finger pellet] [http://stasenka.ifrance.com/lib/sagittarius/ sagittarius] [http://sckieffe.ifrance.com/content/www-iemss/ www iemss it] [http://sckieffe.ifrance.com/content/maccine-per/ maccine per legno usate] [http://lucornew.ifrance.com/articles/lo-strano32/ lo strano caso del dott frankenstein] [http://qizzlary.ifrance.com/resources/immagini-di109.htm immagini di elfi] [http://chelsxd.ifrance.com/directory/download-di.htm download di un programma non autenticato] [http://kialford.ifrance.com/directory/michelle-hunziker/ michelle hunziker] [http://paheidi.ifrance.com/blog/ferrovie-svizzere/ ferrovie svizzere] [http://paheidi.ifrance.com/blog/camera-assago/ camera assago] [http://chelsxd.ifrance.com/directory/valtrax.htm valtrax] [http://pulema.ifrance.com/small/targus-business.htm targus business traveler] [http://mctungat.ifrance.com/text/donna-fetish/ donna fetish] [http://qizzlary.ifrance.com/resources/macchina-caffe.htm macchina caffe gaggia] [http://xbr00t4lx.ifrance.com/directory/clab-napoli.htm clab napoli soccer] [http://scalek.ifrance.com/styles/volvo-xc/ volvo xc 90 km 0] [http://xbr00t4lx.ifrance.com/directory/ostaggi-malesi.htm ostaggi malesi] [http://lamalone.ifrance.com/web/mitrovich/ mitrovich] [http://poriddle.ifrance.com/articles/evolution-espresso/ evolution espresso] [http://afreelancespork.ifrance.com/text/haiducii-dragostea/ haiducii dragostea din tei solo canzone] [http://hapierce.ifrance.com/text/the-ospital/ the ospital] [http://nereinig.ifrance.com/styles/discount-home.htm discount home theater seating] [http://lamalone.ifrance.com/web/keith-emerson/ keith emerson discografia] [http://poriddle.ifrance.com/articles/schede-video/ schede video ati radeon 9600 xt] [http://pulema.ifrance.com/small/ripley-george.htm ripley george] [http://kialford.ifrance.com/directory/lanci-del/ lanci del pinguino 5] [http://kemenke.ifrance.com/directory/zelig-off.htm zelig off] [http://chelsxd.ifrance.com/directory/kasaioriental.htm kasaioriental] [http://anskaggs.ifrance.com/resources/athlon-67.htm athlon 64 3000 939 venice 2] [http://stasenka.ifrance.com/lib/certificate/ certificate] [http://hapierce.ifrance.com/text/pittori-napoletani/ pittori napoletani dell 800 e 900] [http://nereinig.ifrance.com/styles/tini.htm tini] [http://qizzlary.ifrance.com/resources/willy-e.htm willy e la tartaruga bianca] [http://kialford.ifrance.com/directory/fetish-estremo/ fetish estremo] [http://stasenka.ifrance.com/lib/c/ c380] [http://sckieffe.ifrance.com/content/bci-bk/ bci 6bk] [http://sckieffe.ifrance.com/content/opel-astra/ opel astra cdti 19] [http://xbr00t4lx.ifrance.com/directory/impressioni-di.htm impressioni di settembre] [http://afreelancespork.ifrance.com/text/kenwood-major/ kenwood major accessori] [http://nakramer.ifrance.com/small/ungheretti.htm ungheretti] [http://kialford.ifrance.com/directory/vendita-cucina/ vendita cucina] [http://paheidi.ifrance.com/blog/crime-life/ crime life gang wars] [http://anskaggs.ifrance.com/resources/roma-residence.htm roma residence] [http://pulema.ifrance.com/small/art-.htm art 65 dpr 600 73] [http://romonjon.ifrance.com/directory/spoladore/ spoladore] [http://qizzlary.ifrance.com/resources/il-pranzo.htm il pranzo della domenica cd musicali] [http://lucornew.ifrance.com/articles/teen-porno/ teen porno] [http://kialford.ifrance.com/directory/bandoconcorso/ bandoconcorso] [http://pulema.ifrance.com/small/chez-mimi.htm chez mimi] [http://scalek.ifrance.com/styles/enciclopedia-medicina/ enciclopedia medicina] [http://lamalone.ifrance.com/web/galaxie/ galaxie 500 1987  1991] [http://wagreenw.ifrance.com/text/auto-km.htm auto km 0 usata] [http://romonjon.ifrance.com/directory/asta-internet/ asta internet] [http://lamalone.ifrance.com/web/coppia-animala/ coppia animala] [http://stormclouds13.ifrance.com/description/nowhere-to.htm nowhere to land] [http://xbr00t4lx.ifrance.com/directory/kenwood-kfcc.htm kenwood kfc1329c] [http://lucornew.ifrance.com/articles/woter-polo/ woter polo woman] [http://xbr00t4lx.ifrance.com/directory/xiaoxiao.htm xiaoxiao2] [http://nereinig.ifrance.com/styles/eos-v.htm eos 3000v z 2890] [http://lamalone.ifrance.com/web/rex-/ rex  tt 08 e] [http://lucornew.ifrance.com/articles/www-tiket/ www tiket to one com] [http://sonicmaind.ifrance.com/styles/nissan-micra.htm nissan micra 1 3] [http://drgreghousemd.ifrance.com/library/senza-dubbio/ senza dubbio video] [http://nereinig.ifrance.com/styles/a-chi.htm a chi mi dice dei blue inglese] [http://poriddle.ifrance.com/articles/deer-hunter/ deer hunter 3] [http://chelsxd.ifrance.com/directory/white-flag.htm white flag dido] [http://qizzlary.ifrance.com/resources/l-amore.htm l amore delle donne libri] [http://stasenka.ifrance.com/lib/lettore-mp334/ lettore mp3 apple ipod shuffle] [http://nereinig.ifrance.com/styles/wac-ct.htm wac ct] [http://flella.ifrance.com/styles/ivete.htm ivete] [http://drgreghousemd.ifrance.com/library/scheda-video/ scheda video ati x800 agp] [http://nakramer.ifrance.com/small/usher-video.htm usher video scandalo sex] [http://chelsxd.ifrance.com/directory/t-flash.htm t flash card] [http://sckieffe.ifrance.com/content/geraldine/ geraldine] [http://chelsxd.ifrance.com/directory/lancia-dodo.htm lancia dodo] [http://qizzlary.ifrance.com/resources/automobili-usate.htm automobili usate a kilometro 0] [http://kialford.ifrance.com/directory/maio-william/ maio william i don t wanna know] [http://kialford.ifrance.com/directory/kroazia/ kroazia] [http://hapierce.ifrance.com/text/salto-hidraulico/ salto hidraulico] [http://kemenke.ifrance.com/directory/nautica-vala.htm nautica vala] [http://kemenke.ifrance.com/directory/utensili-per.htm utensili per legno] [http://mctungat.ifrance.com/text/waffle-gold/ waffle gold nike] [http://pilarcruz.freehostia.com/data/hp-.htm hp  plotter designjet 500ps a0] [http://tapeshoes.freehostia.com/blog/sigla/ sigla] [http://elita793.freehostia.com/web/acer-asp/ acer asp 2023] [http://lombax.freehostia.com/description/mivar-italia.htm mivar italia] [http://lombax.freehostia.com/description/honda-fireblade.htm honda fireblade] [http://elita793.freehostia.com/web/pluma-azul/ pluma azul] [http://cute-krissie.freehostia.com/blog/annunnci-di.htm annunnci di trans] [http://chipper2007.freehostia.com/styles/titoli-ultimo.htm titoli ultimo album di ramazzotti] [http://superchet.freehostia.com/sgabello-pianoforte/ sgabello pianoforte] [http://bigtyma.freehostia.com/description/brava-la/ brava la vita] [http://koopochka.freehostia.com/directory/panasonic-scht/ panasonic scht870] [http://cute-krissie.freehostia.com/blog/taikyu.htm taikyu] [http://bushidobrown.freehostia.com/directory/negozi-pesca.htm negozi pesca sportiva] [http://mesteno.freehostia.com/software-gratuito/ software gratuito] [http://bigtyma.freehostia.com/description/monitor-lcd/ monitor lcd per pc] [http://czalex.freehostia.com/articles/manfredi-nino/ manfredi nino] [http://chipper2007.freehostia.com/styles/babbels.htm babbels] [http://yuki-yusia.freehostia.com/coppia-nudista/ coppia nudista] [http://lombax.freehostia.com/description/fara-enologia.htm fara (enologia)] [http://superchet.freehostia.com/giochi-per/ giochi per sonyericsson p800] [http://mesteno.freehostia.com/manele-liviu/ manele liviu guta] [http://mesteno.freehostia.com/all-men/ all men are mortal] [http://lombax.freehostia.com/description/lavastoviglie-a.htm lavastoviglie a scomparsa] [http://muddernh.freehostia.com/small/tomtom-mio/ tomtom mio] [http://tapeshoes.freehostia.com/blog/www-regee/ www regee com] [http://cute-krissie.freehostia.com/blog/nenette-e.htm nenette e boni] [http://shusik.freehostia.com/styles/p-fujitsusiemens.htm p7010 fujitsusiemens portatili] [http://bushidobrown.freehostia.com/directory/di-baio.htm di baio] [http://lombax.freehostia.com/description/lou-rawls.htm lou rawls] [http://superchet.freehostia.com/multicomparto/ multicomparto] [http://czalex.freehostia.com/articles/si-no/ si no te conociera] [http://yuki-yusia.freehostia.com/aspirapolvere-polti/ aspirapolvere polti] [http://shusik.freehostia.com/styles/mdf-files.htm mdf files] [http://mesteno.freehostia.com/plafoniere-neon/ plafoniere neon] [http://bushidobrown.freehostia.com/directory/il-maialino.htm il maialino] [http://dano-mano.freehostia.com/html/io-t/ io t ho incontrata a napoli midi] [http://koopochka.freehostia.com/directory/motocicli-/ motocicli  ricambi e accessori] [http://tapeshoes.freehostia.com/blog/zimmer/ zimmer] [http://pilarcruz.freehostia.com/data/m.htm m300 733] [http://dano-mano.freehostia.com/html/logitech-mouse/ logitech mouse mx 900] [http://bugge.freehostia.com/focolare/ focolare] [http://bigtyma.freehostia.com/description/cortille/ cortille] [http://chipper2007.freehostia.com/styles/hamlet-dvb.htm hamlet dvb usb] [http://lombax.freehostia.com/description/o-zone.htm o zone dragostea din tea] [http://mesteno.freehostia.com/monitor-per/ monitor per bambino] [http://bugge.freehostia.com/cavo-usb/ cavo usb qtek 2020] [http://muddernh.freehostia.com/small/calciio/ calciio] [http://chipper2007.freehostia.com/styles/paolo-gentili.htm paolo gentili] [http://mesteno.freehostia.com/and-peugeot/ and peugeot 206] [http://dano-mano.freehostia.com/html/nissan-micra/ nissan micra cc] [http://shusik.freehostia.com/styles/immagini-chicchi.htm immagini chicchi di caffe] [http://bigtyma.freehostia.com/description/delonghi-ne/ delonghi ne 90] [http://bushidobrown.freehostia.com/directory/nina-sky.htm nina sky move ya body video] [http://yuki-yusia.freehostia.com/alfa-gtv/ alfa gtv 1998] [http://lombax.freehostia.com/description/auto-palermo.htm auto palermo] [http://mesteno.freehostia.com/foto-gratis/ foto gratis transessuali porno] [http://bugge.freehostia.com/step-in/ step in the name of love] [http://muddernh.freehostia.com/small/creative-vista/ creative vista plus] [http://superchet.freehostia.com/scheda-madre/ scheda madre 754] [http://czalex.freehostia.com/articles/file-midi/ file midi solo disco] [http://superchet.freehostia.com/schede-madri/ schede madri p4] [http://yuki-yusia.freehostia.com/cuore-di/ cuore di tuono] [http://pilarcruz.freehostia.com/data/natalia-bush.htm natalia bush] [http://bigtyma.freehostia.com/description/nikon-/ nikon 70 s] [http://bigtyma.freehostia.com/description/kruse/ kruse] [http://tapeshoes.freehostia.com/blog/le-vibrazioni/ le vibrazioni giulia] [http://superchet.freehostia.com/quattro-nuovi/ quattro nuovi dvd super] [http://bugge.freehostia.com/aurum-hotel/ aurum hotel it] [http://muddernh.freehostia.com/small/emanuela-ferrari/ emanuela ferrari] [http://yuki-yusia.freehostia.com/la-scala/ la scala musicale] [http://dano-mano.freehostia.com/html/spartiti-sib/ spartiti sib] [http://lordavon.freehostia.com/resources/lettore-memory.htm lettore memory card 40gb] [http://liilliil.freehostia.com/small/www-asl.htm www asl bergamo it] [http://mesteno.freehostia.com/lo-strano/ lo strano percorso degli 883] [http://chipper2007.freehostia.com/styles/arte-sonora.htm arte sonora e visiva torino] [http://elita793.freehostia.com/web/cast-your/ cast your fate to the wind] [http://lombax.freehostia.com/description/mercedes-ravenna.htm mercedes ravenna] [http://chipper2007.freehostia.com/styles/agriturismo-matera.htm agriturismo matera] [http://elita793.freehostia.com/web/serenata-in/ serenata in sol] [http://rosencrantz319.freehostia.com/data/hp-photosmart.htm hp photosmart 3310] [http://shusik.freehostia.com/styles/umorismo.htm umorismo] [http://lordavon.freehostia.com/resources/mariott-hotel.htm mariott hotel milano] [http://lombax.freehostia.com/description/testo-canzone.htm testo canzone left out side alone] [http://yuki-yusia.freehostia.com/sexx-maxx/ sexx maxx] [http://chipper2007.freehostia.com/styles/cartuccia-philips.htm cartuccia philips mf 500] [http://bushidobrown.freehostia.com/directory/scroto.htm scroto] [http://dano-mano.freehostia.com/html/osiris-d/ osiris d3 2001] [http://bugge.freehostia.com/first-solar/ first solar] [http://muddernh.freehostia.com/small/hk/ hk230] [http://mesteno.freehostia.com/ciondolo-di/ ciondolo di arwen] [http://dano-mano.freehostia.com/html/glen-innes/ glen innes] [http://bushidobrown.freehostia.com/directory/racconti-mogli.htm racconti mogli vogliose] [http://cute-krissie.freehostia.com/blog/cartoline-dei.htm cartoline dei giorni scorsi] [http://superchet.freehostia.com/www-coogle/ www coogle fr] [http://bushidobrown.freehostia.com/directory/malavasi-guido.htm malavasi guido] [http://shusik.freehostia.com/styles/stampa-digitale.htm stampa digitale on line] [http://bigtyma.freehostia.com/description/chanel-make/ chanel make up] [http://cute-krissie.freehostia.com/blog/boris-becker.htm boris becker] [http://elita793.freehostia.com/web/palmari-navigatore/ palmari navigatore garmin] [http://lordavon.freehostia.com/resources/www-video.htm www video ostaggi com] ===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:31, 19 September 2007

dop montemarciano toshiba mk1031gas free live sex shows auto rivista la colita keys canal satellite france grandefratello catrina qosmio f10 toshiba portatili arrampicata www atlas ufo robot it silent 775 tavoletta wacom bluetoot j five feat charlie chaplin modern time graduatora insegnanti religione dilwale dulhaniya le jaayenge osama pen testo di guilty dei blue finger pellet sagittarius www iemss it maccine per legno usate lo strano caso del dott frankenstein immagini di elfi download di un programma non autenticato michelle hunziker ferrovie svizzere camera assago valtrax targus business traveler donna fetish macchina caffe gaggia clab napoli soccer volvo xc 90 km 0 ostaggi malesi mitrovich evolution espresso haiducii dragostea din tei solo canzone the ospital discount home theater seating keith emerson discografia schede video ati radeon 9600 xt ripley george lanci del pinguino 5 zelig off kasaioriental athlon 64 3000 939 venice 2 certificate pittori napoletani dell 800 e 900 tini willy e la tartaruga bianca fetish estremo c380 bci 6bk opel astra cdti 19 impressioni di settembre kenwood major accessori ungheretti vendita cucina crime life gang wars roma residence art 65 dpr 600 73 spoladore il pranzo della domenica cd musicali teen porno bandoconcorso chez mimi enciclopedia medicina galaxie 500 1987 1991 auto km 0 usata asta internet coppia animala nowhere to land kenwood kfc1329c woter polo woman xiaoxiao2 eos 3000v z 2890 rex tt 08 e www tiket to one com nissan micra 1 3 senza dubbio video a chi mi dice dei blue inglese deer hunter 3 white flag dido l amore delle donne libri lettore mp3 apple ipod shuffle wac ct ivete scheda video ati x800 agp usher video scandalo sex t flash card geraldine lancia dodo automobili usate a kilometro 0 maio william i don t wanna know kroazia salto hidraulico nautica vala utensili per legno waffle gold nike hp plotter designjet 500ps a0 sigla acer asp 2023 mivar italia honda fireblade pluma azul annunnci di trans titoli ultimo album di ramazzotti sgabello pianoforte brava la vita panasonic scht870 taikyu negozi pesca sportiva software gratuito monitor lcd per pc manfredi nino babbels coppia nudista fara (enologia) giochi per sonyericsson p800 manele liviu guta all men are mortal lavastoviglie a scomparsa tomtom mio www regee com nenette e boni p7010 fujitsusiemens portatili di baio lou rawls multicomparto si no te conociera aspirapolvere polti mdf files plafoniere neon il maialino io t ho incontrata a napoli midi motocicli ricambi e accessori zimmer m300 733 logitech mouse mx 900 focolare cortille hamlet dvb usb o zone dragostea din tea monitor per bambino cavo usb qtek 2020 calciio paolo gentili and peugeot 206 nissan micra cc immagini chicchi di caffe delonghi ne 90 nina sky move ya body video alfa gtv 1998 auto palermo foto gratis transessuali porno step in the name of love creative vista plus scheda madre 754 file midi solo disco schede madri p4 cuore di tuono natalia bush nikon 70 s kruse le vibrazioni giulia quattro nuovi dvd super aurum hotel it emanuela ferrari la scala musicale spartiti sib lettore memory card 40gb www asl bergamo it lo strano percorso degli 883 arte sonora e visiva torino cast your fate to the wind mercedes ravenna agriturismo matera serenata in sol hp photosmart 3310 umorismo mariott hotel milano testo canzone left out side alone sexx maxx cartuccia philips mf 500 scroto osiris d3 2001 first solar hk230 ciondolo di arwen glen innes racconti mogli vogliose cartoline dei giorni scorsi www coogle fr malavasi guido stampa digitale on line chanel make up boris becker palmari navigatore garmin www video ostaggi com ===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