BIND 10 trac547, updated. a2bf4e3f087041001b8ad32f501773ad135ca494 [trac547] change configure.ac for module "b10-stats-httpd"
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Feb 9 08:52:59 UTC 2011
The branch, trac547 has been updated
via a2bf4e3f087041001b8ad32f501773ad135ca494 (commit)
via 6261081d08a139ed716325998f95f2102f889e2d (commit)
via b68c14cb52b06f304f9420b38dd8bcf9541a5062 (commit)
from a8ec50521ec264c6f1177654048627338f111cd4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a2bf4e3f087041001b8ad32f501773ad135ca494
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Thu Feb 3 20:40:51 2011 +0900
[trac547] change configure.ac for module "b10-stats-httpd"
commit 6261081d08a139ed716325998f95f2102f889e2d
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Thu Feb 3 20:40:51 2011 +0900
[trac547] add mocked-up module "b10-stats-httpd" for HTTP/XML interface
commit b68c14cb52b06f304f9420b38dd8bcf9541a5062
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Thu Feb 3 20:40:51 2011 +0900
[trac547] add mocked-up module "b10-stats-httpd" for HTTP/XML interface
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 3 +
src/bin/stats/b10-stats-httpd.8 | 67 +++++++++++
.../stats/{b10-stats.xml => b10-stats-httpd.xml} | 50 +++------
...n_b10-stats.sh.in => run_b10-stats-httpd.sh.in} | 4 +-
src/bin/stats/stats-httpd-xml.tpl | 33 ++++++
src/bin/stats/stats-httpd-xsd.tpl | 116 ++++++++++++++++++++
src/bin/stats/stats-httpd-xsl.tpl | 114 +++++++++++++++++++
.../isc/util/process.py => stats_httpd.py.in} | 18 +++-
src/bin/stats/stats_httpd.spec.pre.in | 11 ++
.../tests/b10-stats-httpd_test.py} | 25 +++--
src/bin/stats/tests/stats_test.in | 1 +
11 files changed, 391 insertions(+), 51 deletions(-)
create mode 100644 src/bin/stats/b10-stats-httpd.8
copy src/bin/stats/{b10-stats.xml => b10-stats-httpd.xml} (54%)
copy src/bin/stats/{run_b10-stats.sh.in => run_b10-stats-httpd.sh.in} (92%)
create mode 100644 src/bin/stats/stats-httpd-xml.tpl
create mode 100644 src/bin/stats/stats-httpd-xsd.tpl
create mode 100644 src/bin/stats/stats-httpd-xsl.tpl
copy src/bin/stats/{tests/isc/util/process.py => stats_httpd.py.in} (73%)
create mode 100644 src/bin/stats/stats_httpd.spec.pre.in
copy src/bin/{cmdctl/tests/cmdctl_test.in => stats/tests/b10-stats-httpd_test.py} (71%)
-----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 2e60b9a..cb9c8b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -733,8 +733,10 @@ AC_OUTPUT([doc/version.ent
src/bin/zonemgr/tests/zonemgr_test
src/bin/zonemgr/run_b10-zonemgr.sh
src/bin/stats/stats.py
+ src/bin/stats/stats_httpd.py
src/bin/stats/stats.spec.pre
src/bin/stats/run_b10-stats.sh
+ src/bin/stats/run_b10-stats-httpd.sh
src/bin/stats/tests/stats_test
src/bin/bind10/bind10.py
src/bin/bind10/tests/bind10_test
@@ -772,6 +774,7 @@ AC_OUTPUT([doc/version.ent
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-httpd.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
diff --git a/src/bin/stats/b10-stats-httpd.8 b/src/bin/stats/b10-stats-httpd.8
new file mode 100644
index 0000000..e9c0eef
--- /dev/null
+++ b/src/bin/stats/b10-stats-httpd.8
@@ -0,0 +1,67 @@
+'\" t
+.\" Title: b10-stats-httpd
+.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\" Date: Mar xx, 2011
+.\" Manual: BIND10
+.\" Source: BIND10
+.\" Language: English
+.\"
+.TH "B10\-STATS\-HTTPD" "8" "Mar xx, 2011" "BIND10" "BIND10"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+b10-stats-httpd \- BIND 10 HTTP/XML interface for statistics module
+.SH "SYNOPSIS"
+.HP \w'\fBb10\-stats\-httpd\fR\ 'u
+\fBb10\-stats\-httpd\fR [\fB\-v\fR] [\fB\-\-verbose\fR]
+.SH "DESCRIPTION"
+.PP
+The
+\fBb10\-stats\-httpd\fR
+is HTTP/XML interface for statistics module\&. \&.\&.\&.\&.
+.SH "OPTIONS"
+.PP
+The arguments are as follows:
+.PP
+\fB\-v\fR, \fB\-\-verbose\fR
+.RS 4
+This
+\fBb10\-stats\-httpd\fR
+switches to verbose mode\&. It sends verbose messages to STDOUT\&.
+.RE
+.SH "FILES"
+.PP
+/path/to/file
+\(em This is a file for \&.\&.
+.SH "SEE ALSO"
+.PP
+
+\fBb10-stats\fR(8),
+BIND 10 Guide\&.
+.SH "HISTORY"
+.PP
+The
+\fBb10\-stats\-httpd\fR
+was designed and implemented by Naoki Kambe of JPRS in Mar 2011\&.
+.SH "COPYRIGHT"
+.br
+Copyright \(co 2011 Internet Systems Consortium, Inc. ("ISC")
+.br
diff --git a/src/bin/stats/b10-stats-httpd.xml b/src/bin/stats/b10-stats-httpd.xml
new file mode 100644
index 0000000..09f25df
--- /dev/null
+++ b/src/bin/stats/b10-stats-httpd.xml
@@ -0,0 +1,104 @@
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+ [<!ENTITY mdash "—">]>
+<!--
+ - Copyright (C) 2011 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,
+ - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ - PERFORMANCE OF THIS SOFTWARE.
+-->
+
+<refentry>
+
+ <refentryinfo>
+ <date>Mar xx, 2011</date>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>b10-stats-httpd</refentrytitle>
+ <manvolnum>8</manvolnum>
+ <refmiscinfo>BIND10</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>b10-stats-httpd</refname>
+ <refpurpose>BIND 10 HTTP/XML interface for statistics module</refpurpose>
+ </refnamediv>
+
+ <docinfo>
+ <copyright>
+ <year>2011</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ </docinfo>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>b10-stats-httpd</command>
+ <arg><option>-v</option></arg>
+ <arg><option>--verbose</option></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>DESCRIPTION</title>
+ <para>
+ The <command>b10-stats-httpd</command> is HTTP/XML interface for
+ statistics module. ....
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>OPTIONS</title>
+ <para>The arguments are as follows:</para>
+ <variablelist>
+ <varlistentry>
+ <term><option>-v</option>, <option>--verbose</option></term>
+ <listitem>
+ <para>
+ This <command>b10-stats-httpd</command> switches to verbose
+ mode. It sends verbose messages to STDOUT.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>FILES</title>
+ <para><filename>/path/to/file</filename>
+ — This is a file for ..
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>SEE ALSO</title>
+ <para>
+ <citerefentry>
+ <refentrytitle>b10-stats</refentrytitle><manvolnum>8</manvolnum>
+ </citerefentry>,
+ <citetitle>BIND 10 Guide</citetitle>.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>HISTORY</title>
+ <para>
+ The <command>b10-stats-httpd</command> was designed
+ and implemented by Naoki Kambe of JPRS in Mar 2011.
+ </para>
+ </refsect1>
+</refentry><!--
+ - Local variables:
+ - mode: sgml
+ - End:
+-->
diff --git a/src/bin/stats/run_b10-stats-httpd.sh.in b/src/bin/stats/run_b10-stats-httpd.sh.in
new file mode 100644
index 0000000..273a96b
--- /dev/null
+++ b/src/bin/stats/run_b10-stats-httpd.sh.in
@@ -0,0 +1,33 @@
+#! /bin/sh
+
+# Copyright (C) 2011 Internet Systems Consortium.
+#
+# Permission to use, copy, modify, and 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 INTERNET SYSTEMS CONSORTIUM
+# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+# INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+PYTHON_EXEC=${PYTHON_EXEC:- at PYTHON@}
+export PYTHON_EXEC
+
+PYTHONPATH=@abs_top_builddir@/src/lib/python
+export PYTHONPATH
+
+BIND10_MSGQ_SOCKET_FILE=@abs_top_builddir@/msgq_socket
+export BIND10_MSGQ_SOCKET_FILE
+
+B10_FROM_BUILD=@abs_top_builddir@
+export B10_FROM_BUILD
+
+STATS_PATH=@abs_top_builddir@/src/bin/stats
+
+cd ${STATS_PATH}
+exec ${PYTHON_EXEC} -O b10-stats-httpd "$@"
diff --git a/src/bin/stats/stats-httpd-xml.tpl b/src/bin/stats/stats-httpd-xml.tpl
new file mode 100644
index 0000000..f9e6572
--- /dev/null
+++ b/src/bin/stats/stats-httpd-xml.tpl
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="bind10-statistics.xsl"?>
+<!--
+ - Copyright (C) 2011 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,
+ - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ - PERFORMANCE OF THIS SOFTWARE.
+-->
+
+<!-- $Id$ -->
+<stats:stats_data version="1.0"
+ xmlns:stats="http://bind10.isc.org/xsd/bind10-statistics"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://bind10.isc.org/xsd/bind10-statistics bind10-statistics.xsd">
+ <report_time>2011-01-25T11:47:56Z</report_time>
+ <bind10.boot_time>2011-01-25T11:47:45Z</bind10.boot_time>
+ <stats.boot_time>2011-01-25T11:47:45Z</stats.boot_time>
+ <stats.start_time>2011-01-25T11:47:47Z</stats.start_time>
+ <stats.last_update_time>2011-01-25T11:47:56Z</stats.last_update_time>
+ <stats.timestamp>1295956076.705266</stats.timestamp>
+ <stats.lname>4d3eb863_d at covm</stats.lname>
+ <auth.queries.tcp>123</auth.queries.tcp>
+ <auth.queries.ucp>456</auth.queries.ucp>
+</stats:stats_data>
diff --git a/src/bin/stats/stats-httpd-xsd.tpl b/src/bin/stats/stats-httpd-xsd.tpl
new file mode 100644
index 0000000..774785e
--- /dev/null
+++ b/src/bin/stats/stats-httpd-xsd.tpl
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - Copyright (C) 2011 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,
+ - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ - PERFORMANCE OF THIS SOFTWARE.
+-->
+
+<!-- $Id$ -->
+<schema targetNamespace="http://bind10.isc.org/xsd/bind10-statistics"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:stats="http://bind10.isc.org/xsd/bind10-statistics">
+ <annotation>
+ <documentation xml:lang="en">XML schema of the statistics
+ data in BIND 10</documentation>
+ </annotation>
+ <element name="stats_data">
+ <annotation>
+ <documentation>A set of statistics data</documentation>
+ </annotation>
+ <complexType>
+ <all>
+ <element name="report_time" type="dateTime" minOccurs="1"
+ maxOccurs="1">
+ <annotation>
+ <appinfo>Report time</appinfo>
+ <documentation>A date time when stats module reports
+ </documentation>
+ </annotation>
+ </element>
+ <element name="bind10.boot_time" type="dateTime"
+ minOccurs="1" maxOccurs="1">
+ <annotation>
+ <appinfo>stats.BootTime</appinfo>
+ <documentation>A date time when bind10 process starts
+ initially</documentation>
+ </annotation>
+ </element>
+ <element name="stats.boot_time" type="dateTime"
+ minOccurs="1" maxOccurs="1">
+ <annotation>
+ <appinfo>stats.BootTime</appinfo>
+ <documentation>A date time when the stats module starts
+ initially or when the stats module restarts
+ </documentation>
+ </annotation>
+ </element>
+ <element name="stats.start_time" type="dateTime"
+ minOccurs="1" maxOccurs="1">
+ <annotation>
+ <appinfo>stats.StartTime</appinfo>
+ <documentation>A date time when the stats module starts
+ collecting data or resetting values last time
+ </documentation>
+ </annotation>
+ </element>
+ <element name="stats.last_update_time" type="dateTime"
+ minOccurs="1" maxOccurs="1">
+ <annotation>
+ <appinfo>stats.LastUpdateTime</appinfo>
+ <documentation>The latest date time when the stats module
+ receives from other modules like auth server or boss
+ process and so on</documentation>
+ </annotation>
+ </element>
+ <element name="stats.timestamp" type="float" minOccurs="1"
+ maxOccurs="1">
+ <annotation>
+ <appinfo>stats.Timestamp</appinfo>
+ <documentation>A current time stamp since epoch time
+ (1970-01-01T00:00:00Z)</documentation>
+ </annotation>
+ </element>
+ <element name="stats.lname" type="string" minOccurs="1" maxOccurs="1">
+ <annotation>
+ <appinfo>stats.LocalName</appinfo>
+ <documentation>A localname of stats module given via CC
+ protocol</documentation>
+ </annotation>
+ </element>
+ <element name="auth.queries.tcp" type="integer"
+ minOccurs="1" maxOccurs="1">
+ <annotation>
+ <appinfo>auth.queries.tcp</appinfo>
+ <documentation>A number of total query counts which all auth
+ servers receive over TCP since they started initially
+ </documentation>
+ </annotation>
+ </element>
+ <element name="auth.queries.ucp" type="integer"
+ minOccurs="1" maxOccurs="1">
+ <annotation>
+ <appinfo>auth.queries.udp</appinfo>
+ <documentation>A number of total query counts which all auth
+ servers receive over UDP since they started initially
+ </documentation>
+ </annotation>
+ </element>
+ </all>
+ <attribute name="version" type="token" use="optional" default="1.0">
+ <annotation>
+ <documentation>Version number of syntax</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+</schema>
diff --git a/src/bin/stats/stats-httpd-xsl.tpl b/src/bin/stats/stats-httpd-xsl.tpl
new file mode 100644
index 0000000..1e4f9af
--- /dev/null
+++ b/src/bin/stats/stats-httpd-xsl.tpl
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - Copyright (C) 2011 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,
+ - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ - PERFORMANCE OF THIS SOFTWARE.
+-->
+
+<!-- $Id$ -->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:stats="http://bind10.isc.org/xsd/bind10-statistics">
+ <xsl:output method="html" encoding="UTF-8"
+ doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
+ doctype-system=" http://www.w3.org/TR/html4/loose.dtd " />
+ <xsl:template match="/">
+ <html lang="en">
+ <head>
+ <title>BIND 10 Statistics</title>
+ <style type="text/css"><![CDATA[
+table {
+ border: 1px #000000 solid;
+ border-collapse: collapse;
+}
+td, th {
+ padding: 3px 20px;
+ border: 1px #000000 solid;
+}
+]]>
+ </style>
+ </head>
+ <body>
+ <h1>BIND 10 Statistics</h1>
+ <table>
+ <tr>
+ <th>Title</th>
+ <th>Value</th>
+ </tr>
+ <xsl:apply-templates />
+ </table>
+ </body>
+ </html>
+ </xsl:template>
+ <xsl:template match="*">
+ <tr>
+ <td title="A date time when stats module reports">Report time</td>
+ <td>
+ <xsl:value-of select="report_time" />
+ </td>
+ </tr>
+ <tr>
+ <td title="A date time when bind10 process starts initially">stats.BootTime</td>
+ <td>
+ <xsl:value-of select="bind10.boot_time" />
+ </td>
+ </tr>
+ <tr>
+ <td
+ title="A date time when the stats module starts initially or when the stats module restarts">stats.BootTime</td>
+ <td>
+ <xsl:value-of select="stats.boot_time" />
+ </td>
+ </tr>
+ <tr>
+ <td
+ title="A date time when the stats module starts collecting data or resetting values last time">stats.StartTime</td>
+ <td>
+ <xsl:value-of select="stats.start_time" />
+ </td>
+ </tr>
+ <tr>
+ <td
+ title="The latest date time when the stats module receives from other modules like auth server or boss process and so on">stats.LastUpdateTime</td>
+ <td>
+ <xsl:value-of select="stats.last_update_time" />
+ </td>
+ </tr>
+ <tr>
+ <td title="A current time stamp since epoch time (1970-01-01T00:00:00Z)">stats.Timestamp</td>
+ <td>
+ <xsl:value-of select="stats.timestamp" />
+ </td>
+ </tr>
+ <tr>
+ <td title="A localname of stats module given via CC protocol">stats.LocalName</td>
+ <td>
+ <xsl:value-of select="stats.lname" />
+ </td>
+ </tr>
+ <tr>
+ <td
+ title="A number of total query counts which all auth servers receive over TCP since they started initially">auth.queries.tcp</td>
+ <td>
+ <xsl:value-of select="auth.queries.tcp" />
+ </td>
+ </tr>
+ <tr>
+ <td
+ title="A number of total query counts which all auth servers receive over UDP since they started initially">auth.queries.udp</td>
+ <td>
+ <xsl:value-of select="auth.queries.ucp" />
+ </td>
+ </tr>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/src/bin/stats/stats_httpd.py.in b/src/bin/stats/stats_httpd.py.in
new file mode 100644
index 0000000..b43aba4
--- /dev/null
+++ b/src/bin/stats/stats_httpd.py.in
@@ -0,0 +1,28 @@
+#!@PYTHON@
+
+# Copyright (C) 2011 Internet Systems Consortium.
+#
+# Permission to use, copy, modify, and 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 INTERNET SYSTEMS CONSORTIUM
+# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+# INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+__version__ = "$Revision$"
+
+import sys; sys.path.append ('@@PYTHONPATH@@')
+import time
+
+# for setproctitle
+import isc.util.process
+isc.util.process.rename()
+
+if __name__ == "__main__":
+ time.sleep(999999)
diff --git a/src/bin/stats/stats_httpd.spec.pre.in b/src/bin/stats/stats_httpd.spec.pre.in
new file mode 100644
index 0000000..7f27d74
--- /dev/null
+++ b/src/bin/stats/stats_httpd.spec.pre.in
@@ -0,0 +1,11 @@
+{
+ "module_spec": {
+ "module_name": "StatsHttpd",
+ "module_description": "Stats HTTP daemon",
+ "config_data": [
+ {}
+ ],
+ "commands": [
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/bin/stats/tests/b10-stats-httpd_test.py b/src/bin/stats/tests/b10-stats-httpd_test.py
new file mode 100644
index 0000000..fe809ea
--- /dev/null
+++ b/src/bin/stats/tests/b10-stats-httpd_test.py
@@ -0,0 +1,32 @@
+# Copyright (C) 2011 Internet Systems Consortium.
+#
+# Permission to use, copy, modify, and 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 INTERNET SYSTEMS CONSORTIUM
+# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+# INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+__version__ = "$Revision$"
+
+import unittest
+
+class TestStats(unittest.TestCase):
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def test_dummy(self):
+ self.assertEqual(1, 1)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/src/bin/stats/tests/stats_test.in b/src/bin/stats/tests/stats_test.in
index f7d9d46..579ab57 100644
--- a/src/bin/stats/tests/stats_test.in
+++ b/src/bin/stats/tests/stats_test.in
@@ -28,3 +28,4 @@ TEST_PATH=@abs_top_srcdir@/src/bin/stats/tests
cd ${TEST_PATH}
${PYTHON_EXEC} -O b10-stats_test.py $*
+${PYTHON_EXEC} -O b10-stats-httpd_test.py $*
More information about the bind10-changes
mailing list