LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: loggin LVS connections...

To: Stephen Rowles <spr@xxxxxxxxxxxxxxx>
Subject: Re: loggin LVS connections...
Cc: Wensong Zhang <wensong@xxxxxxxxxxxx>, lvs-users@xxxxxxxxxxxxxxxxxxxxxx
From: Julian Anastasov <ja@xxxxxx>
Date: Thu, 9 Nov 2000 21:47:34 +0000 (GMT)
        Hello,

On Thu, 9 Nov 2000, Stephen Rowles wrote:

> >         What is the client OS?
>
> The client OS appears to be only Windows 95/98/2000 using the standard
> windows telnet client

        Hm

> Are there any plans to include logging in LVS in a similar manner to the
> secure.log? Running a compute cluster I would find it really useful to have
> a log of connections, and where LVS tried to route them to.
>
> I know it's probably not the best solution but do you think it would be
> reasonable to use something along the lines of:
>
> printk("<6>connection from %d:%d routed to %d:%d",ms->saddr, ms->sport,
> ms->daddr, ms->dport);

        I think the IP addresses logged from LVS are more readable
with debug_level=1 than in your example. May be we can tune the debugging
levels and level 1 to look useful for connection logging. May be some of
the debug messages can be changed from level 1 to level 2 (masq binds).

        Hm, logging of ms->saddr and sport is not correct in the context
of the fwmark based services. This is because the messages were used for
debugging only.

        What about IP_VS_LOG under CONFIG_IP_VS_DEBUG, i.e. same as
IP_VS_DBG but for the KERN_INFO class:

#define IP_VS_LOG(level, msg...)                        \
    do {                                                \
            if (level <= ip_vs_get_debug_level())       \
                    printk(KERN_INFO "IPVS: " ## msg);  \
    } while (0)


        IP_VS_LOG(1,"%s %u.%u.%u.%u:%u -> %u.%u.%u.%u:%u to %c 
%u.%u.%u.%u:%u\n",
                masq_proto_name(iph->protocol),
                NIPQUAD(iph->saddr), ntohs(h.portp[0]),
                NIPQUAD(iph->daddr), ntohs(h.portp[1]),
                ip_vs_fwd_tag(ms),
                NIPQUAD(ms->saddr), ntohs(ms->sport));

> in ip_vs.c
> in function ip_vs_schedule(.......)
>
> just after the masquerading entry has been created?

        There is but it is very complex. But the same message is missing
from ip_vs_sched_persist().

> This should create kern.info syslog messages that could then be re-directed
> to a log file to keep track of new connections being made. I know for high
> hit rate web server clusters this might not be a good thing - but for my
> low connection rate compute cluster this would be a really useful facility.

        They will not compile with debugging/logging enabled.

>
> Just thought I'd see what everyone thought....

        Hm, we can try to make debug_level=1 usable for logs. The things
can be implemented to be very complex but we have to decide what can
be useful for logging.


Regards

--
Julian Anastasov <ja@xxxxxx>

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