Linux Training

Linux training for private, public & voluntary sector.

0793 572 8612

City LinUX sample scripts - iptkovr


iptkovr - monitors a remote ip and assigns that ip to a virtual interface on another host if it becomes unavailable.


iptkovr [ -c <config_file> ] [ -d ] [ -v ] [ config_id> ]


iptkovr is a Bourne shell script which should work equally well on all versions of UNIX, Linux and Mac OS X.


iptkovr uses the configuration id as a lookup key to the configuration file /usr/local/etc/ to find essential details. The target host's IP address is monitored using ping . The interval between pings may be set in configuration\ file but otherwise defaults to 10 seconds.

if the target host does not respond iptkovr will wait for a further sleep period then try one more time before concluding that the target is not going to come back on line.

The target IP is then assigned to a virtual interface on the backup/clone server.


-c    Use the specified configuration file in preference to the default "/usr/local/etc/" . If no configuration file is found the script will terminate with an error message.

-d    Set debug mode on. The -x    option is set within the shell and each command in the script is echoed to the console.

-v    When set iptkovr will report significant actions to standard error.

< config_id > The configuration identity is the key to the stanza in the configuration file which will be used to determine the required URI for the stats report.



	iptkovr -v memnon 


The script is quite crude and has very little, if any, error checking. The consequences of unexpected input are untested.




Clifford W Fulford, City Linux. Contact or +44 (0)709 229 5385.

The layout and associated style sheets for this page are taken from the World Wide Web Consortium and used here under the W3C software licence.