LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: how to tell ip_vs version when don't have ipvsadm

To: Joseph Mack <mack.joseph@xxxxxxx>
Subject: Re: how to tell ip_vs version when don't have ipvsadm
Cc: lvs-users@xxxxxxxxxxxxxxxxxxxxxx, wensong@xxxxxxxxxxxx
From: Julian Anastasov <ja@xxxxxx>
Date: Tue, 24 Apr 2001 20:28:55 +0300 (EEST)
        Hello Joe,

On Tue, 24 Apr 2001, Joseph Mack wrote:

> I'm often in the situation of
>
> o having ip_vs loaded (say 0.2.8 with 2.4.3)
> o /usr/src/linux pointing to another kernel I'm compiling (not 2.4.3)
> o /sbin/ipvsadm belonging to the last kernel I booted
>
> Since ipvsadms from 2.2.x and 2.4.x don't recognise ip_vs
> from the other series, you get erroneous "kernel
> doesn't have ip_vs" messages and I can't use whatever
> my current ipvsadm is to tell what ip_vs version I've got.
>
> I'm looking for a method which will detect the current
> ip_vs without ipvsadm  and then link the appropriate
> ipvsadm (eg /sbin/ipvsadm-0.2.8) to /sbin/ipvsadm
>
> Is the string at the top of /proc/net/ip_vs such as

        Stupid method :):

K="`uname -r | sed -n "s/^\(2\.2\).*/\1/p"`"
if [ "$K" != "2.2" ]
then
        ln -sf ipvsadm.2.4 /sbin/ipvsadm
else
        ln -sf ipvsadm.2.2 /sbin/ipvsadm
fi

        May be there are many "right" methods :)

> "IP Virtual Server version 0.2.8 (size=4096)"
>
> guaranteed to remain stable, ie I can grep for
>
> "IP Virtual Server version"
>
> and take the 5th field here for my version number?
>
> Joe
>
> --
> Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
> contractor to the National Environmental Supercomputer Center,
> mailto:mack.joseph@xxxxxxx ph# 919-541-0007, RTP, NC, USA


Regards

--
Julian Anastasov <ja@xxxxxx>



<Prev in Thread] Current Thread [Next in Thread>