forked from Azure/iisnode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
164 lines (143 loc) · 5.13 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE html>
<html>
<head>
<title>iisnode-debug</title>
<style type="text/css">
body
{
font-family: Arial, Helvetica, sans-serif;
}
table
{
border-collapse: collapse;
}
td, th
{
border: none;
padding: 3px 7px 2px 7px;
}
th
{
text-align: left;
padding-top: 5px;
padding-bottom: 4px;
background-color: Gray;
color: #ffffff;
}
td.value
{
text-align: right
}
</style>
</head>
<body>
<h2>HTTP response diagnostics for iisnode</h2>
<h3>This request</h3>
<table>
<tr>
<td>Processing time [ms]</td>
<td id="req_time" class="value">N/A</td>
</tr>
<tr>
<td>Named pipe connection retry count</td>
<td id="np_retry" class="value">N/A</td>
</tr>
<tr>
<td>HRESULT</td>
<td id="hresult" class="value">N/A</td>
</tr>
<tr>
<td>Server DNS name</td>
<td id="dns" class="value">N/A</td>
</tr>
<tr>
<td>w3wp.exe PID</td>
<td id="worker_pid" class="value">N/A</td>
</tr>
<tr>
<td>node.exe PID</td>
<td id="node_pid" class="value">N/A</td>
</tr>
</table>
<h3>Memory</h3>
<img id="memoryChart" src="" width="400px" height="300px" alt="Memory consumption chart" />
<h3>Counters</h3>
<table>
<tr>
<td>Active node.exe processes serving this application</td>
<td id="app_processes" class="value">N/A</td>
</tr>
<tr>
<td>Active HTTP requests in this application</td>
<td id="app_active_req" class="value">N/A</td>
</tr>
<tr>
<td>Active HTTP requests in this node.exe process</td>
<td id="process_active_req" class="value">N/A</td>
</tr>
<tr>
<td>Total node.js requests processed by w3wp.exe</td>
<td id="worker_total_req" class="value">N/A</td>
</tr>
</table>
<h3>Environment</h3>
<table>
<tr>
<td>Version of iisnode</td>
<td id="iisnode_ver" class="value">N/A</td>
</tr>
<tr>
<td>Server full DNS name</td>
<td id="dns_full" class="value">N/A</td>
</tr>
<tr>
<td>Full node.exe path</td>
<td id="node" class="value">N/A</td>
</tr>
</table>
<h3>Actions</h3>
<a href="https://github.com/tjanczuk/issues/new">Bugs, feedback, questions</a><br />
<a href="https://github.com/tjanczuk/iisnode">iisnode project home page</a><br />
<a href="http://tomasz.janczuk.org/2011/11/debug-nodejs-applications-on-windows.html">
Debug node.js applications hosted in IIS using iisnode
</a><br />
<a href="http://tomasz.janczuk.org/2011/09/using-event-tracing-for-windows-to.html">
Use Event Tracing for Windows (ETW) to get more diagnostics information
</a><br />
<a href="http://www.windowsazure.com/en-us/develop/nodejs/">
Windows Azure node.js developer center
</a>
<script type="text/javascript">
var memoryChartTemplate =
'http://chart.apis.google.com/chart?chxl=1:|w3wp.exe|node.exe|2:|%5BKB%5D&chxp=2,50&chxr=0,0,#MAX#'
+ '&chxs=0,676767,9.833,0,lt,676767|1,676767,11.5,0,l,00000000&chxt=y,x,y&chbh=a,4,25&chs=400x300&cht=bvg'
+ '&chco=80C65A,FF9900&chds=0,#MAX#,0,#MAX#&chd=t:#WS#|#PAGE#&chdl=working+set|pagefile&chdlp=b'
+ '&chma=0,0,0,2|0,7&chtt=Memory+usage&chts=000000,11.5&chm=N,676767,0,-1,11|N,676767,1,-1,11';
// parse data from fragment
var fragment = window.location.hash.substring(1);
var data = {};
fragment.split('&').forEach(function (item) {
var i = item.indexOf('=');
data[item.substring(0, i)] = item.substring(i + 1);
});
data.dns_full = data.dns;
// create memory chart URL
var max = Math.max(data.node_mem_ws, data.node_mem_pagefile, data.worker_mem_ws, data.worker_mem_pagefile);
max = (Math.floor(max / 1000) + 1) * 1000;
var chartUrl = memoryChartTemplate
.replace(/#MAX#/g, max)
.replace('#WS#', data.worker_mem_ws + ',' + data.node_mem_ws)
.replace('#PAGE#', data.worker_mem_pagefile + ',' + data.node_mem_pagefile);
document.getElementById('memoryChart').setAttribute('src', chartUrl);
// fill out other pieces of data
for (var piece in data) {
var elem = document.getElementById(piece);
if (elem) {
elem.innerHTML = (piece === 'dns' && data[piece].indexOf('.') > 0)
? data[piece].substring(0, data[piece].indexOf('.'))
: data[piece];
}
}
</script>
</body>
</html>