View Single Post
Old 11-13-2005, 09:04 AM   #1 (permalink)
daleo
Recruit
 
Join Date: Nov 2005
Posts: 2
daleo is on a distinguished road
How to create a ping-tracking script..?

Hi!

Got a problem.
OS is Linux Mandrake 9.2 with special routing soft running on it. That
soft handles several channels: two for source hosts and others for subscriber-hosts. All hosts have ip-adresses, and the term "channel" is of logical nature. Those channels could be opened and closed from the command line with the appropriate commands (like " # chclose 123", where 123 - channel number). One of the source hosts is the main source host, the other source host - is reserved source host. Both source hosts are online (their ip-addresses could be pinged) but only the channel for the main source host is up (opened).
The idea is to write a script that will at some periods of time (every 5 sec. for example) ping the main source host and when it will go down (destination host unreachable) the script will execute a command for closing its channel and another command for opening channel for reserved source host . The script must continue pinging the main source host and , when it will be up again, the script should execute a command for closing channel of the reserved source host and a command for opening channel for main source host.

Thank you!
daleo is offline   Reply With Quote