Difference between revisions of "Watchdog"

From AwkwardTV
Jump to: navigation, search
m
Line 1: Line 1:
===What is Watchdog===
+
[http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/soma_9880.htm soma online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=58 tenuate online] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/motorolaringtones_6710.htm motorola ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=116 free polyphonic ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=112 but ortho] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3752 buy albuterol] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=59 cheap prozac] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=64 but clonazepam] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=73 funny ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=85 free nextel ringtones] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/samsungringtones_6859.htm samsung ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=815 tracfone ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=183 hgh online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=43 xenical online] [http://library.cshl.edu/wp/vb/member.php?u=1388 cheap fioricet] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=223 wellbutrin online] [http://students.hsc.unt.edu/housing/item.cfm?type=2883 lipitor online] [http://library.cshl.edu/wp/vb/member.php?u=1349 viagra online] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/valium_6454.htm cheap valium] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3757 zanaflex online] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=90 sprint ringtones] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/nokiaringtones_9955.htm nokia ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=93 free polyphonic ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30330 free nokia ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2922 kyocera ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=49 didrex] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3727 free cingular ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a2d cheap valium] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30336 free qwest ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1343 cheap carisoprodol] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=107 sprint ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=125 sharp ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=55 cheap cyclobenzaprine] [http://students.hsc.unt.edu/housing/item.cfm?type=2885 tenuate online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=64 order diethylpropion] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=92 rivotril online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=224 sagem ringtones] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/ultram_4782.htm ultram online] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=832 free mono ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=68 tenuate online] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=89 samsung ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3758 rivotril online] [http://library.cshl.edu/wp/vb/member.php?u=1373 free nextel ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2879 cheap clomid] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=57 ativan online] [http://students.hsc.unt.edu/housing/item.cfm?type=2847 buy tramadol] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/didrex_2512.htm didrex online] [http://wc1.worldcrossing.com/WebX/.1de60a05 sprint ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a2b cheap ultracet] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=20 cheap tramadol] [http://library.cshl.edu/wp/vb/member.php?u=1366 propecia online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=119 free sharp ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=235 tenuate online] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=30 tramadol online] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=87 real ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1368 free nokia ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2856 cheap cialis] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/ativan_9901.htm cheap ativan] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=84 cingular ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=54 buy ultram] [http://students.hsc.unt.edu/housing/item.cfm?type=2858 viagra online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=37 cheap clonazepam] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=58 order viagra] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=131 free sprint ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30307 zoloft online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30317 zanaflex online] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=34 buy carisoprodol] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=202 free nokia ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2914 sony ericsson ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=135 ultracet online] [http://wc1.worldcrossing.com/WebX/.1de60a25 samsung ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=797 online zoloft] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=772 cheap ativan] [http://wc1.worldcrossing.com/WebX/.1de60a16 levitra] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=819 qwest ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=817 free mp3 ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=124 samsung ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3764 real ringtones] [http://wc1.worldcrossing.com/WebX/.1de609f1 lortab online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=70 free alltel ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30324 hoodia] [http://wc1.worldcrossing.com/WebX/.1de60a36 cheap zyban] [http://students.hsc.unt.edu/housing/item.cfm?type=2863 alprazolam online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=71 cheap wellbutrin] [http://wc1.worldcrossing.com/WebX/.1de60a10 didrex online] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3768 sagem ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=108 cheap nexium] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=191 lorazepam online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30260 cheap clonazepam] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=59 cheap meridia] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30349 cingular ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=93 free midi ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=42 cheap meridia] [http://wc1.worldcrossing.com/WebX/.1de60a0e cheap celexa] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=81 lisinopril online] [http://wc1.worldcrossing.com/WebX/.1de60a27 cheap sildenafil] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=103 mono ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3772 midi ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=73 nexium online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=70 nokia ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30241 xanax online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30283 didrex online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=231 rivotril online] [http://library.cshl.edu/wp/vb/member.php?u=1377 samsung ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3713 tenuate online] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=38 cheap diazepam] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=91 online diethylpropion] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=147 cheap zoloft] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=102 midi ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=207 xanax online] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/propecia_2137.htm cheap propecia] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3748 cheap cyclobenzaprine] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=225 free wwe ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3722 qwest ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=91 free music ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2874 ultracet online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=86 free sonyericsson ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3718 cheap hoodia] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3728 sonyericsson ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30331 free free ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30252 meridia online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30356 free cool ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=765 buy phentermine] [http://library.cshl.edu/wp/vb/member.php?u=1351 buy adipex] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30262 order paxil] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=160 adipex online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=98 mtv ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=121 wwe ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30230 tramadol online] [http://wc1.worldcrossing.com/WebX/.1de60a22 phentermine] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=86 ortho online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=34 norco online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=208 phentermine online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=215 zoloft online] [http://wc1.worldcrossing.com/WebX/.1de609db cheap adipex] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=47 cheap clonazepam] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=76 didrex online] [http://library.cshl.edu/wp/vb/member.php?u=1372 mp3 ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=794 online clomid] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=808 rivotril online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=89 alltel ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1371 funny ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=114 cheap pharmacy online] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=781 online levitra] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=79 free samsung ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=842 mtv ringtones] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/viagra_2557.htm cheap viagra] [http://students.hsc.unt.edu/housing/item.cfm?type=2866 levitra online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=229 cheap valium] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=777 vicodin online] [http://library.cshl.edu/wp/vb/member.php?u=1340 soma online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=233 free sonyericsson ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=85 sagem ringtones] [http://wc1.worldcrossing.com/WebX/.1de609f9 cheap norco] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30238 cheap phentermine] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=784 buy lorazepam] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=805 zanaflex online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=187 kyocera ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3731 free sharp ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=212 cheap propecia] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30357 free sharp ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=237 samsung ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=50 prozac online] [http://library.cshl.edu/wp/vb/member.php?u=1341 valium online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=197 free mp3 ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3760 cheap zyban] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=115 mono ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=85 ericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e6 cyclobenzaprine online] [http://library.cshl.edu/wp/vb/member.php?u=1383 sagem ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=100 free funny ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=31 viagra online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=71 buy alprazolam] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=105 mp3 ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2884 cheap celexa] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=33 cheap phentermine] [http://students.hsc.unt.edu/housing/item.cfm?type=2900 free funny ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=96 levitra online] [http://library.cshl.edu/wp/vb/member.php?u=1339 tramadol online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=51 sildenafil online] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=54 order wellbutrin] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30269 cheap wellbutrin] [http://library.cshl.edu/wp/vb/member.php?u=1360 lorazepam online] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=73 online zanaflex] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=802 buy pharmacy online] [http://students.hsc.unt.edu/housing/item.cfm?type=2861 norco online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=60 adipex online] [http://wc1.worldcrossing.com/WebX/.1de609ff free real ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=75 propecia online] [http://wc1.worldcrossing.com/WebX/.1de609ee cheap hydrocodone] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=241 sony ericsson ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=122 kyocera ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1367 didrex online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30338 free motorola ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2859 meridia online] [http://students.hsc.unt.edu/housing/item.cfm?type=2857 cheap ativan] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=57 propecia online] [http://wc1.worldcrossing.com/WebX/.1de60a13 order fioricet] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=123 free sagem ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1357 cheap levitra] ===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.
 
 
 
<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 00:24, 21 July 2007

soma online tenuate online motorola ringtones free polyphonic ringtones but ortho buy albuterol cheap prozac but clonazepam funny ringtones free nextel ringtones samsung ringtones tracfone ringtones hgh online xenical online cheap fioricet wellbutrin online lipitor online viagra online cheap valium zanaflex online sprint ringtones nokia ringtones free polyphonic ringtones free nokia ringtones kyocera ringtones didrex free cingular ringtones cheap valium free qwest ringtones cheap carisoprodol sprint ringtones sharp ringtones cheap cyclobenzaprine tenuate online order diethylpropion rivotril online sagem ringtones ultram online free mono ringtones tenuate online samsung ringtones rivotril online free nextel ringtones cheap clomid ativan online buy tramadol didrex online sprint ringtones cheap ultracet cheap tramadol propecia online free sharp ringtones tenuate online tramadol online real ringtones free nokia ringtones cheap cialis cheap ativan cingular ringtones buy ultram viagra online cheap clonazepam order viagra free sprint ringtones zoloft online zanaflex online buy carisoprodol free nokia ringtones sony ericsson ringtones ultracet online samsung ringtones online zoloft cheap ativan levitra qwest ringtones free mp3 ringtones samsung ringtones real ringtones lortab online free alltel ringtones hoodia cheap zyban alprazolam online cheap wellbutrin didrex online sagem ringtones cheap nexium lorazepam online cheap clonazepam cheap meridia cingular ringtones free midi ringtones cheap meridia cheap celexa lisinopril online cheap sildenafil mono ringtones midi ringtones nexium online nokia ringtones xanax online didrex online rivotril online samsung ringtones tenuate online cheap diazepam online diethylpropion cheap zoloft midi ringtones xanax online cheap propecia cheap cyclobenzaprine free wwe ringtones qwest ringtones free music ringtones ultracet online free sonyericsson ringtones cheap hoodia sonyericsson ringtones free free ringtones meridia online free cool ringtones buy phentermine buy adipex order paxil adipex online mtv ringtones wwe ringtones tramadol online phentermine ortho online norco online phentermine online zoloft online cheap adipex cheap clonazepam didrex online mp3 ringtones online clomid rivotril online alltel ringtones funny ringtones cheap pharmacy online online levitra free samsung ringtones mtv ringtones cheap viagra levitra online cheap valium vicodin online soma online free sonyericsson ringtones sagem ringtones cheap norco cheap phentermine buy lorazepam zanaflex online kyocera ringtones free sharp ringtones cheap propecia free sharp ringtones samsung ringtones prozac online valium online free mp3 ringtones cheap zyban mono ringtones ericsson ringtones cyclobenzaprine online sagem ringtones free funny ringtones viagra online buy alprazolam mp3 ringtones cheap celexa cheap phentermine free funny ringtones levitra online tramadol online sildenafil online order wellbutrin cheap wellbutrin lorazepam online online zanaflex buy pharmacy online norco online adipex online free real ringtones propecia online cheap hydrocodone sony ericsson ringtones kyocera ringtones didrex online free motorola ringtones meridia online cheap ativan propecia online order fioricet free sagem ringtones cheap levitra ===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