一个zc.z3monitor扩展,用于跟踪zope3服务器线程活动

ztfy.monitor的Python项目详细描述


======
ztfy.monitor包内容:

ztfy.monitor是什么?
==

它向监视控制台添加了一个"threads"命令,以查看zope服务器实际在做什么,即使所有线程都很忙,服务器无法响应任何请求。

它的主要代码基于DeadlockDebugger,由Nuxeo为Zope2应用程序服务器开发。






==



此包可以通过zc.monitor ngi服务器使用;请阅读此包的配置以了解其配置。


继续将ztfy.monitor包包含到应用程序配置中:::

<;include package="ztfy.monitor"/>;

通过在端口8081上运行的监视器上使用"netcat"
应用程序::


$echo"threads"nc localhost 8081
2008-11-03 21:50:46的线程回溯转储


thread-1210468160:
文件"./bin/paster",第151行,在?
paste.script.command.run()
file"/var/local/src/ztfy/lib/python2.4/site packages/pastescript-1.6.2-py2.4.egg/paste/script/command.py",第79行,运行时调用(命令、命令名、选项,args[1:]
文件"/var/local/src/ztfy/lib/python2.4/site packages/paste script-1.6.2-py2.4.egg/paste/script/command.py",第118行,在invoke
exit_code=runner.run(args)
file/var/local/src/ztfy/lib/python2.4/site packages/paste script-1.6.2-py2.4.egg/paste/script/command.py"第213行,运行
result=self.command()
file"/var/local/src/ztfy/lib/python2.4/site packages/paste script-1.6.2-py2.4.egg/paste/script/serve.py",第257行,在命令中
server(app)
file"/var/local/src/ztfy/lib/python2.4/site packages/paste deploy-1.3.1-py2.4.egg/paste/deploy/loadwsgi.py",第139行,在服务器包装器中
wsgi-app,context.global-conf,
文件"/var/local/src/ztfy/lib/python2.4/site packages/paste deploy-1.3.1-py2.4.egg/paste/deploy/util/fixtypeerror.py",第57行,在fix调用中
val=callable(*args,**kw)
文件"/var/local/src/ztfy/lib/python2.4/site packages/paste-1.6-py2.4.egg/paste/httpserver.py",第1314行,服务器端
服务(wsgi_app,**kwargs)
文件"/var/local/src/ztfy/lib/python2.4/site packages/paste-1.6-py2.4.egg/paste/httpserver.py",第1282行,在serve
server.serve_forever()
file"/var/local/src/ztfy/lib/python2.4/site packages/paste-1.6-py2.4.egg/paste/httpserver.py"中,第1066行,在serve_forever
self.handle_request()
file"/usr/lib/python2.4/socketserver.py"中,第217行,在handle嫒request
request中,client嫒address=self.get嫒request()
file"/var/local/src/ztfy/lib/python2.4/site packages/paste-1.6-py2.4.egg/paste/httpserver.py",第1100行,在get嫒request
(conn,info)=securehttpserver.get嫒request(self)
文件"/var/local/src/ztfy/lib/python2.4/site packages/paste-1.6-py2.4.egg/paste/httpserver.py",第378行,在get_请求中
(conn,info)=self.socket.accept()
file"/usr/lib/python2.4/socket.py",第161行,在accept
sock中,addr=self.\sock.accept()

thread-1303708784:
file"/usr/lib/python2.4/threading.py",第442行,在bootstrap中
self.run()
文件"/usr/lib/python2.4/threading.py",第422行,在run
self.\u target(*self.\u args,**self.\uu kwargs)
文件"/var/local/src/ztfy/lib/python2.4/site packages/paste-1.6-py2.4.egg/paste/httpserver.py",第851行,在worker\u线程回调中
可运行=self.queue.get()
文件"/usr/lib/python2.4/queue.py",第119行,get
self.not_empty.wait()
文件"/usr/lib/python2.4/threading.py",第203行,在等待中
waiter.acquire()


thread-1295316080:



它的url写在第一行::

thread-1303708784(get/+apidoc++/interface/ztfy.app.test.test.idocument/index.html):
file/usr/lib/python2.4/threading.py",第442行,在"bootstrap
self.run()
文件"/usr/lib/python2.4/threading.py",第422行,在"run
self.\uu target(*self.\uu args,**self.\uu kwargs)
文件"/var/local/src/ztfy/lib/python2.4/site packages/paste-1.6-py2.4.egg/paste/httpserver.py",第863行,在worker_thread_callback中
runnable()
file"/var/local/src/ztfy/lib/python2.4/site packages/paste-1.6-py2.4.egg/paste/httpserver.py",第1037行,in<;lambda>;
lambda:self.process_request_in_thread(请求,客户端地址))
文件"/var/local/src/ztfy/lib/python2.4/site packages/paste-1.6-py2.4.egg/paste/httpserver.py",第1053行,进程中的请求在线程中
self.finish请求(请求,客户端地址)
文件"/usr/lib/python2.4/socketserver.py",第254行,在finish_request
self.requesthandlerclass(request,client_address,self)
file"/usr/lib/python2.4/socketserver.py"行521,在"/var/local/src/ztfy/lib/python2.4/site packages/paste-1.6-py2.4.egg/paste/httpserver.py"文件"/usr/lib/python2.4/basehttpserver.py"中,第432行,在handle
basehttprequesthandler.handle(self)文件"/usr/lib/python2.4/basehttpserver.py"中,第316行,在handle
self.handle_one_request()
文件"/var/local/src/ztfy/lib/python2.4/site packages/paste-1.6-py2.4.egg/paste/httpserver.py",第427行,在handle_one_request中
self.wsgi_execute()
file"/var/local/src/ztfy/lib/python2.4/site packages/paste-1.6-py2.4.egg/paste/httpserver.py",第287行,在wsgi_中,执行
self.wsgi_start_response)
文件"build/bdist.darwin-8.10.1-i386/egg/z3c/evalexception.py",第10行,在"调用"文件"/var/local/src/ztfy/lib/python2.4/site packages/paste-1.6-py2.4.egg/paste/evalexception/middleware.py"第186行,在"调用"中返回self.respond(environ,start-response)
file/var/local/src/ztfy/lib/python2.4/site packages/paste-1.6-py2.4.egg/paste/evalexception/middleware.py",第306行,in respond
app-iter=self.application(environ,detect_start_response)
文件"/var/local/src/ztfy/eggs/zope.app.wsgi-3.4.0-py2.4.egg/zope/app/wsgi/uu init_uuuu.py",第54行,在uu call_uuu中,
请求=发布(请求,handle_errors=handle_errors)
文件"/var/local/src/ztfy/eggs/tmp4szhyv/zope.publisher-3.5.0a1.dev_-py2.4.egg/zope/publisher/publish.py",第133行,在publish
file"/var/local/src/ztfy/eggs/tmpuiar4e/zope.app.publication-3.4.3-py2.4.egg/zope/app/publication/zopepublication.py"中,第167行,在callobject
file"/var/local/src/ztfy/eggs"中/tmp4szhyv/zope.publisher-3.5.0a1.dev泺r78838-py2.4.egg/zope/publisher/publish.py",第108行,在mapply
file"/var/local/src/ztfy/eggs/tmp4szhyv/zope.publisher-3.5.0a1.dev泺r78838-py2.4.egg/zope/publisher/publish.py"第114行,在调试调用中
file"/var/local/src/ztfy/egons/zope.app.pagetemplate-3.4.0-py2.4.egg/zope/app/pagetemplate/simpleviewclass.py",第44行,在调用中返回self.index(*args,**kw)
文件"/var/local/src/ztfy/eggs/zope.app.pagetemplate-3.4.0-py2.4.egg/zope/app/pagetemplate/viewpagetemplatefile.py",第83行,在"调用"中
返回self.im func(im self,*args,**kw)
文件"/var/local/src/ztfy/eggs/zope.app.pagetemplate-3.4.0-py2.4.egg/zope/app/pagetemplate/viewpagetemplatefile.py",第51行,在"调用"中
sourceannotations=getattr(调试标志,"sourceannotations",0),
文件"/var/local/src/ztfy/eggs/tmpvyyyyhpw/zope.pagetemplate-3.4.0-py2.4.egg/zope/pagetemplate/pagetemplate.py",第115行,在pt_render中
文件"/var/local/src/ztfy/eggs/tmpuxe0uv/zope.tal-3.4.1-py2.4.egg/zope/tal/talinterpreter.py",第271行,在"call"文件"/var/local/src/ztfy/eggs/tmpuxe0uv/zope.tal-3.4.1-py2.4.egg/zope/tal/talinterpreter.py"第346行中,在"解释"文件"/var/local/src/ztfy/eggs/tmpuxe0uv/zope.tal-3.4.1-py2.4.egg/zope/tal/talinterpreter.py"第891行中,当然,在dou-usemacro


即使每台服务器的线程当前正忙,并且当服务器无法提供任何Web请求时,也可以使用该服务。




==


0.1
--
-初始版本

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何在jetty请求日志中添加milliscond字段?   java在使用Scanner类从文件读取信息时遇到问题   为什么。类不适用于泛型类型?   SQLite插入上的java空指针异常   java能告诉我们Guava缓存是在禁用统计数据的情况下构建的吗?   java在应用程序中使用常量   java无法使用AutoIT和Selenium Webdriver在所需位置/文件夹保存图像   java如何在jtable中更新jprogress栏   java是比较给定日期和当前日期(在给定时区中没有时间段)的最佳方法   安卓代码中的java错误   java无法访问实体类中的字段   java如何在tomcat中处理三个JDBC连接池?   java无法使用Spring Security保护AngularJS页面   如何在没有TCP/IP协议栈的情况下用Java发送以太帧