Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 771 | blopes | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
||
| 3 | Licensed to the Apache Software Foundation (ASF) under one or more |
||
| 4 | contributor license agreements. See the NOTICE file distributed with |
||
| 5 | this work for additional information regarding copyright ownership. |
||
| 6 | The ASF licenses this file to You under the Apache License, Version 2.0 |
||
| 7 | (the "License"); you may not use this file except in compliance with |
||
| 8 | the License. You may obtain a copy of the License at |
||
| 9 | |||
| 10 | http://www.apache.org/licenses/LICENSE-2.0 |
||
| 11 | |||
| 12 | Unless required by applicable law or agreed to in writing, software |
||
| 13 | distributed under the License is distributed on an "AS IS" BASIS, |
||
| 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||
| 15 | See the License for the specific language governing permissions and |
||
| 16 | limitations under the License. |
||
| 17 | --> |
||
| 18 | |||
| 19 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
||
| 20 | version="1.0"> |
||
| 21 | |||
| 22 | <!-- Output method --> |
||
| 23 | <xsl:output encoding="iso-8859-1" |
||
| 24 | indent="no"/> |
||
| 25 | |||
| 26 | <xsl:template match="status"> |
||
| 27 | <html lang="en"> |
||
| 28 | <head> |
||
| 29 | <title>Tomcat Status</title> |
||
| 30 | <style> |
||
| 31 | body, table, tr, td, a, div, span { |
||
| 32 | vertical-align: top; |
||
| 33 | } |
||
| 34 | </style> |
||
| 35 | </head> |
||
| 36 | <body> |
||
| 37 | <div style='font-size:20px;'>Tomcat Status</div> |
||
| 38 | |||
| 39 | <xsl:apply-templates select="jvm"/> |
||
| 40 | <xsl:apply-templates select="connector"/> |
||
| 41 | </body> |
||
| 42 | </html> |
||
| 43 | </xsl:template> |
||
| 44 | |||
| 45 | <xsl:template match="jvm"> |
||
| 46 | <xsl:apply-templates select="memory"/> |
||
| 47 | <b>Memory Pools</b><br /> |
||
| 48 | <xsl:apply-templates select="memorypool"/> |
||
| 49 | <hr /> |
||
| 50 | </xsl:template> |
||
| 51 | |||
| 52 | <xsl:template match="memory"> |
||
| 53 | <table> |
||
| 54 | <tr> |
||
| 55 | <td><b>JVM:</b></td> |
||
| 56 | <td><b>free:</b> <xsl:value-of select="@free"/></td> |
||
| 57 | <td><b>total:</b> <xsl:value-of select="@total"/></td> |
||
| 58 | <td><b>max:</b> <xsl:value-of select="@max"/></td> |
||
| 59 | </tr> |
||
| 60 | </table> |
||
| 61 | <hr /> |
||
| 62 | </xsl:template> |
||
| 63 | |||
| 64 | <xsl:template match="memorypool"> |
||
| 65 | <table> |
||
| 66 | <tr> |
||
| 67 | <td><b>Name:</b> <xsl:value-of select="@name"/></td> |
||
| 68 | <td><b>Type:</b> <xsl:value-of select="@type"/></td> |
||
| 69 | <td><b>Initial:</b> <xsl:value-of select="@usageInit"/></td> |
||
| 70 | <td><b>Committed:</b> <xsl:value-of select="@usageCommitted"/></td> |
||
| 71 | <td><b>Maximum:</b> <xsl:value-of select="@usageMax"/></td> |
||
| 72 | <td><b>Used:</b> <xsl:value-of select="@usageUsed"/></td> |
||
| 73 | </tr> |
||
| 74 | </table> |
||
| 75 | </xsl:template> |
||
| 76 | |||
| 77 | <xsl:template match="connector"> |
||
| 78 | <b>Connector -- </b> <xsl:value-of select="@name"/><br /> |
||
| 79 | |||
| 80 | <xsl:apply-templates select="threadInfo"/> |
||
| 81 | <xsl:apply-templates select="requestInfo"/> |
||
| 82 | <xsl:apply-templates select="workers"/> |
||
| 83 | </xsl:template> |
||
| 84 | |||
| 85 | <xsl:template match="threadInfo"> |
||
| 86 | <table> |
||
| 87 | <tr> |
||
| 88 | <td><b>threadInfo</b></td> |
||
| 89 | <td><b>maxThreads:</b> <xsl:value-of select="@maxThreads"/></td> |
||
| 90 | <td><b>currentThreadCount:</b> <xsl:value-of select="@currentThreadCount"/></td> |
||
| 91 | <td><b>currentThreadsBusy:</b> <xsl:value-of select="@currentThreadsBusy"/></td> |
||
| 92 | </tr> |
||
| 93 | </table> |
||
| 94 | <hr /> |
||
| 95 | </xsl:template> |
||
| 96 | |||
| 97 | <xsl:template match="requestInfo"> |
||
| 98 | <table> |
||
| 99 | <tr> |
||
| 100 | <td><b>requestInfo </b></td> |
||
| 101 | <td><b>maxTime:</b> <xsl:value-of select="@maxTime"/></td> |
||
| 102 | <td><b>processingTime:</b> <xsl:value-of select="@processingTime"/></td> |
||
| 103 | <td><b>requestCount:</b> <xsl:value-of select="@requestCount"/></td> |
||
| 104 | <td><b>errorCount:</b> <xsl:value-of select="@errorCount"/></td> |
||
| 105 | <td><b>bytesReceived:</b> <xsl:value-of select="@bytesReceived"/></td> |
||
| 106 | <td><b>bytesSent:</b> <xsl:value-of select="@bytesSent"/></td> |
||
| 107 | </tr> |
||
| 108 | </table> |
||
| 109 | <hr /> |
||
| 110 | </xsl:template> |
||
| 111 | |||
| 112 | <xsl:template match="workers"> |
||
| 113 | <table> |
||
| 114 | <tr> |
||
| 115 | <th>Stage</th> |
||
| 116 | <th>Time</th> |
||
| 117 | <th>B Sent</th> |
||
| 118 | <th>B Recv</th> |
||
| 119 | <th>Client</th> |
||
| 120 | <th>VHost</th> |
||
| 121 | <th>Request</th> |
||
| 122 | </tr> |
||
| 123 | <xsl:apply-templates select="worker"/> |
||
| 124 | </table> |
||
| 125 | <hr /> |
||
| 126 | </xsl:template> |
||
| 127 | |||
| 128 | <xsl:template match="worker"> |
||
| 129 | <tr> |
||
| 130 | <td><xsl:value-of select="@stage"/></td> |
||
| 131 | <td><xsl:value-of select="@requestProcessingTime"/></td> |
||
| 132 | <td><xsl:value-of select="@requestBytesSent"/></td> |
||
| 133 | <td><xsl:value-of select="@requestBytesReceived"/></td> |
||
| 134 | <td><xsl:value-of select="@remoteAddr"/></td> |
||
| 135 | <td><xsl:value-of select="@virtualHost"/></td> |
||
| 136 | <td><xsl:value-of select="@method"/> <xsl:value-of select="@currentUri"/>?<xsl:value-of select="@currentQueryString"/> <xsl:value-of select="@protocol"/></td> |
||
| 137 | </tr> |
||
| 138 | </xsl:template> |
||
| 139 | |||
| 140 | </xsl:stylesheet> |