ÿØÿà JFIF ÿþ
ÿÛ C
ÿÛ C ÿÀ ÿÄ ÿÄ " #QrÿÄ ÿÄ & 1! A"2qQaáÿÚ ? Øy,æ/3JæÝ¹Èß²Ø5êXw²±ÉyR¾I0ó2PI¾IÌÚiMö¯þrìN&"KgX:íµnTJnLK
@!-ýùúmë;ºgµ&ó±hw¯Õ@Ü9ñ-ë.²1<yà¹ïQÐUÛ?.¦èûbß±©Ö«Âw*V) `$bØÔëXÖ-ËTÜíGÚ3ð«g §¯JxU/ÂÅv_s(Hÿ @TñJÑãõçn!ÈgfbÓc:él[ðQe9ÀPLbÃãCµm[5¿ç'ªjglåÛí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢S x?"¸¦ùYé¨ÒOÈ q`~~ÚtËU¹CÚêV I1Áß_ÿÙ
aNc @ s d Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m
Z
d d l m Z m
Z
d d l m Z m 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 j 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.
iN( t StringIO( t get_ident( t httpexceptions( t
construct_urlt parse_formvars( t HTMLTemplatet bunchsv
{{title}}
{{title}}
{{if kill_thread_id}}
Thread {{kill_thread_id}} killed
{{endif}}
Pool size: {{nworkers}}
{{if actual_workers > nworkers}}
+ {{actual_workers-nworkers}} extra
{{endif}}
({{nworkers_used}} used including current request)
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"])}}
{{for thread in threads}}
|
Thread
{{if thread.thread_id == this_thread_id}}
(this request)
{{endif}} |
{{thread.thread_id}}
{{if allow_kill}}
{{endif}}
|
| Time processing request |
{{thread.time_html|html}} |
| URI |
{{if thread.uri == 'unknown'}}
unknown
{{else}}{{thread.uri_short}}
{{endif}}
|
▸ Show environ
{{if thread.environ:}}
{{for loop, item in looper(sorted(thread.environ.items()))}}
{{py:key, value=item}}
| {{key}} |
{{value}} |
{{endfor}}
{{else}}
Thread is in process of starting
{{endif}}
{{if thread.traceback}}
▸ Show traceback
{{endif}}
|
{{endfor}}
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 ( ( sI /opt/alt/python27/lib/python2.7/site-packages/paste/debug/watchthreads.pyt __init__ s c C s\ d | k r# | d d g d g S| j d d k rH | j | | S| j | | Sd S( Ns paste.httpserver.thread_pools
403 Forbiddens Content-types
text/plainsC You must use the threaded Paste HTTP server to use this applicationt PATH_INFOs /kill( s Content-types
text/plain( t gett killt show( R
t environt start_response( ( sI /opt/alt/python27/lib/python2.7/site-packages/paste/debug/watchthreads.pyt __call__ s c C s | d d g t | } | j d r8 | d } n d } | d } | j } t j } | j j } | j d d g } x | D] \ }
\ } } t }
| j |
| r t
| |
_ n d |
_ |
|
_ t
| | |
_ t |
j |
_ | |
_ t |
|
_ q Wt j d d
d | d t | j d
t | d | d d | d | j d | d t d | j
} | g S( Ns 200 OKs Content-types text/htmlR s paste.httpserver.thread_poolt keyc S s | d d S( Ni i ( ( t v( ( sI /opt/alt/python27/lib/python2.7/site-packages/paste/debug/watchthreads.pyt