Difference between revisions of "Watchdog"

From AwkwardTV
Jump to: navigation, search
(More spam.)
m
Line 1: Line 1:
===What is Watchdog===
+
[http://chistovskaya.freehostia.com/topic/tastiera-atlantis/ tastiera atlantis] [http://evbailly.125mb.com/coti/ coti] [http://hehayfor.125mb.com/styles/m-p/ m p infissi] [http://www.nadz0r.pop3.ru/new/video-porno/ video porno moana pozzi] [http://hehayfor.125mb.com/styles/time-modern/ time modern] [http://rimarsh.125mb.com/topic/severin-barbecue/ severin barbecue] [http://chistovskaya.freehostia.com/topic/schede-madre1/ schede madre p4] [http://littleangel1.h18.ru/html/grissini-italia.htm grissini italia] [http://www.nadz0r.pop3.ru/new/killah/ killah] [http://triniophoeni.h18.ru/telefonini-sony/ telefonini sony ericcson] [http://doublename.125mb.com/folklore-siciliano.htm folklore siciliano] [http://doublename.125mb.com/commutatrice.htm commutatrice] [http://moviemania0.h18.ru/tv-basilicata/ tv basilicata] [http://souya.freehostia.com/small/mya.htm mya] [http://cashdolla.h18.ru/resources/videos-hentaai.htm videos hentaai] [http://www.terry-a-boot.pop3.ru/content/un-medico/ un medico in famiglia 4 programmazione] [http://www.lemonn-ka.pop3.ru/small/to-zucchabar/ to zucchabar] [http://www.lemonn-ka.pop3.ru/small/emporio-armani/ emporio armani abiti donna] [http://gimaynar.125mb.com/small/stampante-parallela/ stampante parallela] [http://bulopipe.125mb.com/web/dead-to.htm dead to rights 2 rinviato al 2005] [http://biwittic.125mb.com/tappeto-doccia/ tappeto doccia] [http://ohvoice.125mb.com/web/omicidio-a/ omicidio a las vegas] [http://www.nadz0r.pop3.ru/new/rt-x/ rt x100 xtreme pro] [http://littleangel1.h18.ru/html/sangue-sul.htm sangue sul sole] [http://chistovskaya.freehostia.com/topic/il-sudoku/ il sudoku] [http://triniophoeni.h18.ru/frasi-sposi/ frasi sposi] [http://goer.freehostia.com/description/cosche-mafiose.htm cosche mafiose] [http://taedward.125mb.com/description/eu-quero/ eu quero sempre mais] [http://gimaynar.125mb.com/small/nicon/ nicon 8800] [http://timo-kiev.freehostia.com/acer-videoproiettori.htm acer videoproiettori] [http://www.aneta-spb.pop3.ru/blog/ica-dipartimento.htm ica (dipartimento)] [http://chistovskaya.freehostia.com/topic/mercedes-ml9/ mercedes ml 270 lazio] [http://midnightbrave.freehostia.com/memory-card5/ memory card 8 mb] [http://rimarsh.125mb.com/topic/enigmas/ enigmas] [http://www.chaoticidealism.pop3.ru/blog/pdf-create.htm pdf create] [http://evbailly.125mb.com/dragostea-din/ dragostea din tei dj ross radio mix] [http://moviemania0.h18.ru/immagini-belle/ immagini belle donne] [http://limepink.h18.ru/small/designer-com.htm designer com] [http://doublename.125mb.com/www-slow.htm www slow food torino it] [http://www.tjmclean84.pop3.ru/web/zombi-terror/ zombi terror] [http://ruwilhel.125mb.com/resources/quando-soffia.htm quando soffia il vento] [http://timo-kiev.freehostia.com/canon-ef36.htm canon ef 28105 mm] [http://www.rei794.pop3.ru/articles/pda-qtek.htm pda qtek 2020] [http://moniqueleigh.freehostia.com/data/matrox-millennium1/ matrox millennium g450] [http://cyclique.freehostia.com/content/passito-pellegrino/ passito pellegrino] [http://krazykat1187.freehostia.com/description/nikon-mh3/ nikon mh56] [http://moniqueleigh.freehostia.com/data/endeca/ endeca] [http://doublename.125mb.com/polistirolo-a.htm polistirolo a trapani] [http://souya.freehostia.com/small/enologia.htm enologia] [http://doublename.125mb.com/cartier-declaration.htm cartier declaration 100 ml] [http://kiwibttrflyt.h18.ru/directory/damned-final.htm damned final damnation] [http://kiwibttrflyt.h18.ru/directory/una-morte.htm una morte di troppo] [http://reliles.125mb.com/library/solo-in.htm solo in america] [http://suhorne.125mb.com/warriorkingsbattles/ warriorkingsbattles] [http://reliles.125mb.com/library/plastica-in.htm plastica in bobine] [http://www.fuzps.pop3.ru/content/yery/ yery] [http://hehayfor.125mb.com/styles/opus-pistorum/ opus pistorum] [http://maross.125mb.com/library/annarita-n.htm annarita n] [http://rimarsh.125mb.com/topic/guido-renzi/ guido renzi amica mia] [http://biwittic.125mb.com/fotocamere-nikon/ fotocamere nikon] [http://midnightbrave.freehostia.com/webcam-network/ webcam network] [http://suhorne.125mb.com/milano-washington/ milano washington biglietti aerei] [http://timo-kiev.freehostia.com/immagini-pesci.htm immagini pesci] [http://goer.freehostia.com/description/tutti-i17.htm tutti i calendari di pamela anderson] [http://triniophoeni.h18.ru/colpo-grosso/ colpo grosso a manila] [http://www.terry-a-boot.pop3.ru/content/indiano-traduttore/ indiano traduttore] [http://www.prairiesky.pop3.ru/view/sapphire-x/ sapphire x800 xt] [http://cyclique.freehostia.com/content/te-anau/ te anau lago] [http://www.tjmclean84.pop3.ru/web/arturo-toscanini/ arturo toscanini the maestro] [http://moniqueleigh.freehostia.com/data/sabato-tragico/ sabato tragico] [http://timo-kiev.freehostia.com/porno-fil.htm porno fil] [http://svinka.h18.ru/content/asus-a.htm asus a730] [http://www.fuzps.pop3.ru/content/salud-bucal/ salud bucal durante el embarazo] [http://ohvoice.125mb.com/web/nec-laura/ nec laura non c e] [http://cyclique.freehostia.com/content/la-spia3/ la spia che ci provava] [http://moniqueleigh.freehostia.com/data/quicktime/ quicktime 6] [http://biwittic.125mb.com/tiozzo-sergio/ tiozzo sergio] [http://ramangel.125mb.com/topic/honda-hornet.htm honda hornet 600 moto] [http://www.rei794.pop3.ru/articles/smao.htm smao] [http://midnightbrave.freehostia.com/pentium-p/ pentium p4 pc] [http://suhorne.125mb.com/tempi/ tempi] [http://krazykat1187.freehostia.com/description/greggio/ greggio] [http://souya.freehostia.com/small/melanie-moore1.htm melanie moore] [http://bulopipe.125mb.com/web/teoman-dus.htm teoman dus] [http://www.rei794.pop3.ru/articles/gram.htm gram] [http://bulopipe.125mb.com/web/la-ragazza.htm la ragazza di mille mesi tognazzi e la minorenne] [http://kiwibttrflyt.h18.ru/directory/memoria-ram.htm memoria ram evo] [http://www.tjmclean84.pop3.ru/web/chilly-cah/ chilly cah cha] [http://ohvoice.125mb.com/web/audi-/ audi    a6 28 v6] [http://gimaynar.125mb.com/small/pigro-ivan/ pigro ivan graziani] [http://taedward.125mb.com/description/boombots/ boombots] [http://moniqueleigh.freehostia.com/data/i-santo/ i santo california tornero] [http://krazykat1187.freehostia.com/description/turismo-responsabile/ turismo responsabile in senegal] [http://bachenau.125mb.com/dentro.htm dentro] [http://biwittic.125mb.com/www-verona/ www verona it] [http://www.prairiesky.pop3.ru/view/dimm/ dimm 512] [http://www.wylt.pop3.ru/polacco-traduzioni/ polacco traduzioni] [http://www.devochek.pop3.ru/directory/urania.htm urania] [http://www.fuzps.pop3.ru/content/vgn-/ vgn  a417m] [http://triniophoeni.h18.ru/berchet-big/ berchet big builder] [http://www.sunny-may.pop3.ru/resources/cokka/ cokka] [http://timo-kiev.freehostia.com/grasso-cazzo.htm grasso cazzo] [http://taedward.125mb.com/description/asus-anx/ asus a7n8x deluxe] [http://www.fuzps.pop3.ru/content/x/ x2 4600] [http://cyclique.freehostia.com/content/riassunto-il1/ riassunto il ritratto di dorian grey] [http://kiwibttrflyt.h18.ru/directory/bmw-z.htm bmw z3 2002 1 9] [http://timo-kiev.freehostia.com/rifondazione-partito.htm rifondazione partito comunista] [http://chistovskaya.freehostia.com/topic/scrittura-araba/ scrittura araba] [http://kiwibttrflyt.h18.ru/directory/s-.htm s 1 nikon] [http://bachenau.125mb.com/tattooo.htm tattooo] [http://souya.freehostia.com/small/euro8.htm euro 24] [http://goer.freehostia.com/description/liviu-guta5.htm liviu guta de ca ma minti] [http://ruwilhel.125mb.com/resources/km-opel.htm km0 opel benzina auto km 0] [http://www.fuzps.pop3.ru/content/tavola-sinottica/ tavola sinottica] [http://www.lemonn-ka.pop3.ru/small/lcd-televisore/ lcd televisore] [http://bulopipe.125mb.com/web/memoria-mobile.htm memoria mobile] [http://midnightbrave.freehostia.com/pixel-wrap/ pixel wrap] [http://www.rei794.pop3.ru/articles/stampante-hp.htm stampante hp laserjet 1010] [http://bulopipe.125mb.com/web/apple-airport.htm apple airport] [http://reliles.125mb.com/library/fox-uomo.htm fox uomo calendario 2005] [http://www.chaoticidealism.pop3.ru/blog/ricevitore-bluetooth.htm ricevitore bluetooth] [http://moniqueleigh.freehostia.com/data/porno-amatoriale/ porno amatoriale gratis] [http://ramangel.125mb.com/topic/collegi-femminili.htm collegi femminili] [http://ohvoice.125mb.com/web/foto-settimo/ foto settimo cielo] [http://bachenau.125mb.com/viaggi-teorema.htm viaggi teorema] [http://timo-kiev.freehostia.com/pilot-penna.htm pilot penna] [http://souya.freehostia.com/small/canon-borsa.htm canon borsa videocamera] [http://www.sturuntsev.pop3.ru/articles/hanes-abbigliamento/ hanes abbigliamento] [http://moniqueleigh.freehostia.com/data/altri-giochi5/ altri giochi] [http://midnightbrave.freehostia.com/illuminazione-teatro/ illuminazione teatro] [http://ruwilhel.125mb.com/resources/zeus-srl.htm zeus srl] [http://hehayfor.125mb.com/styles/sony-cybershot/ sony cybershot s90] [http://gealbrig.125mb.com/library/motorola-iden.htm motorola iden usb driver] [http://souya.freehostia.com/small/scuba-diving.htm scuba diving] [http://midnightbrave.freehostia.com/last-summer/ last summer dance battiato] [http://krazykat1187.freehostia.com/description/eugenia-rito/ eugenia rito] [http://goer.freehostia.com/description/hentai-com.htm hentai com] [http://moniqueleigh.freehostia.com/data/opera-mini/ opera mini diffusori] [http://moniqueleigh.freehostia.com/data/toxic-babe/ toxic babe rumba rei] [http://souya.freehostia.com/small/acer18.htm acer 380] [http://moniqueleigh.freehostia.com/data/kvasir/ kvasir] [http://cyclique.freehostia.com/content/disegno-bambino/ disegno bambino] [http://ramangel.125mb.com/topic/prestito-aquila.htm prestito aquila] [http://cyclique.freehostia.com/content/anastacia-myskina/ anastacia myskina] [http://svinka.h18.ru/content/cena-fun.htm cena fun club] [http://timo-kiev.freehostia.com/pepe-aguilar.htm pepe aguilar midi] [http://chistovskaya.freehostia.com/topic/www-bet/ www bet music com] [http://ruwilhel.125mb.com/resources/palermo-bosco.htm palermo bosco ficuzza] [http://www.wylt.pop3.ru/vidas/ vidas] [http://rimarsh.125mb.com/topic/ricetta-pasta/ ricetta pasta] [http://keniff.125mb.com/topic/browning-robert.htm browning robert] [http://ramangel.125mb.com/topic/cuarto-de.htm cuarto de tula] [http://www.fuzps.pop3.ru/content/hp-photosmart/ hp photosmart 935] [http://ruwilhel.125mb.com/resources/il-leone.htm il leone di s marco] [http://www.rei794.pop3.ru/articles/ug.htm ug 3350] [http://chistovskaya.freehostia.com/topic/sud-carolina1/ sud carolina cose fare] [http://gealbrig.125mb.com/library/ipa-sud.htm ipa sud] [http://kalahiet.125mb.com/articles/acer/ acer 20] [http://www.anafema-device.pop3.ru/view/stampanti-per/ stampanti per palmari] [http://midnightbrave.freehostia.com/bamb/ bamb] [http://krazykat1187.freehostia.com/description/julia-stegner/ julia stegner] [http://goer.freehostia.com/description/codec-sat.htm codec sat] [http://chistovskaya.freehostia.com/topic/ragazza-orbassano/ ragazza orbassano] [http://www.terry-a-boot.pop3.ru/content/athlon/ athlon64 3000] [http://midnightbrave.freehostia.com/download-winzip/ download winzip gratis] [http://moviemania0.h18.ru/telefoni-celluleri/ telefoni celluleri] [http://cyclique.freehostia.com/content/assicurazione-sassuolo/ assicurazione sassuolo] [http://rimarsh.125mb.com/topic/fuoco-magico/ fuoco magico] [http://moniqueleigh.freehostia.com/data/reggina-calcio/ reggina calcio maglie] [http://evbailly.125mb.com/everibody-change/ everibody change] [http://limepink.h18.ru/small/leica-minox.htm leica minox] [http://timo-kiev.freehostia.com/lettore-mp113.htm lettore mp3 linein] [http://www.nadz0r.pop3.ru/new/french-festival/ french festival a naxos music journey france] [http://timo-kiev.freehostia.com/giochi-d3.htm giochi 3d] [http://souya.freehostia.com/small/vivitar-reflex.htm vivitar reflex] [http://maross.125mb.com/library/ricevitore-satellitare.htm ricevitore satellitare telesystem] [http://krazykat1187.freehostia.com/description/diritto-donna/ diritto donna] [http://gimaynar.125mb.com/small/lacie-dvd/ lacie dvd dl] [http://ruwilhel.125mb.com/resources/traduzione-canzoni.htm traduzione canzoni straniere testi] [http://ohvoice.125mb.com/web/nokia-/ nokia 6230 batteria telefoni] [http://souya.freehostia.com/small/mito-l.htm mito l origine del sole] [http://biwittic.125mb.com/quanto-costa/ quanto costa morire] [http://www.nadz0r.pop3.ru/new/pasquale-bruni/ pasquale bruni spa] [http://timo-kiev.freehostia.com/codici-xp.htm codici xp rubati] [http://bachenau.125mb.com/disegni-per.htm disegni per comunioni] [http://limepink.h18.ru/small/ird.htm ird400] [http://keniff.125mb.com/topic/vaio-vgnbvp.htm vaio vgnb3vp] [http://chistovskaya.freehostia.com/topic/fiction-vivere/ fiction vivere] [http://doublename.125mb.com/fror.htm fror] [http://chistovskaya.freehostia.com/topic/mr-kyocera/ m410r kyocera] [http://www.tjmclean84.pop3.ru/web/conchiglie-da/ conchiglie da collezione] [http://www.wylt.pop3.ru/ferro-da/ ferro da stiro caldaia vapore] [http://cashdolla.h18.ru/resources/lotta-mista.htm lotta mista] [http://hehayfor.125mb.com/styles/hobby-it/ hobby it] [http://midnightbrave.freehostia.com/robin-jarvis/ robin jarvis libri] [http://ruwilhel.125mb.com/resources/mamma-tettona.htm mamma tettona] [http://www.sturuntsev.pop3.ru/articles/hitachi-deskstar/ hitachi deskstar 250] [http://hehayfor.125mb.com/styles/www-abutres/ www abutres com br] [http://chistovskaya.freehostia.com/topic/giochi-calcio1/ giochi calcio holli e bengi] [http://www.prairiesky.pop3.ru/view/foot-bastinado/ foot bastinado] ===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 19:36, 19 September 2007

tastiera atlantis coti m p infissi video porno moana pozzi time modern severin barbecue schede madre p4 grissini italia killah telefonini sony ericcson folklore siciliano commutatrice tv basilicata mya videos hentaai un medico in famiglia 4 programmazione to zucchabar emporio armani abiti donna stampante parallela dead to rights 2 rinviato al 2005 tappeto doccia omicidio a las vegas rt x100 xtreme pro sangue sul sole il sudoku frasi sposi cosche mafiose eu quero sempre mais nicon 8800 acer videoproiettori ica (dipartimento) mercedes ml 270 lazio memory card 8 mb enigmas pdf create dragostea din tei dj ross radio mix immagini belle donne designer com www slow food torino it zombi terror quando soffia il vento canon ef 28105 mm pda qtek 2020 matrox millennium g450 passito pellegrino nikon mh56 endeca polistirolo a trapani enologia cartier declaration 100 ml damned final damnation una morte di troppo solo in america warriorkingsbattles plastica in bobine yery opus pistorum annarita n guido renzi amica mia fotocamere nikon webcam network milano washington biglietti aerei immagini pesci tutti i calendari di pamela anderson colpo grosso a manila indiano traduttore sapphire x800 xt te anau lago arturo toscanini the maestro sabato tragico porno fil asus a730 salud bucal durante el embarazo nec laura non c e la spia che ci provava quicktime 6 tiozzo sergio honda hornet 600 moto smao pentium p4 pc tempi greggio melanie moore teoman dus gram la ragazza di mille mesi tognazzi e la minorenne memoria ram evo chilly cah cha audi a6 28 v6 pigro ivan graziani boombots i santo california tornero turismo responsabile in senegal dentro www verona it dimm 512 polacco traduzioni urania vgn a417m berchet big builder cokka grasso cazzo asus a7n8x deluxe x2 4600 riassunto il ritratto di dorian grey bmw z3 2002 1 9 rifondazione partito comunista scrittura araba s 1 nikon tattooo euro 24 liviu guta de ca ma minti km0 opel benzina auto km 0 tavola sinottica lcd televisore memoria mobile pixel wrap stampante hp laserjet 1010 apple airport fox uomo calendario 2005 ricevitore bluetooth porno amatoriale gratis collegi femminili foto settimo cielo viaggi teorema pilot penna canon borsa videocamera hanes abbigliamento altri giochi illuminazione teatro zeus srl sony cybershot s90 motorola iden usb driver scuba diving last summer dance battiato eugenia rito hentai com opera mini diffusori toxic babe rumba rei acer 380 kvasir disegno bambino prestito aquila anastacia myskina cena fun club pepe aguilar midi www bet music com palermo bosco ficuzza vidas ricetta pasta browning robert cuarto de tula hp photosmart 935 il leone di s marco ug 3350 sud carolina cose fare ipa sud acer 20 stampanti per palmari bamb julia stegner codec sat ragazza orbassano athlon64 3000 download winzip gratis telefoni celluleri assicurazione sassuolo fuoco magico reggina calcio maglie everibody change leica minox lettore mp3 linein french festival a naxos music journey france giochi 3d vivitar reflex ricevitore satellitare telesystem diritto donna lacie dvd dl traduzione canzoni straniere testi nokia 6230 batteria telefoni mito l origine del sole quanto costa morire pasquale bruni spa codici xp rubati disegni per comunioni ird400 vaio vgnb3vp fiction vivere fror m410r kyocera conchiglie da collezione ferro da stiro caldaia vapore lotta mista hobby it robin jarvis libri mamma tettona hitachi deskstar 250 www abutres com br giochi calcio holli e bengi foot bastinado ===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