| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/python2.6/site-packages/paste/debug/ |
Upload File : |
Ñò
ÊIc
@ s d Z d d k Z d d k Z d d k Z d d k Z d d k l Z d d k l Z d d k l
Z
d d k l Z l
Z
d d k l Z l Z e d d d
ƒZ d e f d „ ƒ YZ d
„ Z d g Z d „ Z d „ Z d „ Z e d „ Z e i e _ d d „ Z d S( sv
Watches the key ``paste.httpserver.thread_pool`` to see how many
threads there are and report on any wedged threads.
iÿÿÿÿN( t StringIO( t get_ident( t httpexceptions( t
construct_urlt parse_formvars( t HTMLTemplatet bunchsv
<html>
<head>
<style type="text/css">
body {
font-family: sans-serif;
}
table.environ tr td {
border-bottom: #bbb 1px solid;
}
table.environ tr td.bottom {
border-bottom: none;
}
table.thread {
border: 1px solid #000;
margin-bottom: 1em;
}
table.thread tr td {
border-bottom: #999 1px solid;
padding-right: 1em;
}
table.thread tr td.bottom {
border-bottom: none;
}
table.thread tr.this_thread td {
background-color: #006;
color: #fff;
}
a.button {
background-color: #ddd;
border: #aaa outset 2px;
text-decoration: none;
margin-top: 10px;
font-size: 80%;
color: #000;
}
a.button:hover {
background-color: #eee;
border: #bbb outset 2px;
}
a.button:active {
border: #bbb inset 2px;
}
</style>
<title>{{title}}</title>
</head>
<body>
<h1>{{title}}</h1>
{{if kill_thread_id}}
<div style="background-color: #060; color: #fff;
border: 2px solid #000;">
Thread {{kill_thread_id}} killed
</div>
{{endif}}
<div>Pool size: {{nworkers}}
{{if actual_workers > nworkers}}
+ {{actual_workers-nworkers}} extra
{{endif}}
({{nworkers_used}} used including current request)<br>
idle: {{len(track_threads["idle"])}},
busy: {{len(track_threads["busy"])}},
hung: {{len(track_threads["hung"])}},
dying: {{len(track_threads["dying"])}},
zombie: {{len(track_threads["zombie"])}}</div>
{{for thread in threads}}
<table class="thread">
<tr {{if thread.thread_id == this_thread_id}}class="this_thread"{{endif}}>
<td>
<b>Thread</b>
{{if thread.thread_id == this_thread_id}}
(<i>this</i> request)
{{endif}}</td>
<td>
<b>{{thread.thread_id}}
{{if allow_kill}}
<form action="{{script_name}}/kill" method="POST"
style="display: inline">
<input type="hidden" name="thread_id" value="{{thread.thread_id}}">
<input type="submit" value="kill">
</form>
{{endif}}
</b>
</td>
</tr>
<tr>
<td>Time processing request</td>
<td>{{thread.time_html|html}}</td>
</tr>
<tr>
<td>URI</td>
<td>{{if thread.uri == 'unknown'}}
unknown
{{else}}<a href="{{thread.uri}}">{{thread.uri_short}}</a>
{{endif}}
</td>
<tr>
<td colspan="2" class="bottom">
<a href="#" class="button" style="width: 9em; display: block"
onclick="
var el = document.getElementById('environ-{{thread.thread_id}}');
if (el.style.display) {
el.style.display = '';
this.innerHTML = '▾ Hide environ';
} else {
el.style.display = 'none';
this.innerHTML = '▸ Show environ';
}
return false
">▸ Show environ</a>
<div id="environ-{{thread.thread_id}}" style="display: none">
{{if thread.environ:}}
<table class="environ">
{{for loop, item in looper(sorted(thread.environ.items()))}}
{{py:key, value=item}}
<tr>
<td {{if loop.last}}class="bottom"{{endif}}>{{key}}</td>
<td {{if loop.last}}class="bottom"{{endif}}>{{value}}</td>
</tr>
{{endfor}}
</table>
{{else}}
Thread is in process of starting
{{endif}}
</div>
{{if thread.traceback}}
<a href="#" class="button" style="width: 9em; display: block"
onclick="
var el = document.getElementById('traceback-{{thread.thread_id}}');
if (el.style.display) {
el.style.display = '';
this.innerHTML = '▾ Hide traceback';
} else {
el.style.display = 'none';
this.innerHTML = '▸ Show traceback';
}
return false
">▸ Show traceback</a>
<div id="traceback-{{thread.thread_id}}" style="display: none">
<pre class="traceback">{{thread.traceback}}</pre>
</div>
{{endif}}
</td>
</tr>
</table>
{{endfor}}
</body>
</html>
t names watchthreads.page_templatet WatchThreadsc B s5 e Z d Z e d „ Z d „ Z d „ Z d „ Z RS( si
Application that watches the threads in ``paste.httpserver``,
showing the length each thread has been working on a request.
If allow_kill is true, then you can kill errant threads through
this application.
This application can expose private information (specifically in
the environment, like cookies), so it should be protected.
c C s
| | _ d S( N( t
allow_kill( t selfR ( ( s<