Computer 'watchdog' w/BS2 questions
pvale
Posts: 8
I have some PCs crunching Seti BOINC workunits that I do not have much physical access to, and due to power glitches/outages I find the machines shut down quite a bit. Now, when they are operating I have VNC connection to them over the internet. I do not have the option of UPS backup for these machines.
What I want to accomplish is;
1. If machine locks up, bring reset low, then high. (Reset pin available on motherboard header for front panel leds, etc.)
2. If machine powers off, bring soft switch pin low, then high to restart. (Soft switch pin on motherboard header.)
I am going to monitor the power led for power off conditions, but to detect lockups, I need a clock signal of some sort that stops on lockup. I was thinking of using the keyboard clock, but don't know the speed of this clock signal, nor if it stops on lockup. Barring that, I can write a little program on the pc that pulses a parallel port pin, or something similar. I am going to use a BS2, running on a battery backed-up power supply, so will be immune to power failure. Anyone know about the keyboard clock, or have any other ideas of a clock signal that is within the range of a BS2?
Perry Vale
What I want to accomplish is;
1. If machine locks up, bring reset low, then high. (Reset pin available on motherboard header for front panel leds, etc.)
2. If machine powers off, bring soft switch pin low, then high to restart. (Soft switch pin on motherboard header.)
I am going to monitor the power led for power off conditions, but to detect lockups, I need a clock signal of some sort that stops on lockup. I was thinking of using the keyboard clock, but don't know the speed of this clock signal, nor if it stops on lockup. Barring that, I can write a little program on the pc that pulses a parallel port pin, or something similar. I am going to use a BS2, running on a battery backed-up power supply, so will be immune to power failure. Anyone know about the keyboard clock, or have any other ideas of a clock signal that is within the range of a BS2?
Perry Vale
Comments
If the PC missed enough 'strobes' to the BS2, then the BS2 could (in theory) reset the PC by pulling the reset line. You might have to open the PC to find the reset line -- or wire in to the reset button on the PC. It would have to know to wait a while for the PC to reboot and re-start the program until the next 'strobe' would reach the BS2.
This would be a pretty brute-force 'Watch-Dog Timer' application.
It would be best if your program issued the 'strobe' signals to the BS2 -- that way, no matter what went wrong, your PC would be reset.
I'm not sure if this will work...but if you occasionally toggle some RS232 lines to see if they respond.· Again, I don't know if the PC HAS to have a comm. program running, but maybe in the background (if you're running windows).
And I'm trying to work out the right pins....say, DCD on the PC...maybe that'll trigger DTR which you could monitor!
OR, put RTS/DSR and DTR high and see if CTS goes high....
OF COURSE, all this relies on the motherboard crashing and hardware locking up.· Software can crash and still leave things running....
Do you have access to the source code in your software?· you could put in a few lines to trigger serial port lines and monitor these with the stamp!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
If you're using DOS, of course, you have direct access to it.
And you could use a BS2 to monitor the port pins as a 'watchdog', so if it doesn't see a transition in a certain period of time it resets your PC.
Note if you use a single BS2 to monitor 2 or 3 PC's, you now have a single-point of failure tying three systems together. It is conceivable a failure on the BS2 would hold all three systems in continuous reset. Just something to think about. Make sure you engineer the system to be as robust as you can. The BS2 is a pretty robust module to start with, though.
You can also interface the BS to a telephone line and read the STATUS or intiate a reset from the telephone. This might be a good secondary system to have in place while developing your first choice of a fully automated, self-monitoring watch dog. It seems obvious that if you system has bugs and you have to run back and forth to reboot, you are going to need a secondary option to avoid real headaches.
You can also have the BS monitor power outages, but that may be redundant.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
G. Herzog in Taiwan
Rather than wait for a specific time interval, which could vary, when your watchdog program on the PC starts it should send a start signal first to the stamp to say it's sucsessfully started and the stamp·can start looking for Watchdog pulses. As a backup, if·the stamp doesn't·recieve a start signal within a reasonable·time (say 15 minutes), it will attempt to reset the PC again·(sometimes PC's crash again while·re-booting), if you want to get really fancy, if multiple resets fail, the stamp could look for a working PC·(There's no reason why one stamp can't monitor several machines)·and signal it to EMail you that there is a major problem.·you could also use this start message to keep an internal log in the stamp of how many times the PC has reset (add an·RTC and you can even see when it was reset)·to see if·you have a major problem. Now you just need to detect whether the stamp's crashed ;-)
Martin.
You'll want to make sure the voltage is nicely filtered....not sure if the BOE will handle that or not!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
I've been running my stamps from an old Compaq laptop power supply since I've had stamps. I haven't had any issues. I do put a 100uf and a .01uf cap on the 5V rail coming out of the power supply. I'll have to go read that other thread.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
The particular one I use on the bench has 5v, 12v, and 18v. The 18V output i use for the input to regulators down the line when I need them. But I do use the 5V and 12V directly as needed. I've run a lot of electronics from it. I don't know what currents the outputs are capable of, but I keep the draw to a couple of amps or less. I just retrieved several of my basic stamps and various carrier boards from 'cold' storage. I found a few 9v batteries in there too that were frozen and bulged. But I gave up on 9v batteries long ago and they went in the trash. I'm in the process of trickling a few electrons in the stamps now and making sure they work. And.....they're hooked to the 5v on the bech from aforementioned supply.