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