[bind10-dev] Ideas about statistics

Naoki Kambe kambe at jprs.co.jp
Thu May 20 00:08:21 UTC 2010


Shane-san,

Thank you for replying. I answer your questions inline below.

> > Our short-term goals:
> >  - Fix protocol between stats daemon and other components
> >  - Code prototypes which work with other components
> > 
> > Life cycle of stats daemon:
> >  1. Boss started stats daemon.
> >  2. Stats daemon broadcasts "stats daemon is ready for gathering
> >     statistics data".
> 
> I think we can skip this step. My reason is that if a process starts
> after the stats daemon, it will miss this broadcast. We need to be able
> to handle that situation - an administrator may start a module long
> after the system has booted, for example.
> 
> I think a better solution would be that when a module is running that
> has statistics, it sends statistics on the stats channel no matter what.
> If something is listening then good, otherwise they just get dropped.

#2 procedure was just a idea. I thought other components may want to
know stats daemon is ready for listening stats data just after BIND 10
starts up.

But now I think it isn't problem. Other components may not need to
know whether stats daemon could catch the data. They can just send the
data periodically. After stats daemon is ready, stats daemon may query
boss process which components are alive. Because boss process may know
it. So I think #2 procedure may not be required now.

> 
> >  3. Other components send their statistics data to stats channel
> >     periodically.
> >  4. Stats daemon gathers statistics data and aggregates it.
> >  5. When a user invokes statistics-publish command via bindctl, 
> >     stats daemon reports formatted statistics data via bindctl.
> >  6. If bind10 is shutting down, stats is killed by Boss.
> > 
> > Statistics items (for initial version):
> > 
> >   * Output items which stats daemon pushes to bindctl
> > 
> >     - Local name
> >     - Boot time
> >     - Reported time
> >     - Process id
> >     - Incoming Queries (TCP)
> >     - Incoming Queries (UDP)
> >
> >   * Input items which stats daemon is gathering from other components
> >     (initially only from Boss and Auth)
> > 
> >     from Boss to stats
> >     - Version number
> >     - Process id
> >     - Boot time
> >     - localname
> >
> >     from Auth to stats
> >     - Version number
> >     - Process id
> >     - Incoming Queries (TCP)
> >     - Incoming Queries (UDP)
> > 
> > Example of output data format
> > 
> >  * XML format:
> >     <isc version="1.0">
> >       <bind10>
> >         <statistics>
> >           <server>
> >             <localname>4bea7903_4 at host</localname> 
> >             <boot-time>2010-05-13T05:19:43Z</boot-time> 
> >             <reported-time>2010-05-13T05:44:41Z</reported-time> 
> >             <process-id>999</process-id>
> >             <queries-in>
> >               <name>tcp</name>
> >               <counter>8888</counter>
> >               <name>udp</name>
> >               <counter>9999</counter>
> >             </queries-in>
> >           </server>
> >         </statistics>
> >       </bind>
> >     </isc>
> > 
> > Example of bindctl input sample:
> > 
> >  >> Stats print_stats
> >     ++ BIND 10 Statistics Report ++
> >     Local name:	4bea7903_4 at host
> >     Boot time:	2010-05-13T05:19:43Z
> >     Reported time:	2010-05-13T05:44:41Z
> >     Process id: 	999
> >     Incoming Queries (TCP):	8888
> >     Incoming Queries (UDP):	9999
> >     ++ BIND 10 Statistics Report ++
> > 
> >     * "print_stats" command just prints statistics data.
> > 
> >  >> Stats clear_stats
> >     stats cleared.
> >   
> >     * "clear_stats" command is useful for resetting counts.
> 
> Okay... we probably want some sort of "Are you sure?" prompt for this.
> I'm not sure of the best way to do this... probably just to hard code
> this into the bindctl for now? Eventually we may want a "dangerous" flag
> for certain operations. :)

"Are you sure?" prompt is good idea. I think this may be implemented
in bindctl if possible. "dangerous" flag on bindctl may be useful for
any other components too.

> 
> >  >> Stats print_stats
> >     ++ BIND 10 Statistics Report ++
> >     Local name:	4bea7903_4 at host
> >     Boot time:	2010-05-13T05:19:43Z
> >     Reported time:	2010-05-13T05:47:12Z
> >     Process id: 	999
> >     Incoming Queries:	0
> >     Incoming Queries (TCP):	0
> >                         	^
> >     Incoming Queries (UDP):	0
> >                         	^
> >     ++ BIND 10 Statistics Report ++
> > 
> >     * It shows that counts are reset.
> 
> I think this looks like a very good start!
> 
> Do you think it is possible to finish this before the next release
> (which is only 2 weeks away)? If not, we should define what exactly we
> are going to be including in that release (perhaps the XML definition
> only?).

No, it isn't for next release, but I think it is for July-end
release. This release may come after the next release. This release may
contain stats program which works with other components and XML
definition.

Thanks,

Naoki Kambe



More information about the bind10-dev mailing list