reboot upon loss of ping

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hello,

I have a piece of electrical (110Vac) equipment that has an ethernet
port on it. It hangs periodically for unknown reasons. When we roll a
truck and get a technician to cycle power, all if fine again and in
answers the pings again(so we know it's alive.

I have an embedded linux board, TS5500 that runs a 2.4 kernel and
busybox. The distro is called TSlinux.  And it has a Elan SC520 (386)
processor.

I'm bilding a board that has an npn transistor and a relay on it. The
transistor will take the 3 vdc signal off the TS5500 board and send
12vdc to the relay to make it go open momentarily.

I need to write software that will determine when the pings are not
being answered. Start a timer for 5 minutes. If the timer has not
reset, due to pings getting answered, then the 3vdc signal will be
generated on the TS5500 board.

Anybody seen any code like this, or can you give me some ideas on how
to determine when the pings are not being answered and how to set a
bit in a register, or an entire byte, so as to status the device?

Ideas and code fragments (ansi C or x86 assembler or shell)?


James


Re: reboot upon loss of ping
Quoted text here. Click to load it
<snip>

I'm assuming that the piece of equipment and the embedded linux board
are two different pieces of equipment?

If so, then have the linux box run something like fping occassionally to
see if your equipment stays alive. Depending on how robust this linux
box is, you may want to consider using 'mon'. Its a software monitoring
solution that would probably greatly speed up your development time.

With mon you can define network services to watch and events that should
occur if a service goes down (ie. If no pings for 3 consecutive tries,
then run special code to reboot hung device + email me a report).

-Barry

Site Timeline