You are not logged in.
I borked something, but in an interesting way.
So there I was, turning on kernel threads in htop, sorting everything by PID and checking out the first things that were loading after the init[3] thread. I found one called watchdog. PID 5, this little puppy was running with RT priority here on my system.
The first thing I do is run a:
man watchdog
No manual entry for watchdog
No dice.
find / | grep watchdog
I saw a file called /usr/include/linux/watchdog.h on my local machine and went to check it out to see if it could shed any light on the situation.
Analysis: Collection of definitions that look like assembly tokens... Is this accurate?
I plan to e-mail the address listed as the maintainer to ask some questions after I've done these tests.
I turned to the web now, firing up my trusty wifi card.
Search Engine Time Warp Music
http://linux.die.net/man/8/watchdog
No manual entry on the local machine... Where can I get the full man pages?
That led me to /dev/watchdog
The brash type I am, I decided to just fuck around with /dev/watchdog I don't remember exactly what I did, I was using pipes and echo and cat and trying to see what the device did like a neanderthal handling a firearm.
I don't remember the exact command that caused the system reboot. Further, there seemed to be some kind of delay between the command and the reboot. I'm going to try some things and see if I can re-create the effect. Documenting them here.
[root@fubar /]# uname -a
Linux fubar 2.6.33-ARCH #1 SMP PREEMPT Thu May 13 12:06:25 CEST 2010 i686 Intel(R) Atom(TM) CPU N270 @ 1.60GHz GenuineIntel GNU/Linux
[root@fubar /]# echo /dev/watchdog
/dev/watchdog
[root@fubar /]# cat /dev/watchdog
that second one, returned some Permission Denied error and then, reboot came a short time later. Apparently the abrubt reboot left some corrupted junk on my drive too, so I fixed it with a fsck in the repair shell...
Visually scanning through a cat of the
/home/lost+found
makes it look like some of the cache from firefox probably.
Learned: how to fsck and repair damage in the init 1 environment.
What happened?
Last edited by fu9ar (2010-12-04 12:18:14)
Offline
cat /dev/watchdog closes the device and after timeout watchdog reboots the system.
Offline
How did cat close the watchdog? Why does cat do this? Bad cat!
/me downloads source code for GNU coreutils
Last edited by fu9ar (2010-12-04 20:33:33)
Offline
The documentation is in the linux source tree Documentation/watchdog.
Offline
How did cat close the watchdog? Why does cat do this? Bad cat!
Never issue a command as root if you do not want the command to be completed successfully! Cat did it's job and so did watchdog.
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
Part of the reason I posted this was for other newbies to learn from my "mistakes".
Also, breaking things is fun!
Last edited by fu9ar (2010-12-04 22:10:48)
Offline
Offline