summaryrefslogtreecommitdiffstats
path: root/contrib/bind9/bin/named/statschannel.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind9/bin/named/statschannel.c')
-rw-r--r--contrib/bind9/bin/named/statschannel.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/contrib/bind9/bin/named/statschannel.c b/contrib/bind9/bin/named/statschannel.c
index c77d3ca..6dce8e0 100644
--- a/contrib/bind9/bin/named/statschannel.c
+++ b/contrib/bind9/bin/named/statschannel.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: statschannel.c,v 1.14.64.11 2010-02-04 23:47:46 tbox Exp $ */
+/* $Id: statschannel.c,v 1.26 2010-02-04 23:49:13 tbox Exp $ */
/*! \file */
@@ -29,6 +29,7 @@
#include <isc/stats.h>
#include <isc/task.h>
+#include <dns/cache.h>
#include <dns/db.h>
#include <dns/opcode.h>
#include <dns/resolver.h>
@@ -823,9 +824,9 @@ generatexml(ns_server_t *server, int *buflen, xmlChar **buf) {
TRY0(xmlTextWriterStartElement(writer,
ISC_XMLCHAR "cache"));
TRY0(xmlTextWriterWriteAttribute(writer,
- ISC_XMLCHAR "name",
- ISC_XMLCHAR
- view->name));
+ ISC_XMLCHAR "name",
+ ISC_XMLCHAR
+ dns_cache_getname(view->cache)));
dumparg.result = ISC_R_SUCCESS;
dns_rdatasetstats_dump(cachestats, rdatasetstats_dump,
&dumparg, 0);
@@ -1405,7 +1406,15 @@ ns_stats_dump(ns_server_t *server, FILE *fp) {
if (strcmp(view->name, "_default") == 0)
fprintf(fp, "[View: default]\n");
else
- fprintf(fp, "[View: %s]\n", view->name);
+ fprintf(fp, "[View: %s (Cache: %s)]\n", view->name,
+ dns_cache_getname(view->cache));
+ if (dns_view_iscacheshared(view)) {
+ /*
+ * Avoid dumping redundant statistics when the cache is
+ * shared.
+ */
+ continue;
+ }
dns_rdatasetstats_dump(cachestats, rdatasetstats_dump, &dumparg,
0);
}
OpenPOWER on IntegriCloud