[svn] commit: r2195 - in /branches/trac191: ./ src/bin/ src/bin/bind10/ src/bin/stats/ src/bin/stats/tests/
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Jun 21 08:34:06 UTC 2010
Author: naokikambe
Date: Mon Jun 21 08:34:06 2010
New Revision: 2195
Log:
committed a initial simple stats module
- works with existent other modules (Boss, ConfigManager, bindctl)
- pushes statistics of itself as report time, timestamp, boot time and
localname, but does not pull out information from other modules
- supports commands shutdown, status, show and statsspec with no
arguments
- integrated with configure and Makefile of trunk(r2193) and tested
building successfully with other modules
- can switch to debug mode
- with skeleton docbook XML and manpage generated by XSL Stylesheets
- with testing codes that make check works
- with stats.spec which statistics items are defined in
- output format via bindctl is python dictionary type only
- followed from coding style and directory structure of existent codes
Added:
branches/trac191/src/bin/stats/Makefile.am
branches/trac191/src/bin/stats/b10-stats.8
branches/trac191/src/bin/stats/b10-stats.xml
branches/trac191/src/bin/stats/run_b10-stats.sh.in
branches/trac191/src/bin/stats/stats.py.in
branches/trac191/src/bin/stats/stats.spec.pre.in
branches/trac191/src/bin/stats/tests/
branches/trac191/src/bin/stats/tests/Makefile.am
branches/trac191/src/bin/stats/tests/b10-stats_test.py
branches/trac191/src/bin/stats/tests/stats_test.in
branches/trac191/src/bin/stats/tests/unittest_fakesession.py
- copied, changed from r2194, trunk/src/lib/python/isc/config/tests/unittest_fakesession.py
Modified:
branches/trac191/configure.ac
branches/trac191/src/bin/Makefile.am
branches/trac191/src/bin/bind10/bind10.py.in
Modified: branches/trac191/configure.ac
==============================================================================
--- branches/trac191/configure.ac (original)
+++ branches/trac191/configure.ac Mon Jun 21 08:34:06 2010
@@ -404,6 +404,8 @@
src/bin/xfrin/tests/Makefile
src/bin/xfrout/Makefile
src/bin/xfrout/tests/Makefile
+ src/bin/stats/Makefile
+ src/bin/stats/tests/Makefile
src/bin/usermgr/Makefile
src/lib/Makefile
src/lib/cc/Makefile
@@ -436,6 +438,10 @@
src/bin/xfrout/xfrout.spec.pre
src/bin/xfrout/tests/xfrout_test
src/bin/xfrout/run_b10-xfrout.sh
+ src/bin/stats/stats.py
+ src/bin/stats/stats.spec.pre
+ src/bin/stats/run_b10-stats.sh
+ src/bin/stats/tests/stats_test
src/bin/bind10/bind10.py
src/bin/bind10/tests/bind10_test
src/bin/bind10/run_bind10.sh
@@ -462,6 +468,8 @@
chmod +x src/bin/cmdctl/run_b10-cmdctl.sh
chmod +x src/bin/xfrin/run_b10-xfrin.sh
chmod +x src/bin/xfrout/run_b10-xfrout.sh
+ chmod +x src/bin/stats/tests/stats_test
+ chmod +x src/bin/stats/run_b10-stats.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
Modified: branches/trac191/src/bin/Makefile.am
==============================================================================
--- branches/trac191/src/bin/Makefile.am (original)
+++ branches/trac191/src/bin/Makefile.am Mon Jun 21 08:34:06 2010
@@ -1,1 +1,1 @@
-SUBDIRS = bind10 bindctl cfgmgr loadzone msgq host cmdctl auth xfrin xfrout usermgr
+SUBDIRS = bind10 bindctl cfgmgr loadzone msgq host cmdctl auth xfrin xfrout usermgr stats
Modified: branches/trac191/src/bin/bind10/bind10.py.in
==============================================================================
--- branches/trac191/src/bin/bind10/bind10.py.in (original)
+++ branches/trac191/src/bin/bind10/bind10.py.in Mon Jun 21 08:34:06 2010
@@ -326,6 +326,26 @@
if self.verbose:
sys.stdout.write("[bind10] Started b10-xfrin (PID %d)\n" % xfrind.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()
+ 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']
@@ -341,6 +361,7 @@
xfrout.process.kill()
auth.process.kill()
xfrind.process.kill()
+ statsd.process.kill()
return "Unable to start b10-cmdctl; " + str(e)
self.processes[cmd_ctrld.pid] = cmd_ctrld
if self.verbose:
@@ -358,6 +379,7 @@
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", "Stats")
def stop_process(self, process):
"""Stop the given process, friendly-like."""
More information about the bind10-changes
mailing list