Commit fd0aa336 authored by Likun Zhang's avatar Likun Zhang
Browse files

Merge trunk back to this branch

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac364@3374 e5f2f494-b856-4b98-b285-d166d9295462
parents e7b430cc f8b62f49
105. [func]* zhanglikun
113. [func]* zhanglikun
Folder name 'utils'(the folder in /src/lib/python/isc/) has been
renamed to 'util'. Programs that used 'import isc.utils.process'
now need to use 'import isc.util.process'. The folder
/src/lib/python/isc/Util is removed since it isn't used by any
program. (Trac #364, rTBD)
112. [func] zhang likun
Add one mixin class to override the naive serve_forever() provided
in python library socketserver. Instead of polling for shutdwon
every poll_interval seconds, one socketpair is used to wake up
the waiting server.(Trac #352, svn r3366)
111. [bug]* zhanglikun, Michal Vaner
Make sure process xfrin/xfrout/zonemgr/cmdctl can be stoped
properly when user enter "ctrl+c" or 'Boss shutdown' command
through bindctl.
The ZonemgrRefresh.run_timer and NotifyOut.dispatcher spawn
a thread themselves.
(Trac #335, svn r3273)
110. [func] Michal Vaner
Added isc.net.check module to check ip addresses and ports for
correctness and isc.net.addr to hold IP address. The bind10, xfrin
and cmdctl programs are modified to use it.
(Trac #353, svn r3240)
109. [func] naokikambe
Added the initial version of the stats module for the statistics
feature of BIND 10, which supports the restricted features and
items and reports via bindctl command (Trac #191, r3218)
Added the document of the stats module, which is about how stats
module collects the data (Trac #170, [wiki:StatsModule])
108. [func] jerry
src/bin/zonemgr: Provide customizable configurations for
lowerbound_refresh, lowerbound_retry, max_transfer_timeout and
jitter_scope. (Trac #340, r3205)
107. [func] zhang likun
Remove the parameter 'db_file' for command 'retransfer' of
xfrin module. xfrin.spec will not be generated by script.
(Trac #329, r3171)
106. [bug] zhang likun
When xfrin can't connect with one zone's master, it should tell
the bad news to zonemgr, so that zonemgr can reset the timer for
that zone. (Trac #329, r3170)
105. [bug] Michal Vaner
Python processes: they no longer take 100% CPU while idle
due to a busy loop in reading command session in a nonblocking way.
(Trac #349, svn r3153), (Trac #382, svn r3294)
104. [bug] jerry
bin/zonemgr: zonemgr should be attempting to refresh expired zones.
(Trac #336, r3139)
......
......@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.59])
AC_INIT(bind10-devel, 20100701, bind10-dev@isc.org)
AC_INIT(bind10-devel, 20101013, bind10-dev@isc.org)
AC_CONFIG_SRCDIR(README)
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h])
......@@ -261,7 +261,6 @@ AC_ARG_WITH(gtest,
[ --with-gtest=PATH specify a path to gtest header files (PATH/include) and library (PATH/lib)],
gtest_path="$withval", gtest_path="no")
USE_LCOV="no"
if test "$lcov" != "no"; then
# force gtest if not set
......@@ -435,7 +434,7 @@ if test "X$ac_cv_have_devpoll" = "Xyes" -a "X$GXX" = "Xyes"; then
fi
AC_ARG_ENABLE(man, [AC_HELP_STRING([--enable-man],
[regenerate man pages [default=no]])] ,enable_man=yes, enable_man=no)
[regenerate man pages [default=no]])], enable_man=yes, enable_man=no)
AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
......@@ -472,6 +471,13 @@ AC_CONFIG_FILES([Makefile
src/bin/xfrout/tests/Makefile
src/bin/zonemgr/Makefile
src/bin/zonemgr/tests/Makefile
src/bin/stats/Makefile
src/bin/stats/tests/Makefile
src/bin/stats/tests/isc/Makefile
src/bin/stats/tests/isc/cc/Makefile
src/bin/stats/tests/isc/config/Makefile
src/bin/stats/tests/isc/util/Makefile
src/bin/stats/tests/testdata/Makefile
src/bin/usermgr/Makefile
src/bin/tests/Makefile
src/lib/Makefile
......@@ -491,6 +497,8 @@ AC_CONFIG_FILES([Makefile
src/lib/python/isc/config/tests/Makefile
src/lib/python/isc/log/Makefile
src/lib/python/isc/log/tests/Makefile
src/lib/python/isc/net/Makefile
src/lib/python/isc/net/tests/Makefile
src/lib/python/isc/notify/Makefile
src/lib/python/isc/notify/tests/Makefile
src/lib/config/Makefile
......@@ -515,7 +523,6 @@ AC_OUTPUT([src/bin/cfgmgr/b10-cfgmgr.py
src/bin/cmdctl/cmdctl.spec.pre
src/bin/xfrin/tests/xfrin_test
src/bin/xfrin/xfrin.py
src/bin/xfrin/xfrin.spec.pre
src/bin/xfrin/run_b10-xfrin.sh
src/bin/xfrout/xfrout.py
src/bin/xfrout/xfrout.spec.pre
......@@ -525,6 +532,12 @@ AC_OUTPUT([src/bin/cfgmgr/b10-cfgmgr.py
src/bin/zonemgr/zonemgr.spec.pre
src/bin/zonemgr/tests/zonemgr_test
src/bin/zonemgr/run_b10-zonemgr.sh
src/bin/stats/stats.py
src/bin/stats/stats_stub.py
src/bin/stats/stats.spec.pre
src/bin/stats/run_b10-stats.sh
src/bin/stats/run_b10-stats_stub.sh
src/bin/stats/tests/stats_test
src/bin/bind10/bind10.py
src/bin/bind10/tests/bind10_test
src/bin/bind10/run_bind10.sh
......@@ -558,6 +571,9 @@ AC_OUTPUT([src/bin/cfgmgr/b10-cfgmgr.py
chmod +x src/bin/xfrin/run_b10-xfrin.sh
chmod +x src/bin/xfrout/run_b10-xfrout.sh
chmod +x src/bin/zonemgr/run_b10-zonemgr.sh
chmod +x src/bin/stats/tests/stats_test
chmod +x src/bin/stats/run_b10-stats.sh
chmod +x src/bin/stats/run_b10-stats_stub.sh
chmod +x src/bin/bind10/run_bind10.sh
chmod +x src/bin/cmdctl/tests/cmdctl_test
chmod +x src/bin/xfrin/tests/xfrin_test
......
SUBDIRS = bind10 bindctl cfgmgr loadzone msgq host cmdctl auth xfrin xfrout \
usermgr zonemgr tests
usermgr zonemgr stats tests
check-recursive: all-recursive
......@@ -38,6 +38,7 @@
using namespace std;
using namespace isc;
using namespace isc::data;
using namespace isc::dns;
using namespace isc::xfr;
using namespace isc::bench;
......
......@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_builddir)/src/lib/dns -I$(top_srcdir)/src/bin
AM_CPPFLAGS += -I$(top_builddir)/src/lib/cc
AM_CPPFLAGS += -DTEST_DATA_DIR=\"$(srcdir)/testdata\"
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(top_builddir)/src/bin/auth/tests/testdata\"
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/bin/auth/tests/testdata\"
AM_CXXFLAGS = $(B10_CXXFLAGS)
......
......@@ -19,8 +19,7 @@
#include <dns/tests/unittest_util.h>
int
main(int argc, char* argv[])
{
main(int argc, char* argv[]) {
::testing::InitGoogleTest(&argc, argv);
isc::UnitTestUtil::addDataPath(TEST_DATA_DIR);
isc::UnitTestUtil::addDataPath(TEST_DATA_BUILDDIR);
......
......@@ -64,6 +64,7 @@ import posix
import isc.cc
import isc.util.process
import isc.net.parse
# Assign this process some longer name
isc.util.process.rename(sys.argv[0])
......@@ -73,6 +74,9 @@ isc.util.process.rename(sys.argv[0])
# number, and the overall BIND 10 version number (set in configure.ac).
VERSION = "bind10 20100916 (BIND 10 @PACKAGE_VERSION@)"
# This is for bind10.boottime of stats module
_BASETIME = time.gmtime()
class RestartSchedule:
"""
Keeps state when restarting something (in this case, a process).
......@@ -180,35 +184,10 @@ class ProcessInfo:
def respawn(self):
self._spawn()
class IPAddr:
"""Stores an IPv4 or IPv6 address."""
family = None
addr = None
def __init__(self, addr):
try:
a = socket.inet_pton(socket.AF_INET, addr)
self.family = socket.AF_INET
self.addr = a
return
except:
pass
try:
a = socket.inet_pton(socket.AF_INET6, addr)
self.family = socket.AF_INET6
self.addr = a
return
except Exception as e:
raise e
def __str__(self):
return socket.inet_ntop(self.family, self.addr)
class BoB:
"""Boss of BIND class."""
def __init__(self, msgq_socket_file=None, auth_port=5300, address='',
def __init__(self, msgq_socket_file=None, auth_port=5300, address=None,
nocache=False, verbose=False, setuid=None, username=None):
"""Initialize the Boss of BIND. This is a singleton (only one
can run).
......@@ -222,7 +201,7 @@ class BoB:
self.auth_port = auth_port
self.address = None
if address:
self.address = IPAddr(address)
self.address = address
self.cc_session = None
self.ccs = None
self.processes = {}
......@@ -424,6 +403,27 @@ class BoB:
sys.stdout.write("[bind10] Started b10-zonemgr(PID %d)\n" %
zonemgr.pid)
# start b10-stats
stats_args = ['b10-stats']
if self.verbose:
sys.stdout.write("[bind10] Starting b10-stats\n")
stats_args += ['-v']
try:
statsd = ProcessInfo("b10-stats", stats_args,
c_channel_env)
except Exception as e:
c_channel.process.kill()
bind_cfgd.process.kill()
xfrout.process.kill()
auth.process.kill()
xfrind.process.kill()
zonemgr.process.kill()
return "Unable to start b10-stats; " + str(e)
self.processes[statsd.pid] = statsd
if self.verbose:
sys.stdout.write("[bind10] Started b10-stats (PID %d)\n" % statsd.pid)
# start the b10-cmdctl
# XXX: we hardcode port 8080
cmdctl_args = ['b10-cmdctl']
......@@ -440,6 +440,7 @@ class BoB:
auth.process.kill()
xfrind.process.kill()
zonemgr.process.kill()
statsd.process.kill()
return "Unable to start b10-cmdctl; " + str(e)
self.processes[cmd_ctrld.pid] = cmd_ctrld
if self.verbose:
......@@ -453,12 +454,13 @@ class BoB:
def stop_all_processes(self):
"""Stop all processes."""
cmd = { "command": ['shutdown']}
self.cc_session.group_sendmsg(cmd, 'Boss', 'Cmdctl')
self.cc_session.group_sendmsg(cmd, "Boss", "ConfigManager")
self.cc_session.group_sendmsg(cmd, "Boss", "Auth")
self.cc_session.group_sendmsg(cmd, "Boss", "Xfrout")
self.cc_session.group_sendmsg(cmd, "Boss", "Xfrin")
self.cc_session.group_sendmsg(cmd, "Boss", "Zonemgr")
self.cc_session.group_sendmsg(cmd, 'Cmdctl', 'Cmdctl')
self.cc_session.group_sendmsg(cmd, "ConfigManager", "ConfigManager")
self.cc_session.group_sendmsg(cmd, "Auth", "Auth")
self.cc_session.group_sendmsg(cmd, "Xfrout", "Xfrout")
self.cc_session.group_sendmsg(cmd, "Xfrin", "Xfrin")
self.cc_session.group_sendmsg(cmd, "Zonemgr", "Zonemgr")
self.cc_session.group_sendmsg(cmd, "Boss", "Stats")
def stop_process(self, process):
"""Stop the given process, friendly-like."""
......@@ -475,7 +477,9 @@ class BoB:
except:
pass
# XXX: some delay probably useful... how much is uncertain
time.sleep(0.5)
# I have changed the delay from 0.5 to 1, but sometime it's
# still not enough.
time.sleep(1)
self.reap_children()
# next try sending a SIGTERM
processes_to_stop = list(self.processes.values())
......@@ -604,26 +608,24 @@ def fatal_signal(signal_number, stack_frame):
def check_port(option, opt_str, value, parser):
"""Function to insure that the port we are passed is actually
a valid port number. Used by OptionParser() on startup."""
if not re.match('^(6553[0-5]|655[0-2]\d|65[0-4]\d\d|6[0-4]\d{3}|[1-5]\d{4}|[1-9]\d{0,3}|0)$', value):
raise OptionValueError("%s requires a port number (0-65535)" % opt_str)
if (opt_str == '-m' or opt_str == '--msgq-port'):
parser.values.msgq_port = value
elif (opt_str == '-p' or opt_str == '--port'):
parser.values.auth_port = value
try:
if opt_str in ['-p', '--port']:
parser.values.auth_port = isc.net.parse.port_parse(value)
else:
raise OptionValueError("Unknown option " + opt_str)
except ValueError as e:
raise OptionValueError(str(e))
def check_addr(option, opt_str, value, parser):
"""Function to insure that the address we are passed is actually
a valid address. Used by OptionParser() on startup."""
try:
IPAddr(value)
except:
raise OptionValueError("%s requires a valid IPv4 or IPv6 address" % opt_str)
if (opt_str == '-a' or opt_str == '--address'):
parser.values.address = value
if opt_str in ['-a', '--address']:
parser.values.address = isc.net.parse.addr_parse(value)
else:
raise OptionValueError("Unknown option " + opt_str)
except ValueError:
raise OptionValueError("%s requires a valid IPv4 or IPv6 address" % opt_str)
def process_rename(option, opt_str, value, parser):
"""Function that renames the process if it is requested by a option."""
......@@ -646,8 +648,8 @@ def main():
help="UNIX domain socket file the b10-msgq daemon will use")
parser.add_option("-n", "--no-cache", action="store_true", dest="nocache",
default=False, help="disable hot-spot cache in b10-auth")
parser.add_option("-p", "--port", dest="auth_port", type="string",
action="callback", callback=check_port, default="5300",
parser.add_option("-p", "--port", dest="auth_port", type="int",
action="callback", callback=check_port, default=5300,
help="port the b10-auth daemon will use (default 5300)")
parser.add_option("-u", "--user", dest="user",
type="string", default=None,
......@@ -710,8 +712,11 @@ def main():
signal.signal(signal.SIGINT, fatal_signal)
signal.signal(signal.SIGTERM, fatal_signal)
# Block SIGPIPE, as we don't want it to end this process
signal.signal(signal.SIGPIPE, signal.SIG_IGN)
# Go bob!
boss_of_bind = BoB(options.msgq_socket_file, int(options.auth_port),
boss_of_bind = BoB(options.msgq_socket_file, options.auth_port,
options.address, options.nocache, options.verbose,
setuid, username)
startup_result = boss_of_bind.startup()
......@@ -720,6 +725,17 @@ def main():
sys.exit(1)
sys.stdout.write("[bind10] BIND 10 started\n")
# send "bind10.boot_time" to b10-stats
time.sleep(1) # wait a second
if options.verbose:
sys.stdout.write("[bind10] send \"bind10.boot_time\" to b10-stats\n")
cmd = isc.config.ccsession.create_command('set',
{ "stats_data": {
'bind10.boot_time': time.strftime('%Y-%m-%dT%H:%M:%SZ', _BASETIME)
}
})
boss_of_bind.cc_session.group_sendmsg(cmd, 'Stats')
# In our main loop, we check for dead processes or messages
# on the c-channel.
wakeup_fd = wakeup_pipe[0]
......
......@@ -20,7 +20,7 @@ export PYTHON_EXEC
BIND10_PATH=@abs_top_builddir@/src/bin/bind10
PATH=@abs_top_builddir@/src/bin/msgq:@abs_top_builddir@/src/bin/auth:@abs_top_builddir@/src/bin/cfgmgr:@abs_top_builddir@/src/bin/cmdctl:@abs_top_builddir@/src/bin/xfrin:@abs_top_builddir@/src/bin/xfrout:@abs_top_builddir@/src/bin/zonemgr:$PATH
PATH=@abs_top_builddir@/src/bin/msgq:@abs_top_builddir@/src/bin/auth:@abs_top_builddir@/src/bin/cfgmgr:@abs_top_builddir@/src/bin/cmdctl:@abs_top_builddir@/src/bin/stats:@abs_top_builddir@/src/bin/xfrin:@abs_top_builddir@/src/bin/xfrout:@abs_top_builddir@/src/bin/zonemgr:$PATH
export PATH
PYTHONPATH=@abs_top_builddir@/src/lib/python:@abs_top_builddir@/src/lib/dns/python/.libs:@abs_top_builddir@/src/lib/xfr/.libs
......
from bind10 import ProcessInfo, BoB, IPAddr
from bind10 import ProcessInfo, BoB
# XXX: environment tests are currently disabled, due to the preprocessor
# setup that we have now complicating the environment
......@@ -8,6 +8,7 @@ import sys
import os
import signal
import socket
from isc.net.addr import IPAddr
class TestProcessInfo(unittest.TestCase):
def setUp(self):
......@@ -72,28 +73,6 @@ class TestProcessInfo(unittest.TestCase):
self.assertTrue(type(pi.pid) is int)
self.assertNotEqual(pi.pid, old_pid)
class TestIPAddr(unittest.TestCase):
def test_v6ok(self):
addr = IPAddr('2001:4f8::1')
self.assertEqual(addr.family, socket.AF_INET6)
self.assertEqual(addr.addr, socket.inet_pton(socket.AF_INET6, '2001:4f8::1'))
def test_v4ok(self):
addr = IPAddr('127.127.127.127')
self.assertEqual(addr.family, socket.AF_INET)
self.assertEqual(addr.addr, socket.inet_aton('127.127.127.127'))
def test_badaddr(self):
self.assertRaises(socket.error, IPAddr, 'foobar')
self.assertRaises(socket.error, IPAddr, 'foo::bar')
self.assertRaises(socket.error, IPAddr, '123')
self.assertRaises(socket.error, IPAddr, '123.456.789.0')
self.assertRaises(socket.error, IPAddr, '127/8')
self.assertRaises(socket.error, IPAddr, '0/0')
self.assertRaises(socket.error, IPAddr, '1.2.3.4/32')
self.assertRaises(socket.error, IPAddr, '0')
self.assertRaises(socket.error, IPAddr, '')
class TestBoB(unittest.TestCase):
def test_init(self):
bob = BoB()
......@@ -127,7 +106,7 @@ class TestBoB(unittest.TestCase):
self.assertEqual(bob.runnable, False)
def test_init_alternate_address(self):
bob = BoB(None, 5300, '127.127.127.127')
bob = BoB(None, 5300, IPAddr('127.127.127.127'))
self.assertEqual(bob.verbose, False)
self.assertEqual(bob.auth_port, 5300)
self.assertEqual(bob.msgq_socket_file, None)
......
#!@PYTHON@
# Copyright (C) 2010 Internet Systems Consortium.
# Copyright (C) 2010 CZ NIC
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
......@@ -43,8 +44,11 @@ import time
import signal
from isc.config import ccsession
import isc.util.process
import isc.net.parse
from optparse import OptionParser, OptionValueError
from hashlib import sha1
from isc.util import socketserver_mixin
try:
import threading
except ImportError:
......@@ -323,7 +327,7 @@ class CommandControl():
def _handle_msg_from_msgq(self):
'''Process all the received commands with module session. '''
while self._serving:
self._module_cc.check_command()
self._module_cc.check_command(False)
def _parse_command_result(self, rcode, reply):
'''Ignore the error reason when command rcode isn't 0, '''
......@@ -439,7 +443,9 @@ class CommandControl():
return (keyfile, certfile, accountsfile)
class SecureHTTPServer(socketserver.ThreadingMixIn, http.server.HTTPServer):
class SecureHTTPServer(socketserver_mixin.NoPollMixIn,
socketserver.ThreadingMixIn,
http.server.HTTPServer):
'''Make the server address can be reused.'''
allow_reuse_address = True
......@@ -447,6 +453,7 @@ class SecureHTTPServer(socketserver.ThreadingMixIn, http.server.HTTPServer):
CommandControlClass,
idle_timeout = 1200, verbose = False):
'''idle_timeout: the max idle time for login'''
socketserver_mixin.NoPollMixIn.__init__(self)
try:
http.server.HTTPServer.__init__(self, server_address, RequestHandlerClass)
except socket.error as err:
......@@ -564,22 +571,17 @@ def run(addr = 'localhost', port = 8080, idle_timeout = 1200, verbose = False):
httpd.serve_forever()
def check_port(option, opt_str, value, parser):
if (value < 0) or (value > 65535):
raise OptionValueError('%s requires a port number (0-65535)' % opt_str)
parser.values.port = value
try:
parser.values.port = isc.net.parse.port_parse(value)
except ValueError as e:
raise OptionValueError(str(e))
def check_addr(option, opt_str, value, parser):
ipstr = value
ip_family = socket.AF_INET
if (ipstr.find(':') != -1):
ip_family = socket.AF_INET6
try:
socket.inet_pton(ip_family, ipstr)
except:
raise OptionValueError("%s invalid ip address" % ipstr)
isc.net.parse.addr_parse(value)
parser.values.addr = value
except ValueError as e:
raise OptionValueError(str(e))
def set_cmd_options(parser):
parser.add_option('-p', '--port', dest = 'port', type = 'int',
......
Error reading zone file: Cannot parse RR, No $ORIGIN: @ IN SOA ns hostmaster 1 3600 1800 1814400 3600
Error reading zone file: $ORIGIN is not absolute in record:$ORIGIN com
Error reading zone file: $ORIGIN is not absolute in record: $ORIGIN com
Error reading zone file: Cannot parse RR: $TL 300
Error reading zone file: Cannot parse RR: $OIGIN com.
Error loading database: Error while loading com.: Cannot parse RR: $INLUDE file.txt
......
SUBDIRS = tests
pkglibexecdir = $(libexecdir)/@PACKAGE@
pkglibexec_SCRIPTS = b10-stats
noinst_SCRIPTS = b10-stats_stub
b10_statsdir = $(DESTDIR)$(pkgdatadir)
b10_stats_DATA = stats.spec
CLEANFILES = stats.spec b10-stats stats.pyc stats.pyo b10-stats_stub stats_stub.pyc stats_stub.pyo
man_MANS = b10-stats.8
EXTRA_DIST = $(man_MANS) b10-stats.xml
if ENABLE_MAN
b10-stats.8: b10-stats.xml
xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-stats.xml
endif
stats.spec: stats.spec.pre
$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" stats.spec.pre >$@
# TODO: does this need $$(DESTDIR) also?
# this is done here since configure.ac AC_OUTPUT doesn't expand exec_prefix
b10-stats: stats.py
$(SED) -e "s|@@PYTHONPATH@@|@pyexecdir@|" \
-e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" \
-e "s|.*#@@REMOVED@@$$||" stats.py >$@
chmod a+x $@
b10-stats_stub: stats_stub.py stats.py
$(SED) -e "s|@@PYTHONPATH@@|@pyexecdir@|" \
-e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" stats_stub.py >$@
chmod a+x $@
'\" t
.\" Title: b10-stats
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: Oct 15, 2010
.\" Manual: BIND10
.\" Source: BIND10
.\" Language: English
.\"
.TH "B10\-STATS" "8" "Oct 15, 2010" "BIND10" "BIND10"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
b10-stats \- BIND 10 statistics module
.SH "SYNOPSIS"
.HP \w'\fBb10\-stats\fR\ 'u
\fBb10\-stats\fR [\fB\-v\fR] [\fB\-\-verbose\fR]
.SH "DESCRIPTION"
.PP
The
\fBb10\-stats\fR
is a daemon forked by
\fBbind10\fR\&. Stats module collects statistics data from each module and reports statistics information via
\fBbindctl\fR\&. It communicates by using the Command Channel by
\fBb10\-msgq\fR
with other modules like
\fBbind10\fR,
\fBb10\-auth\fR
and so on\&. It waits for coming data from other modules, then other modules send data to stats module periodically\&. Other modules send stats data to stats module independently from implementation of stats module, so the frequency of sending data may not be constant\&. Stats module collects data and aggregates it\&.
.SH "OPTIONS"
.PP
The arguments are as follows:
.PP
\fB\-v\fR, \fB\-\-verbose\fR
.RS 4
This
\fBb10\-stats\fR
switches to verbose mode\&. It sends verbose messages to STDOUT\&.
.RE
.SH "FILES"
.PP
/usr/local/share/bind10\-devel/stats\&.spec
\(em This is a spec file for
\fBb10\-stats\fR\&. It contains definitions of statistics items of BIND 10 and commands received vi bindctl\&.
.SH "SEE ALSO"
.PP
\fBbind10\fR(8),
\fBbindctl\fR(1),
\fBb10-auth\fR(8),
BIND 10 Guide\&.
.SH "HISTORY"
.PP
The
\fBb10\-stats\fR
daemon was initially designed and implemented by Naoki Kambe of JPRS in Oct 2010\&.
.SH "COPYRIGHT"
.br
Copyright \(co 2010 Internet Systems Consortium, Inc. ("ISC")
.br
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC")
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,