On Fri, Jan 23, 2009 at 11:59 PM, Sangeeta Misra <Sangeeta.Misra at sun.com> 
wrote:
>
> One of things we need to resolve is how to implement  "show-statistics"
> command; specifically could it simply be a wrapper around kstat -m ilb?
> That would be easy to implement. Note that kstat -m ilb displays server
> ip address and not hostname.  That leads to the problem that Kacheong
> mentioned in that there is a name length limit on  kstat (the name field
> in kstat is limited to 30 chars + NULL.  So if we use IPv6 address,  it
> won't fit in the name.  In fact, if we use IPv4, we cannot have rule
> name longer than 14 chars) . Since kstat has a limit on the rule name
> and the ip address, they could provide an incomplete versions of the
> values that the user had configure lbadm will
>
> We could put a limitation on how long a rule name can be, but how to
> handle the server name?   Presumably even using the shorthand tricks for
> IP v6 address specification and lead to a name field that exceeds what
> kstat allows.  At least for V6  we then have kstat report the link-local
> part  and the global part of he address as seperate entries?  I would
> hate us to have a more complex implementation of "show-statistics"
> command than just a wrapper.
>
> Comments?

What are you expecting the kstat namespace to look like?

I would expect kstats to be named something like:

ilb:42:config

using the instance to differentiate between different kstats.

I would expect the kstat to be of type KSTAT_TYPE_NAMED, containing
name-value pairs, and the interesting data such as rule names, server names,
and addresses, to be the values in that structure which don't have to
fit into the
fixed 30 characters.

(One thing that occurs to me is that you may end up with values with : in them,
which could cause havoc with careless parsers of kstat -p output.)

-- 
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/

Reply via email to