1<?xml version="1.0" encoding="UTF-8"?> 2<!-- 3 - Copyright (C) Internet Systems Consortium, Inc. ("ISC") 4 - 5 - This Source Code Form is subject to the terms of the Mozilla Public 6 - License, v. 2.0. If a copy of the MPL was not distributed with this 7 - file, You can obtain one at http://mozilla.org/MPL/2.0/. 8 - 9 - See the COPYRIGHT file distributed with this work for additional 10 - information regarding copyright ownership. 11--> 12 13<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> 14 <xsl:output method="html" indent="yes" version="4.0"/> 15 <xsl:template match="statistics[@version="3.11"]"> 16 <html> 17 <head> 18 <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> 19 <script type="text/javascript"> 20 $(function($) { 21 var wid=0; 22 $('table.zones').each(function(i) { if( $(this).width() > wid ) wid = $(this).width(); return true; }); 23 $('table.zones').css('min-width', wid ); 24 $("h2+table,h3+table,h4+table,h2+div,h3+div,h2+script,h3+script").prev().append(' <a class="tabletoggle" href="#" style="font-size:small">Show/Hide</a>'); 25 $(".tabletoggle").click(function(){ 26 var n = $(this).closest("h2,h3,h4").next(); 27 if (n.is("script")) { n = n.next(); } 28 if (n.is("div")) { n.toggleClass("hidden"); n = n.next(); } 29 if (n.is("table")) { n.toggleClass("hidden"); } 30 return false; 31 }); 32 }); 33 </script> 34 35 <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> 36 <!-- Non Mozilla specific markup --> 37 <script type="text/javascript" src="https://www.google.com/jsapi"/> 38 <script type="text/javascript"> 39 40 google.load("visualization", "1", {packages:["corechart"]}); 41 google.setOnLoadCallback(loadGraphs); 42 43 var graphs=[]; 44 45 function drawChart(chart_title,target,style,data) { 46 var data = google.visualization.arrayToDataTable(data); 47 48 var options = { 49 title: chart_title 50 }; 51 52 var chart; 53 if (style == "barchart") { 54 chart = new google.visualization.BarChart(document.getElementById(target)); 55 chart.draw(data, options); 56 } else if (style == "piechart") { 57 chart = new google.visualization.PieChart(document.getElementById(target)); 58 chart.draw(data, options); 59 } 60 } 61 62 function loadGraphs(){ 63 var g; 64 65 while(g = graphs.shift()){ 66 // alert("going for: " + g.target); 67 if(g.data.length > 1){ 68 drawChart(g.title,g.target,g.style,g.data); 69 } 70 } 71 } 72 73 <xsl:if test="server/counters[@type="qtype"]/counter"> 74 // Server Incoming Query Types 75 graphs.push({ 76 'title' : "Server Incoming Query Types", 77 'target': 'chart_incoming_qtypes', 78 'style': 'barchart', 79 'data': [['Type','Counter'],<xsl:for-each select="server/counters[@type="qtype"]/counter">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] 80 }); 81 </xsl:if> 82 83 <xsl:if test="server/counters[@type="opcode"]/counter"> 84 // Server Incoming Requests by opcode 85 graphs.push({ 86 'title' : "Server Incoming Requests by DNS Opcode", 87 'target': 'chart_incoming_opcodes', 88 'style': 'barchart', 89 'data': [['Opcode','Counter'],<xsl:for-each select="server/counters[@type="opcode"]/counter[. > 0 or substring(@name,1,3) != 'RES']">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>]}); 90 </xsl:if> 91 </script> 92 </xsl:if> 93 <style type="text/css"> 94 body { 95 font-family: sans-serif; 96 background-color: #ffffff; 97 color: #000000; 98 font-size: 10pt; 99 } 100 101 .hidden{ 102 display: none; 103 } 104 105 .odd{ 106 background-color: #f0f0f0; 107 } 108 109 .even{ 110 background-color: #ffffff; 111 } 112 113 p.footer{ 114 font-style:italic; 115 color: grey; 116 } 117 118 table { 119 border-collapse: collapse; 120 border: 1px solid grey; 121 } 122 123 table.counters{ 124 border: 1px solid grey; 125 width: 500px; 126 } 127 table.counters th { 128 text-align: right; 129 border: 1px solid grey; 130 width: 150px; 131 } 132 table.counters td { 133 text-align: right; 134 font-family: monospace; 135 } 136 table.counters tr:hover{ 137 background-color: #99ddff; 138 } 139 140 table.info { 141 border: 1px solid grey; 142 width: 500px; 143 } 144 table.info th { 145 text-align: center; 146 border: 1px solid grey; 147 width: 150px; 148 } 149 table.info td { 150 text-align: center; 151 } 152 table.info tr:hover{ 153 background-color: #99ddff; 154 } 155 156 table.tasks { 157 border: 1px solid grey; 158 width: 500px; 159 } 160 table.tasks th { 161 text-align: center; 162 border: 1px solid grey; 163 width: 150px; 164 } 165 table.tasks td { 166 text-align: right; 167 font-family: monospace; 168 } 169 table.tasks td:nth-child(2) { 170 text-align: center; 171 } 172 table.tasks td:nth-child(4) { 173 text-align: center; 174 } 175 table.tasks tr:hover{ 176 background-color: #99ddff; 177 } 178 179 table.netstat { 180 border: 1px solid grey; 181 width: 500px; 182 } 183 table.netstat th { 184 text-align: center; 185 border: 1px solid grey; 186 width: 150px; 187 } 188 table.netstat td { 189 text-align: center; 190 } 191 table.netstat td:nth-child(4) { 192 text-align: right; 193 font-family: monospace; 194 } 195 table.netstat td:nth-child(7) { 196 text-align: left; 197 } 198 table.netstat tr:hover{ 199 background-color: #99ddff; 200 } 201 202 table.mctx { 203 border: 1px solid grey; 204 width: 500px; 205 } 206 table.mctx th { 207 text-align: center; 208 border: 1px solid grey; 209 } 210 table.mctx td { 211 text-align: right; 212 font-family: monospace; 213 } 214 table.mctx td:nth-child(-n+2) { 215 text-align: left; 216 width: 100px; 217 } 218 table.mctx tr:hover{ 219 background-color: #99ddff; 220 } 221 222 table.zones { 223 border: 1px solid grey; 224 width: 500px; 225 } 226 table.zones th { 227 text-align: center; 228 border: 1px solid grey; 229 } 230 table.zones td { 231 text-align: center; 232 font-family: monospace; 233 } 234 table.zones td:nth-child(1) { 235 text-align: right; 236 } 237 table.zones td:nth-child(4) { 238 text-align: right; 239 } 240 241 .totals { 242 background-color: rgb(1,169,206); 243 color: #ffffff; 244 } 245 table.zones { 246 border: 1px solid grey; 247 } 248 table.zones td { 249 text-align: right; 250 font-family: monospace; 251 } 252 table.zones td:nth-child(2) { 253 text-align: center; 254 } 255 table.zones td:nth-child(3) { 256 text-align: left; 257 } 258 table.zones tr:hover{ 259 background-color: #99ddff; 260 } 261 262 td, th { 263 padding-right: 5px; 264 padding-left: 5px; 265 border: 1px solid grey; 266 } 267 268 .header h1 { 269 color: rgb(1,169,206); 270 padding: 0px; 271 } 272 273 .content { 274 background-color: #ffffff; 275 color: #000000; 276 padding: 4px; 277 } 278 279 .item { 280 padding: 4px; 281 text-align: right; 282 } 283 284 .value { 285 padding: 4px; 286 font-weight: bold; 287 } 288 289 290 h2 { 291 color: grey; 292 font-size: 14pt; 293 width:500px; 294 text-align:center; 295 } 296 297 h3 { 298 color: #444444; 299 font-size: 12pt; 300 width:500px; 301 text-align:center; 302 } 303 h4 { 304 color: rgb(1,169,206); 305 font-size: 10pt; 306 width:500px; 307 text-align:center; 308 } 309 310 .pie { 311 width:500px; 312 height: 500px; 313 } 314 315 </style> 316 <title>ISC BIND 9 Statistics</title> 317 </head> 318 <body> 319 <div class="header"> 320 <h1>ISC Bind 9 Configuration and Statistics</h1> 321 </div> 322 <p>Alternate statistics views: <a href="/">All</a>, 323 <a href="/xml/v3/status">Status</a>, 324 <a href="/xml/v3/server">Server</a>, 325 <a href="/xml/v3/zones">Zones</a>, 326 <a href="/xml/v3/net">Network</a>, 327 <a href="/xml/v3/tasks">Tasks</a>, 328 <a href="/xml/v3/mem">Memory</a> and 329 <a href="/xml/v3/traffic">Traffic Size</a></p> 330 <hr/> 331 <h2>Server Status</h2> 332 <table class="info"> 333 <tr class="odd"> 334 <th>Boot time:</th> 335 <td> 336 <xsl:value-of select="server/boot-time"/> 337 </td> 338 </tr> 339 <tr class="even"> 340 <th>Last reconfigured:</th> 341 <td> 342 <xsl:value-of select="server/config-time"/> 343 </td> 344 </tr> 345 <tr class="odd"> 346 <th>Current time:</th> 347 <td> 348 <xsl:value-of select="server/current-time"/> 349 </td> 350 </tr> 351 <tr class="even"> 352 <th>Server version:</th> 353 <td> 354 <xsl:value-of select="server/version"/> 355 </td> 356 </tr> 357 </table> 358 <br/> 359 <xsl:if test="server/counters[@type="opcode"]/counter[. > 0]"> 360 <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> 361 <h2>Incoming Requests by DNS Opcode</h2> 362 <!-- Non Mozilla specific markup --> 363 <div class="pie" id="chart_incoming_opcodes"> 364 [cannot display chart] 365 </div> 366 </xsl:if> 367 <table class="counters"> 368 <xsl:for-each select="server/counters[@type="opcode"]/counter[. > 0 or substring(@name,1,3) != 'RES']"> 369 <xsl:sort select="." data-type="number" order="descending"/> 370 <xsl:variable name="css-class0"> 371 <xsl:choose> 372 <xsl:when test="position() mod 2 = 0">even</xsl:when> 373 <xsl:otherwise>odd</xsl:otherwise> 374 </xsl:choose> 375 </xsl:variable> 376 <tr class="{$css-class0}"> 377 <th> 378 <xsl:value-of select="@name"/> 379 </th> 380 <td> 381 <xsl:value-of select="."/> 382 </td> 383 </tr> 384 </xsl:for-each> 385 <tr> 386 <th class="totals">Total:</th> 387 <td class="totals"> 388 <xsl:value-of select="sum(server/counters[@type="opcode"]/counter)"/> 389 </td> 390 </tr> 391 </table> 392 <br/> 393 </xsl:if> 394 <xsl:if test="server/counters[@type="qtype"]/counter"> 395 <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> 396 <!-- Non Mozilla specific markup --> 397 <h3>Incoming Queries by Query Type</h3> 398 <div class="pie" id="chart_incoming_qtypes"> 399 [cannot display chart] 400 </div> 401 </xsl:if> 402 <table class="counters"> 403 <xsl:for-each select="server/counters[@type="qtype"]/counter"> 404 <xsl:sort select="." data-type="number" order="descending"/> 405 <xsl:variable name="css-class"> 406 <xsl:choose> 407 <xsl:when test="position() mod 2 = 0">even</xsl:when> 408 <xsl:otherwise>odd</xsl:otherwise> 409 </xsl:choose> 410 </xsl:variable> 411 <tr class="{$css-class}"> 412 <th> 413 <xsl:value-of select="@name"/> 414 </th> 415 <td> 416 <xsl:value-of select="."/> 417 </td> 418 </tr> 419 </xsl:for-each> 420 <tr> 421 <th class="totals">Total:</th> 422 <td class="totals"> 423 <xsl:value-of select="sum(server/counters[@type="qtype"]/counter)"/> 424 </td> 425 </tr> 426 </table> 427 <br/> 428 </xsl:if> 429 <xsl:if test="views/view[count(counters[@type="resqtype"]/counter) > 0]"> 430 <h2>Outgoing Queries per view</h2> 431 <xsl:for-each select="views/view[count(counters[@type="resqtype"]/counter) > 0]"> 432 <h3>View <xsl:value-of select="@name"/></h3> 433 <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> 434 <!-- Non Mozilla specific markup --> 435 <script type="text/javascript"> 436 graphs.push({ 437 'title': "Outgoing Queries for view: <xsl:value-of select="@name"/>", 438 'target': 'chart_outgoing_queries_view_<xsl:value-of select="@name"/>', 439 'style': 'barchart', 440 'data': [['Type','Counter'],<xsl:for-each select="counters[@type="resqtype"]/counter">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] 441 }); 442 </script> 443 <xsl:variable name="target"> 444 <xsl:value-of select="@name"/> 445 </xsl:variable> 446 <div class="pie" id="chart_outgoing_queries_view_{$target}">[no data to display]</div> 447 </xsl:if> 448 <table class="counters"> 449 <xsl:for-each select="counters[@type="resqtype"]/counter"> 450 <xsl:sort select="." data-type="number" order="descending"/> 451 <xsl:variable name="css-class1"> 452 <xsl:choose> 453 <xsl:when test="position() mod 2 = 0">even</xsl:when> 454 <xsl:otherwise>odd</xsl:otherwise> 455 </xsl:choose> 456 </xsl:variable> 457 <tr class="{$css-class1}"> 458 <th> 459 <xsl:value-of select="@name"/> 460 </th> 461 <td> 462 <xsl:value-of select="."/> 463 </td> 464 </tr> 465 </xsl:for-each> 466 </table> 467 <br/> 468 </xsl:for-each> 469 </xsl:if> 470 <xsl:if test="server/counters[@type="nsstat"]/counter[.>0]"> 471 <h2>Server Statistics</h2> 472 <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> 473 <!-- Non Mozilla specific markup --> 474 <script type="text/javascript"> 475 graphs.push({ 476 'title' : "Server Counters", 477 'target': 'chart_server_nsstat_restype', 478 'style': 'barchart', 479 'data': [['Type','Counter'],<xsl:for-each select="server/counters[@type="nsstat"]/counter[.>0]">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] 480 }); 481 </script> 482 <div class="pie" id="chart_server_nsstat_restype">[no data to display]</div> 483 </xsl:if> 484 <table class="counters"> 485 <xsl:for-each select="server/counters[@type="nsstat"]/counter[.>0]"> 486 <xsl:sort select="." data-type="number" order="descending"/> 487 <xsl:variable name="css-class2"> 488 <xsl:choose> 489 <xsl:when test="position() mod 2 = 0">even</xsl:when> 490 <xsl:otherwise>odd</xsl:otherwise> 491 </xsl:choose> 492 </xsl:variable> 493 <tr class="{$css-class2}"> 494 <th> 495 <xsl:value-of select="@name"/> 496 </th> 497 <td> 498 <xsl:value-of select="."/> 499 </td> 500 </tr> 501 </xsl:for-each> 502 </table> 503 <br/> 504 </xsl:if> 505 <xsl:if test="server/counters[@type="zonestat"]/counter[.>0]"> 506 <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> 507 <h2>Zone Maintenance Statistics</h2> 508 <script type="text/javascript"> 509 graphs.push({ 510 'title' : "Zone Maintenance Stats", 511 'target': 'chart_server_zone_maint', 512 'style': 'barchart', 513 'data': [['Type','Counter'],<xsl:for-each select="server/counters[@type="zonestat"]/counter[.>0]">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] 514 }); 515 </script> 516 <!-- Non Mozilla specific markup --> 517 <div class="pie" id="chart_server_zone_maint">[no data to display]</div> 518 </xsl:if> 519 <table class="counters"> 520 <xsl:for-each select="server/counters[@type="zonestat"]/counter"> 521 <xsl:sort select="." data-type="number" order="descending"/> 522 <xsl:variable name="css-class3"> 523 <xsl:choose> 524 <xsl:when test="position() mod 2 = 0">even</xsl:when> 525 <xsl:otherwise>odd</xsl:otherwise> 526 </xsl:choose> 527 </xsl:variable> 528 <tr class="{$css-class3}"> 529 <th> 530 <xsl:value-of select="@name"/> 531 </th> 532 <td> 533 <xsl:value-of select="."/> 534 </td> 535 </tr> 536 </xsl:for-each> 537 </table> 538 </xsl:if> 539 <xsl:if test="server/counters[@type="resstat"]/counter[.>0]"> 540 <h2>Resolver Statistics (Common)</h2> 541 <table class="counters"> 542 <xsl:for-each select="server/counters[@type="resstat"]/counter"> 543 <xsl:sort select="." data-type="number" order="descending"/> 544 <xsl:variable name="css-class4"> 545 <xsl:choose> 546 <xsl:when test="position() mod 2 = 0">even</xsl:when> 547 <xsl:otherwise>odd</xsl:otherwise> 548 </xsl:choose> 549 </xsl:variable> 550 <tr class="{$css-class4}"> 551 <th> 552 <xsl:value-of select="@name"/> 553 </th> 554 <td> 555 <xsl:value-of select="."/> 556 </td> 557 </tr> 558 </xsl:for-each> 559 </table> 560 </xsl:if> 561 <xsl:for-each select="views/view"> 562 <xsl:if test="counters[@type="resstats"]/counter[.>0]"> 563 <h3>Resolver Statistics for View <xsl:value-of select="@name"/></h3> 564 <table class="counters"> 565 <xsl:for-each select="counters[@type="resstats"]/counter[.>0]"> 566 <xsl:sort select="." data-type="number" order="descending"/> 567 <xsl:variable name="css-class5"> 568 <xsl:choose> 569 <xsl:when test="position() mod 2 = 0">even</xsl:when> 570 <xsl:otherwise>odd</xsl:otherwise> 571 </xsl:choose> 572 </xsl:variable> 573 <tr class="{$css-class5}"> 574 <th> 575 <xsl:value-of select="@name"/> 576 </th> 577 <td> 578 <xsl:value-of select="."/> 579 </td> 580 </tr> 581 </xsl:for-each> 582 </table> 583 </xsl:if> 584 </xsl:for-each> 585 <xsl:for-each select="views/view"> 586 <xsl:if test="counters[@type="adbstat"]/counter[.>0]"> 587 <h3>ADB Statistics for View <xsl:value-of select="@name"/></h3> 588 <table class="counters"> 589 <xsl:for-each select="counters[@type="adbstat"]/counter[.>0]"> 590 <xsl:sort select="." data-type="number" order="descending"/> 591 <xsl:variable name="css-class5"> 592 <xsl:choose> 593 <xsl:when test="position() mod 2 = 0">even</xsl:when> 594 <xsl:otherwise>odd</xsl:otherwise> 595 </xsl:choose> 596 </xsl:variable> 597 <tr class="{$css-class5}"> 598 <th> 599 <xsl:value-of select="@name"/> 600 </th> 601 <td> 602 <xsl:value-of select="."/> 603 </td> 604 </tr> 605 </xsl:for-each> 606 </table> 607 </xsl:if> 608 </xsl:for-each> 609 <xsl:for-each select="views/view"> 610 <xsl:if test="counters[@type="cachestats"]/counter[.>0]"> 611 <h3>Cache Statistics for View <xsl:value-of select="@name"/></h3> 612 <table class="counters"> 613 <xsl:for-each select="counters[@type="cachestats"]/counter[.>0]"> 614 <xsl:sort select="." data-type="number" order="descending"/> 615 <xsl:variable name="css-class5"> 616 <xsl:choose> 617 <xsl:when test="position() mod 2 = 0">even</xsl:when> 618 <xsl:otherwise>odd</xsl:otherwise> 619 </xsl:choose> 620 </xsl:variable> 621 <tr class="{$css-class5}"> 622 <th> 623 <xsl:value-of select="@name"/> 624 </th> 625 <td> 626 <xsl:value-of select="."/> 627 </td> 628 </tr> 629 </xsl:for-each> 630 </table> 631 </xsl:if> 632 </xsl:for-each> 633 <xsl:for-each select="views/view"> 634 <xsl:if test="cache/rrset"> 635 <h3>Cache DB RRsets for View <xsl:value-of select="@name"/></h3> 636 <table class="counters"> 637 <xsl:for-each select="cache/rrset"> 638 <xsl:variable name="css-class6"> 639 <xsl:choose> 640 <xsl:when test="position() mod 2 = 0">even</xsl:when> 641 <xsl:otherwise>odd</xsl:otherwise> 642 </xsl:choose> 643 </xsl:variable> 644 <tr class="{$css-class6}"> 645 <th> 646 <xsl:value-of select="name"/> 647 </th> 648 <td> 649 <xsl:value-of select="counter"/> 650 </td> 651 </tr> 652 </xsl:for-each> 653 </table> 654 <br/> 655 </xsl:if> 656 </xsl:for-each> 657 <xsl:if test="traffic//udp/counters[@type="request-size"]/counter[.>0] or traffic//udp/counters[@type="response-size"]/counter[.>0] or traffic//tcp/counters[@type="request-size"]/counter[.>0] or traffic//tcp/counters[@type="response-size"]/counter[.>0]"> 658 <h2>Traffic Size Statistics</h2> 659 </xsl:if> 660 <xsl:if test="traffic//udp/counters[@type="request-size"]/counter[.>0]"> 661 <h4>UDP Requests Received</h4> 662 <table class="counters"> 663 <xsl:for-each select="traffic//udp/counters[@type="request-size"]/counter[.>0]"> 664 <xsl:variable name="css-class7"> 665 <xsl:choose> 666 <xsl:when test="position() mod 2 = 0">even</xsl:when> 667 <xsl:otherwise>odd</xsl:otherwise> 668 </xsl:choose> 669 </xsl:variable> 670 <tr class="{$css-class7}"> 671 <th><xsl:value-of select="local-name(../../..)"/></th> 672 <th> 673 <xsl:value-of select="@name"/> 674 </th> 675 <td> 676 <xsl:value-of select="."/> 677 </td> 678 </tr> 679 </xsl:for-each> 680 </table> 681 <br/> 682 </xsl:if> 683 <xsl:if test="traffic//udp/counters[@type="response-size"]/counter[.>0]"> 684 <h4>UDP Responses Sent</h4> 685 <table class="counters"> 686 <xsl:for-each select="traffic//udp/counters[@type="response-size"]/counter[.>0]"> 687 <xsl:variable name="css-class7"> 688 <xsl:choose> 689 <xsl:when test="position() mod 2 = 0">even</xsl:when> 690 <xsl:otherwise>odd</xsl:otherwise> 691 </xsl:choose> 692 </xsl:variable> 693 <tr class="{$css-class7}"> 694 <th><xsl:value-of select="local-name(../../..)"/></th> 695 <th> 696 <xsl:value-of select="@name"/> 697 </th> 698 <td> 699 <xsl:value-of select="."/> 700 </td> 701 </tr> 702 </xsl:for-each> 703 </table> 704 <br/> 705 </xsl:if> 706 <xsl:if test="traffic//tcp/counters[@type="request-size"]/counter[.>0]"> 707 <h4>TCP Requests Received</h4> 708 <table class="counters"> 709 <xsl:for-each select="traffic//tcp/counters[@type="request-size"]/counter[.>0]"> 710 <xsl:variable name="css-class7"> 711 <xsl:choose> 712 <xsl:when test="position() mod 2 = 0">even</xsl:when> 713 <xsl:otherwise>odd</xsl:otherwise> 714 </xsl:choose> 715 </xsl:variable> 716 <tr class="{$css-class7}"> 717 <th><xsl:value-of select="local-name(../../..)"/></th> 718 <th> 719 <xsl:value-of select="@name"/> 720 </th> 721 <td> 722 <xsl:value-of select="."/> 723 </td> 724 </tr> 725 </xsl:for-each> 726 </table> 727 <br/> 728 </xsl:if> 729 <xsl:if test="traffic//tcp/counters[@type="response-size"]/counter[.>0]"> 730 <h4>TCP Responses Sent</h4> 731 <table class="counters"> 732 <xsl:for-each select="traffic//tcp/counters[@type="response-size"]/counter[.>0]"> 733 <xsl:variable name="css-class7"> 734 <xsl:choose> 735 <xsl:when test="position() mod 2 = 0">even</xsl:when> 736 <xsl:otherwise>odd</xsl:otherwise> 737 </xsl:choose> 738 </xsl:variable> 739 <tr class="{$css-class7}"> 740 <th><xsl:value-of select="local-name(../../..)"/></th> 741 <th> 742 <xsl:value-of select="@name"/> 743 </th> 744 <td> 745 <xsl:value-of select="."/> 746 </td> 747 </tr> 748 </xsl:for-each> 749 </table> 750 <br/> 751 </xsl:if> 752 <xsl:if test="server/counters[@type="sockstat"]/counter[.>0]"> 753 <h2>Socket I/O Statistics</h2> 754 <table class="counters"> 755 <xsl:for-each select="server/counters[@type="sockstat"]/counter[.>0]"> 756 <xsl:variable name="css-class7"> 757 <xsl:choose> 758 <xsl:when test="position() mod 2 = 0">even</xsl:when> 759 <xsl:otherwise>odd</xsl:otherwise> 760 </xsl:choose> 761 </xsl:variable> 762 <tr class="{$css-class7}"> 763 <th> 764 <xsl:value-of select="@name"/> 765 </th> 766 <td> 767 <xsl:value-of select="."/> 768 </td> 769 </tr> 770 </xsl:for-each> 771 </table> 772 <br/> 773 </xsl:if> 774 <xsl:if test="views/view/zones/zone"> 775 <xsl:for-each select="views/view"> 776 <h3>Zones for View <xsl:value-of select="@name"/></h3> 777 <table class="zones"> 778 <thead><tr><th>Name</th><th>Class</th><th>Type</th><th>Serial</th></tr></thead> 779 <tbody> 780 <xsl:for-each select="zones/zone"> 781 <xsl:variable name="css-class15"> 782 <xsl:choose> 783 <xsl:when test="position() mod 2 = 0">even</xsl:when> 784 <xsl:otherwise>odd</xsl:otherwise> 785 </xsl:choose> 786 </xsl:variable> 787 <tr class="{$css-class15}"> 788 <td><xsl:value-of select="@name"/></td> 789 <td><xsl:value-of select="@rdataclass"/></td> 790 <td><xsl:value-of select="type"/></td> 791 <td><xsl:value-of select="serial"/></td></tr> 792 </xsl:for-each> 793 </tbody> 794 </table> 795 </xsl:for-each> 796 </xsl:if> 797 <xsl:if test="views/view[zones/zone/counters[@type="qtype"]/counter >0]"> 798 <h2>Received QTYPES per view/zone</h2> 799 <xsl:for-each select="views/view[zones/zone/counters[@type="qtype"]/counter >0]"> 800 <h3>View <xsl:value-of select="@name"/></h3> 801 <xsl:variable name="thisview"> 802 <xsl:value-of select="@name"/> 803 </xsl:variable> 804 <xsl:for-each select="zones/zone"> 805 <xsl:if test="counters[@type="qtype"]/counter[count(.) > 0]"> 806 <h4>Zone <xsl:value-of select="@name"/></h4> 807 <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> 808 <!-- Non Mozilla specific markup --> 809 <script type="text/javascript"> 810 graphs.push({ 811 'title': "Query types for zone <xsl:value-of select="@name"/>", 812 'target': 'chart_qtype_<xsl:value-of select="../../@name"/>_<xsl:value-of select="@name"/>', 813 'style': 'barchart', 814 'data': [['Type','Counter'],<xsl:for-each select="counters[@type="qtype"]/counter[.>0 and @name != "QryAuthAns"]">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] 815 }); 816 817 </script> 818 <xsl:variable name="target"> 819 <xsl:value-of select="@name"/> 820 </xsl:variable> 821 <div class="pie" id="chart_qtype_{$thisview}_{$target}">[no data to display]</div> 822 </xsl:if> 823 <table class="counters"> 824 <xsl:for-each select="counters[@type="qtype"]/counter"> 825 <xsl:sort select="."/> 826 <xsl:variable name="css-class10"> 827 <xsl:choose> 828 <xsl:when test="position() mod 2 = 0">even</xsl:when> 829 <xsl:otherwise>odd</xsl:otherwise> 830 </xsl:choose> 831 </xsl:variable> 832 <tr class="{$css-class10}"> 833 <th> 834 <xsl:value-of select="@name"/> 835 </th> 836 <td> 837 <xsl:value-of select="."/> 838 </td> 839 </tr> 840 </xsl:for-each> 841 </table> 842 </xsl:if> 843 </xsl:for-each> 844 </xsl:for-each> 845 </xsl:if> 846 <xsl:if test="views/view[zones/zone/counters[@type="rcode"]/counter >0]"> 847 <h2>Response Codes per view/zone</h2> 848 <xsl:for-each select="views/view[zones/zone/counters[@type="rcode"]/counter >0]"> 849 <h3>View <xsl:value-of select="@name"/></h3> 850 <xsl:variable name="thisview2"> 851 <xsl:value-of select="@name"/> 852 </xsl:variable> 853 <xsl:for-each select="zones/zone"> 854 <xsl:if test="counters[@type="rcode"]/counter[. > 0]"> 855 <h4>Zone <xsl:value-of select="@name"/></h4> 856 <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> 857 <!-- Non Mozilla specific markup --> 858 <script type="text/javascript"> 859 graphs.push({ 860 'title': "Response codes for zone <xsl:value-of select="@name"/>", 861 'target': 'chart_rescode_<xsl:value-of select="../../@name"/>_<xsl:value-of select="@name"/>', 862 'style': 'barchart', 863 'data': [['Type','Counter'],<xsl:for-each select="counters[@type="rcode"]/counter[.>0 and @name != "QryAuthAns"]">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] 864 }); 865 866 </script> 867 <xsl:variable name="target"> 868 <xsl:value-of select="@name"/> 869 </xsl:variable> 870 <div class="pie" id="chart_rescode_{$thisview2}_{$target}">[no data to display]</div> 871 </xsl:if> 872 <table class="counters"> 873 <xsl:for-each select="counters[@type="rcode"]/counter[.>0 and @name != "QryAuthAns"]"> 874 <xsl:sort select="."/> 875 <xsl:variable name="css-class11"> 876 <xsl:choose> 877 <xsl:when test="position() mod 2 = 0">even</xsl:when> 878 <xsl:otherwise>odd</xsl:otherwise> 879 </xsl:choose> 880 </xsl:variable> 881 <tr class="{$css-class11}"> 882 <th> 883 <xsl:value-of select="@name"/> 884 </th> 885 <td> 886 <xsl:value-of select="."/> 887 </td> 888 </tr> 889 </xsl:for-each> 890 </table> 891 </xsl:if> 892 </xsl:for-each> 893 </xsl:for-each> 894 </xsl:if> 895 <xsl:if test="views/view[zones/zone/counters[@type="gluecache"]/counter >0]"> 896 <h2>Glue cache statistics</h2> 897 <xsl:for-each select="views/view[zones/zone/counters[@type="gluecache"]/counter >0]"> 898 <h3>View <xsl:value-of select="@name"/></h3> 899 <xsl:variable name="thisview2"> 900 <xsl:value-of select="@name"/> 901 </xsl:variable> 902 <xsl:for-each select="zones/zone"> 903 <xsl:if test="counters[@type="gluecache"]/counter[. > 0]"> 904 <h4>Zone <xsl:value-of select="@name"/></h4> 905 <table class="counters"> 906 <xsl:for-each select="counters[@type="gluecache"]/counter[. > 0]"> 907 <xsl:sort select="."/> 908 <xsl:variable name="css-class11"> 909 <xsl:choose> 910 <xsl:when test="position() mod 2 = 0">even</xsl:when> 911 <xsl:otherwise>odd</xsl:otherwise> 912 </xsl:choose> 913 </xsl:variable> 914 <tr class="{$css-class11}"> 915 <th> 916 <xsl:value-of select="@name"/> 917 </th> 918 <td> 919 <xsl:value-of select="."/> 920 </td> 921 </tr> 922 </xsl:for-each> 923 </table> 924 </xsl:if> 925 </xsl:for-each> 926 </xsl:for-each> 927 </xsl:if> 928 <xsl:if test="socketmgr/sockets/socket"> 929 <h2>Network Status</h2> 930 <table class="netstat"> 931 <tr> 932 <th>ID</th> 933 <th>Name</th> 934 <th>Type</th> 935 <th>References</th> 936 <th>LocalAddress</th> 937 <th>PeerAddress</th> 938 <th>State</th> 939 </tr> 940 <xsl:for-each select="socketmgr/sockets/socket"> 941 <xsl:sort select="id"/> 942 <xsl:variable name="css-class12"> 943 <xsl:choose> 944 <xsl:when test="position() mod 2 = 0">even</xsl:when> 945 <xsl:otherwise>odd</xsl:otherwise> 946 </xsl:choose> 947 </xsl:variable> 948 <tr class="{$css-class12}"> 949 <td> 950 <xsl:value-of select="id"/> 951 </td> 952 <td> 953 <xsl:value-of select="name"/> 954 </td> 955 <td> 956 <xsl:value-of select="type"/> 957 </td> 958 <td> 959 <xsl:value-of select="references"/> 960 </td> 961 <td> 962 <xsl:value-of select="local-address"/> 963 </td> 964 <td> 965 <xsl:value-of select="peer-address"/> 966 </td> 967 <td> 968 <xsl:for-each select="states"> 969 <xsl:value-of select="."/> 970 </xsl:for-each> 971 </td> 972 </tr> 973 </xsl:for-each> 974 </table> 975 <br/> 976 </xsl:if> 977 <xsl:if test="taskmgr/thread-model/type"> 978 <h2>Task Manager Configuration</h2> 979 <table class="counters"> 980 <tr> 981 <th class="even">Thread-Model</th> 982 <td> 983 <xsl:value-of select="taskmgr/thread-model/type"/> 984 </td> 985 </tr> 986 <tr class="odd"> 987 <th>Worker Threads</th> 988 <td> 989 <xsl:value-of select="taskmgr/thread-model/worker-threads"/> 990 </td> 991 </tr> 992 <tr class="even"> 993 <th>Default Quantum</th> 994 <td> 995 <xsl:value-of select="taskmgr/thread-model/default-quantum"/> 996 </td> 997 </tr> 998 <tr class="odd"> 999 <th>Tasks Running</th> 1000 <td> 1001 <xsl:value-of select="taskmgr/thread-model/tasks-running"/> 1002 </td> 1003 </tr> 1004 <tr class="even"> 1005 <th>Tasks Ready</th> 1006 <td> 1007 <xsl:value-of select="taskmgr/thread-model/tasks-ready"/> 1008 </td> 1009 </tr> 1010 </table> 1011 <br/> 1012 </xsl:if> 1013 <xsl:if test="taskmgr/tasks/task"> 1014 <h2>Tasks</h2> 1015 <table class="tasks"> 1016 <tr> 1017 <th>ID</th> 1018 <th>Name</th> 1019 <th>References</th> 1020 <th>State</th> 1021 <th>Quantum</th> 1022 <th>Events</th> 1023 </tr> 1024 <xsl:for-each select="taskmgr/tasks/task"> 1025 <xsl:sort select="name"/> 1026 <xsl:variable name="css-class14"> 1027 <xsl:choose> 1028 <xsl:when test="position() mod 2 = 0">even</xsl:when> 1029 <xsl:otherwise>odd</xsl:otherwise> 1030 </xsl:choose> 1031 </xsl:variable> 1032 <tr class="{$css-class14}"> 1033 <td> 1034 <xsl:value-of select="id"/> 1035 </td> 1036 <td> 1037 <xsl:value-of select="name"/> 1038 </td> 1039 <td> 1040 <xsl:value-of select="references"/> 1041 </td> 1042 <td> 1043 <xsl:value-of select="state"/> 1044 </td> 1045 <td> 1046 <xsl:value-of select="quantum"/> 1047 </td> 1048 <td> 1049 <xsl:value-of select="events"/> 1050 </td> 1051 </tr> 1052 </xsl:for-each> 1053 </table> 1054 <br/> 1055 </xsl:if> 1056 <xsl:if test="memory/summary"> 1057 <h2>Memory Usage Summary</h2> 1058 <table class="counters"> 1059 <xsl:for-each select="memory/summary/*"> 1060 <xsl:variable name="css-class13"> 1061 <xsl:choose> 1062 <xsl:when test="position() mod 2 = 0">even</xsl:when> 1063 <xsl:otherwise>odd</xsl:otherwise> 1064 </xsl:choose> 1065 </xsl:variable> 1066 <tr class="{$css-class13}"> 1067 <th> 1068 <xsl:value-of select="name()"/> 1069 </th> 1070 <td> 1071 <xsl:value-of select="."/> 1072 </td> 1073 </tr> 1074 </xsl:for-each> 1075 </table> 1076 <br/> 1077 </xsl:if> 1078 <xsl:if test="memory/contexts/context"> 1079 <h2>Memory Contexts</h2> 1080 <table class="mctx"> 1081 <tr> 1082 <th>ID</th> 1083 <th>Name</th> 1084 <th>References</th> 1085 <th>TotalUse</th> 1086 <th>InUse</th> 1087 <th>MaxUse</th> 1088 <th>Malloced</th> 1089 <th>MaxMalloced</th> 1090 <th>BlockSize</th> 1091 <th>Pools</th> 1092 <th>HiWater</th> 1093 <th>LoWater</th> 1094 </tr> 1095 <xsl:for-each select="memory/contexts/context"> 1096 <xsl:sort select="total" data-type="number" order="descending"/> 1097 <xsl:variable name="css-class14"> 1098 <xsl:choose> 1099 <xsl:when test="position() mod 2 = 0">even</xsl:when> 1100 <xsl:otherwise>odd</xsl:otherwise> 1101 </xsl:choose> 1102 </xsl:variable> 1103 <tr class="{$css-class14}"> 1104 <td> 1105 <xsl:value-of select="id"/> 1106 </td> 1107 <td> 1108 <xsl:value-of select="name"/> 1109 </td> 1110 <td> 1111 <xsl:value-of select="references"/> 1112 </td> 1113 <td> 1114 <xsl:value-of select="total"/> 1115 </td> 1116 <td> 1117 <xsl:value-of select="inuse"/> 1118 </td> 1119 <td> 1120 <xsl:value-of select="maxinuse"/> 1121 </td> 1122 <td> 1123 <xsl:value-of select="malloced"/> 1124 </td> 1125 <td> 1126 <xsl:value-of select="maxmalloced"/> 1127 </td> 1128 <td> 1129 <xsl:value-of select="blocksize"/> 1130 </td> 1131 <td> 1132 <xsl:value-of select="pools"/> 1133 </td> 1134 <td> 1135 <xsl:value-of select="hiwater"/> 1136 </td> 1137 <td> 1138 <xsl:value-of select="lowater"/> 1139 </td> 1140 </tr> 1141 </xsl:for-each> 1142 </table> 1143 </xsl:if> 1144 <hr/> 1145 <p class="footer">Internet Systems Consortium Inc.<br/><a href="http://www.isc.org">http://www.isc.org</a></p> 1146 </body> 1147 </html> 1148 </xsl:template> 1149</xsl:stylesheet> 1150