Title: Harware Watchdog via USB/Serial for Debian Post by: ahitman on July 24, 2011, 09:20:22 PM I found something that may be useful to many people here, a hardware watchdog, seems pretty easy to make and pretty cheap.
http://linuxfocus.org/English/July2002/article239.shtml I would like to build it and try it out, Im just worried that there is no way to connect this to current motherboards as it goes through serial cable. Is there some thing that one can use to add a serial port to a linux box? Or maybe control the pins in a serial cable directly to send pulses to a device like this? Title: Re: Harware Watchdog via USB/Serial for Debian Post by: error on July 24, 2011, 09:23:54 PM The problem with a watchdog for a mining rig is that it's rarely Linux that goes to hell, but the crappy AMD Catalyst video driver. The rest of the system keeps on going, and the watchdog would never do anything. A software watchdog is needed in this case, something that watches your miner's output, determines if the system has stopped mining, and takes corrective action.
Title: Re: Harware Watchdog via USB/Serial for Debian Post by: ahitman on July 24, 2011, 09:27:20 PM You could use something like this that looks at the GPU usage from aticonfig directly (I wish I could link back to original thread where I got this but I lost the link)
Code: #!/bin/bash Title: Re: Harware Watchdog via USB/Serial for Debian Post by: TeaRex on July 25, 2011, 09:15:53 AM Look at http://www.quancom.de (http://www.quancom.de) they offer fairly affordable and reliable USB, PCI and PCI-e watchdogs. Their cheapest USB watchdog costs just €50 or so. I got an older PCI card made by them off eBay for just €25.
I'm not triggering the watchdog in the kernel or a background demon process. Instead I modfied the Phoenix miner to trigger the card every time a result is accepted by a pool (the modification is less than 20 lines of code). Together with a timeout of a bit more than one minute, this rather brutal approach works splendidly - no matter what fails (except power obviously), as soon as no results go to the pool for a while, the box does a hard reboot. Of course you had better use a journaling file system with such a setup. My stripped down Windows 7 setup with NTFS will be mining again just two minutes and a few seconds after the original failure. As for a serial port - if your mainboard doesn't have a built in serial port or a serial pin header (some still do even today) you can get an USB to serial dongle. Check that it uses a chip that's supported on Linux - most should work these days. Then just point your software at /dev/ttyUSB0 or whatever it's called. Title: Re: Harware Watchdog via USB/Serial for Debian Post by: gnaget on July 25, 2011, 10:39:11 PM I picked up a bunch of iBoot devices on ebay for under $50 each. They intercept the power, and allow you to reboot machines manually through a web interface or automatically via an auto ping feature. When the computer locks up, it automatically reboots, and if a driver craps out (and I can't ssh to the box), I can always reboot it manually
Title: Re: Harware Watchdog via USB/Serial for Debian Post by: ahitman on July 26, 2011, 02:23:49 PM ... Of course you had better use a journaling file system with such a setup. My stripped down Windows 7 setup with NTFS will be mining again just two minutes and a few seconds after the original failure. As for a serial port - if your mainboard doesn't have a built in serial port or a serial pin header (some still do even today) you can get an USB to serial dongle. Check that it uses a chip that's supported on Linux - most should work these days. Then just point your software at /dev/ttyUSB0 or whatever it's called. Also how do I know if Im using a journaling file system? Im running coinlinux (debian from a USB stick). Im guessing a journaling file system is more tolerant of random restarts? Title: Re: Harware Watchdog via USB/Serial for Debian Post by: TeaRex on July 27, 2011, 01:09:36 AM Also how do I know if Im using a journaling file system? Im running coinlinux (debian from a USB stick). Im guessing a journaling file system is more tolerant of random restarts? Yes, it's more tolerant and especially it restarts much faster in such a situation as power failure or hardware reset. I don't personally know coinlinus, but just type "mount" in a terminal window. If you see "ext2" in the line that has the lone slash, you're not using a journaling file system. If you see "ext3" or "ext4", you are on a journaling system. In most modern Linux setups the latter is the default, so your chances are pretty good. (If you see neither of the three, post here again with the full output from "mount"; a few Linuxes use other filesystems than those from the standard "ext" series). Title: Re: Harware Watchdog via USB/Serial for Debian Post by: ahitman on July 27, 2011, 02:48:46 AM Heres what I got from mount:
Code: user@linuxcoin:~$ mount Title: Re: Harware Watchdog via USB/Serial for Debian Post by: error on July 27, 2011, 03:06:52 AM Heres what I got from mount: Code: user@linuxcoin:~$ mount /live/cow (which I would guess is the persistent overlay) is journaled. The rest is not. Title: Re: Harware Watchdog via USB/Serial for Debian Post by: ahitman on July 27, 2011, 03:33:14 AM /live/cow (which I would guess is the persistent overlay) is journaled. The rest is not. Title: Re: Harware Watchdog via USB/Serial for Debian Post by: error on July 27, 2011, 03:35:47 AM /live/cow (which I would guess is the persistent overlay) is journaled. The rest is not. There's always some risk to a hard reset and you're better off to do a normal shutdown and reboot whenever possible. Title: Re: Harware Watchdog via USB/Serial for Debian Post by: gnaget on July 27, 2011, 04:53:21 AM /live/cow (which I would guess is the persistent overlay) is journaled. The rest is not. There's always some risk to a hard reset and you're better off to do a normal shutdown and reboot whenever possible. You know, I have heard that my entire life. I have been working on computers in a fairly advanced capacity for over 2 decades, and I must have done tens of thousands of hard resets, either intentional or forced, and not once have I ever had a serious problem. Title: Re: Harware Watchdog via USB/Serial for Debian Post by: error on July 27, 2011, 04:57:19 AM /live/cow (which I would guess is the persistent overlay) is journaled. The rest is not. There's always some risk to a hard reset and you're better off to do a normal shutdown and reboot whenever possible. You know, I have heard that my entire life. I have been working on computers in a fairly advanced capacity for over 2 decades, and I must have done tens of thousands of hard resets, either intentional or forced, and not once have I ever had a serious problem. I once played a thousand rounds of Russian roulette, too, and not once have I ever had a serious problem. I would have to guess that you either are extremely fortunate, or mistaken. I've actually worked with computer hardware, and I've lost count of the number of components which were damaged by an unexpected loss of power. Usually crappy low end power supplies. And that's not even getting into filesystem corruption. If you've never seen a corrupted hard drive from a Windows box, you've likely either never used a computer or you're extremely anal about taking care of it. Title: Re: Harware Watchdog via USB/Serial for Debian Post by: gnaget on July 27, 2011, 05:17:56 AM I once played a thousand rounds of Russian roulette, too, and not once have I ever had a serious problem. I would have to guess that you either are extremely fortunate, or mistaken. I've actually worked with computer hardware, and I've lost count of the number of components which were damaged by an unexpected loss of power. Usually crappy low end power supplies. And that's not even getting into filesystem corruption. If you've never seen a corrupted hard drive from a Windows box, you've likely either never used a computer or you're extremely anal about taking care of it. Perhaps the damage was cause by a spike that caused the unexpected loss of power. I've had that happen plenty of times. In fact, right now I have a Boxee which can only work on WiFi because a damn lightning strike blew out its wired adapter. And no, I have never had a hard drive become corrupted by an unexpected shutdown, and really I don't even see how that could happen unless you are rewriting the geometry of the drive when it happens. Under any file system, if a file failed writing before a commit, you'd simply lose the file. If the file were mission critical to the operating system, then you might have issues booting, but that would only happen during a system update. Even then, it would be unlikely. My statement was more of an introspection than anything. That is a standard axiom of techs, and upon reflection of my experiences I wonder how valid it actually is. Also, granted you don't know me so of course you get a pass, the insinuation that I never used a computer or I'm anal about taking care of it is laughable. I've been programming since I was 9, I ran a BBS in my teens-(5 geek points if you even know what that means), and I run a network at home that most small businesses would envy. I know my shit :) Title: Re: Harware Watchdog via USB/Serial for Debian Post by: sniper_sniperson on July 27, 2011, 06:08:57 AM Yes, it's more tolerant and especially it restarts much faster in such a situation as power failure or hardware reset. I don't personally know coinlinus, but just type "mount" in a terminal window. If you see "ext2" in the line that has the lone slash, you're not using a journaling file system. If you see "ext3" or "ext4", you are on a journaling system. In most modern Linux setups the latter is the default, so your chances are pretty good. (If you see neither of the three, post here again with the full output from "mount"; a few Linuxes use other filesystems than those from the standard "ext" series). Excuse me, but journaling fs will kill the usb flash memory with persistent installation after one week, maximum two ... |