blob: 61947f19e4cb20629e8479e6b59baa7632c08079 [file] [log] [blame]
Hongqing Liufd5ee812014-05-10 16:32:51 +08001<?xml version="1.0"?>
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>
28 <head>
刘洪青6266f992017-05-15 21:21:03 +080029 <TITLE>Tomcat Status</TITLE>
30 <STYLE type="text/css">
31 body, table, tr, td, a, div, span {
32 vertical-align : top;
33 }
34 </STYLE>
Hongqing Liufd5ee812014-05-10 16:32:51 +080035 </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"/>
刘洪青6266f992017-05-15 21:21:03 +080047 <b>Memory Pools</b><br />
48 <xsl:apply-templates select="memorypool"/>
49 <hr />
Hongqing Liufd5ee812014-05-10 16:32:51 +080050 </xsl:template>
51
52 <xsl:template match="memory">
53 <table><tr>
刘洪青6266f992017-05-15 21:21:03 +080054 <td><b>JVM:</b></td>
55 <td><b>free:</b> <xsl:value-of select="@free"/></td>
56 <td><b>total:</b> <xsl:value-of select="@total"/></td>
57 <td><b>max:</b> <xsl:value-of select="@max"/></td>
58 </tr>
Hongqing Liufd5ee812014-05-10 16:32:51 +080059 </table><hr />
60 </xsl:template>
61
刘洪青6266f992017-05-15 21:21:03 +080062 <xsl:template match="memorypool">
63 <table><tr>
64 <td><b>Name:</b> <xsl:value-of select="@name"/></td>
65 <td><b>Type:</b> <xsl:value-of select="@type"/></td>
66 <td><b>Initial:</b> <xsl:value-of select="@usageInit"/></td>
67 <td><b>Committed:</b> <xsl:value-of select="@usageCommitted"/></td>
68 <td><b>Maximum:</b> <xsl:value-of select="@usageMax"/></td>
69 <td><b>Used:</b> <xsl:value-of select="@usageUsed"/></td>
70 </tr>
71 </table>
72 </xsl:template>
Hongqing Liufd5ee812014-05-10 16:32:51 +080073
刘洪青6266f992017-05-15 21:21:03 +080074 <xsl:template match="connector">
75 <b>Connector -- </b> <xsl:value-of select="@name"/><br />
76
77 <xsl:apply-templates select="threadInfo"/>
78 <xsl:apply-templates select="requestInfo"/>
79 <xsl:apply-templates select="workers"/>
Hongqing Liufd5ee812014-05-10 16:32:51 +080080 </xsl:template>
81
82 <xsl:template match="threadInfo">
83 <table><tr>
刘洪青6266f992017-05-15 21:21:03 +080084 <td><b>threadInfo</b></td>
85 <td><b>maxThreads:</b> <xsl:value-of select="@maxThreads"/></td>
86 <td><b>currentThreadCount:</b> <xsl:value-of select="@currentThreadCount"/></td>
87 <td><b>currentThreadsBusy:</b> <xsl:value-of select="@currentThreadsBusy"/></td>
88 </tr>
Hongqing Liufd5ee812014-05-10 16:32:51 +080089 </table><hr />
90 </xsl:template>
91
92 <xsl:template match="requestInfo">
93 <table><tr>
刘洪青6266f992017-05-15 21:21:03 +080094 <td><b>requestInfo </b></td>
95 <td><b>maxTime:</b> <xsl:value-of select="@maxTime"/></td>
96 <td><b>processingTime:</b> <xsl:value-of select="@processingTime"/></td>
97 <td><b>requestCount:</b> <xsl:value-of select="@requestCount"/></td>
98 <td><b>errorCount:</b> <xsl:value-of select="@errorCount"/></td>
99 <td><b>bytesReceived:</b> <xsl:value-of select="@bytesReceived"/></td>
100 <td><b>bytesSent:</b> <xsl:value-of select="@bytesSent"/></td>
101 </tr>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800102 </table><hr />
103 </xsl:template>
104
105 <xsl:template match="workers">
106 <table>
107 <tr><th>Stage</th><th>Time</th><th>B Sent</th><th>B Recv</th><th>Client</th><th>VHost</th><th>Request</th></tr>
刘洪青6266f992017-05-15 21:21:03 +0800108 <xsl:apply-templates select="worker"/>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800109
110 </table><hr />
111 </xsl:template>
112
113 <xsl:template match="worker">
114 <tr>
115 <td><xsl:value-of select="@stage"/></td>
116 <td><xsl:value-of select="@requestProcessingTime"/></td>
117 <td><xsl:value-of select="@requestBytesSent"/></td>
118 <td><xsl:value-of select="@requestBytesReceived"/></td>
119 <td><xsl:value-of select="@remoteAddr"/></td>
120 <td><xsl:value-of select="@virtualHost"/></td>
121 <td><xsl:value-of select="@method"/> <xsl:value-of select="@currentUri"/>?<xsl:value-of select="@currentQueryString"/> <xsl:value-of select="@protocol"/></td>
122 </tr>
123 </xsl:template>
124
125</xsl:stylesheet>