2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-04 00:25:29 +00:00

830. [func] Implement 'rndc status'.

This commit is contained in:
Brian Wellington
2001-05-14 20:44:16 +00:00
parent 751aa24c98
commit 50097b38c0
4 changed files with 26 additions and 19 deletions

View File

@@ -1,4 +1,6 @@
830. [func] Implement 'rndc status'.
829. [bug] The DNS_R_ZONECUT result code is only meaningful 829. [bug] The DNS_R_ZONECUT result code is only meaningful
for secure zone databases. Queries at zone cut points for secure zone databases. Queries at zone cut points
in non-secure zones should always return a delegation. in non-secure zones should always return a delegation.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: server.c,v 1.325 2001/05/14 19:06:40 bwelling Exp $ */ /* $Id: server.c,v 1.326 2001/05/14 20:44:10 bwelling Exp $ */
#include <config.h> #include <config.h>
@@ -841,11 +841,9 @@ create_bind_view(dns_view_t **viewp) {
return (result); return (result);
} }
/* /*
* Create the zone that handles queries for "version.bind. CH". The * Create the zone that handles queries for "version.bind. CH". The
* version string returned either from the "version" configuration * version string is returned either from the "version" configuration
* option or the global defaults. * option or the global defaults.
*/ */
static isc_result_t static isc_result_t
@@ -924,9 +922,8 @@ create_version_zone(cfg_obj_t **maps, dns_zonemgr_t *zmgr, dns_view_t *view) {
} }
/* /*
* Create the special view that handles queries for * Create the special zone that handles queries for "authors.bind. CH".
* "authors.bind. CH". The strings returned list * The strings returned list the BIND 9 authors.
* the BIND 9 authors.
*/ */
static isc_result_t static isc_result_t
create_authors_zone(cfg_obj_t *options, dns_zonemgr_t *zmgr, dns_view_t *view) create_authors_zone(cfg_obj_t *options, dns_zonemgr_t *zmgr, dns_view_t *view)
@@ -2781,18 +2778,16 @@ ns_server_flushcache(ns_server_t *server) {
isc_result_t isc_result_t
ns_server_status(ns_server_t *server, isc_buffer_t *text) { ns_server_status(ns_server_t *server, isc_buffer_t *text) {
dns_view_t *view; int zonecount, xferrunning, xferdeferred, soaqueries;
int zonecount = 0;
int xferrunning = 0;
int xferdeferred = 0;
int n; int n;
isc_result_t result;
zonecount = dns_zonemgr_getcount(server->zonemgr, DNS_ZONESTATE_ANY); zonecount = dns_zonemgr_getcount(server->zonemgr, DNS_ZONESTATE_ANY);
xferrunning = dns_zonemgr_getcount(server->zonemgr, xferrunning = dns_zonemgr_getcount(server->zonemgr,
DNS_ZONESTATE_XFERRUNNING); DNS_ZONESTATE_XFERRUNNING);
xferdeferred = dns_zonemgr_getcount(server->zonemgr, xferdeferred = dns_zonemgr_getcount(server->zonemgr,
DNS_ZONESTATE_XFERDEFERRED); DNS_ZONESTATE_XFERDEFERRED);
soaqueries = dns_zonemgr_getcount(server->zonemgr,
DNS_ZONESTATE_SOAQUERY);
n = snprintf((char *)isc_buffer_used(text), n = snprintf((char *)isc_buffer_used(text),
isc_buffer_availablelength(text), isc_buffer_availablelength(text),
"number of zones: %d\n" "number of zones: %d\n"
@@ -2803,8 +2798,7 @@ ns_server_status(ns_server_t *server, isc_buffer_t *text) {
"query logging is %s\n" "query logging is %s\n"
"server is up and running", "server is up and running",
zonecount, ns_g_debuglevel, xferrunning, xferdeferred, zonecount, ns_g_debuglevel, xferrunning, xferdeferred,
-1, /* XXX */ soaqueries, server->log_queries ? "ON" : "OFF");
server->log_queries ? "ON" : "OFF");
if (n < 0) if (n < 0)
return (ISC_R_NOSPACE); return (ISC_R_NOSPACE);
isc_buffer_add(text, n); isc_buffer_add(text, n);

View File

@@ -2,7 +2,7 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN" <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"> "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">
<!-- File: $Id: Bv9ARM-book.xml,v 1.131 2001/05/09 16:58:12 gson Exp $ --> <!-- File: $Id: Bv9ARM-book.xml,v 1.132 2001/05/14 20:44:14 bwelling Exp $ -->
<book> <book>
<title>BIND 9 Administrator Reference Manual</title> <title>BIND 9 Administrator Reference Manual</title>
@@ -788,11 +788,15 @@ of a server.</para>
<varlistentry><term><userinput>flush</userinput></term> <varlistentry><term><userinput>flush</userinput></term>
<listitem><para>Flushes the server's cache.</para></listitem></varlistentry> <listitem><para>Flushes the server's cache.</para></listitem></varlistentry>
<varlistentry><term><userinput>status</userinput></term>
<listitem><para>Display status of the server.</para></listitem></varlistentry>
</variablelist> </variablelist>
<para>In <acronym>BIND</acronym> 9.1, <command>rndc</command> does not <para>In <acronym>BIND</acronym> 9.2, <command>rndc</command>
yet support all the commands of the BIND 8 <command>ndc</command> supports all the commands of the BIND 8 <command>ndc</command>
utility. Additonal commands will be added in future releases.</para> utility except <command>ndc start</command>, which was also
not supported in <command>ndc</command>'s channel mode.</para>
<para>A configuration file is required, since all <para>A configuration file is required, since all
communication with the server is authenticated with communication with the server is authenticated with

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: zone.c,v 1.324 2001/05/14 19:06:42 bwelling Exp $ */ /* $Id: zone.c,v 1.325 2001/05/14 20:44:12 bwelling Exp $ */
#include <config.h> #include <config.h>
@@ -5965,6 +5965,13 @@ dns_zonemgr_getcount(dns_zonemgr_t *zmgr, int state) {
zone = ISC_LIST_NEXT(zone, statelink)) zone = ISC_LIST_NEXT(zone, statelink))
count++; count++;
break; break;
case DNS_ZONESTATE_SOAQUERY:
for (zone = ISC_LIST_HEAD(zmgr->zones);
zone != NULL;
zone = ISC_LIST_NEXT(zone, link))
if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_REFRESH))
count++;
break;
case DNS_ZONESTATE_ANY: case DNS_ZONESTATE_ANY:
for (zone = ISC_LIST_HEAD(zmgr->zones); for (zone = ISC_LIST_HEAD(zmgr->zones);
zone != NULL; zone != NULL;