import uwsgi import time import sys import os def application(env, start_response): print env start_response('200 OK', [('Content-Type', 'text/html')]) yield '

uWSGI %s status

' % uwsgi.version yield 'masterpid: ' + str(uwsgi.masterpid()) + '
' yield 'started on: ' + time.ctime(uwsgi.started_on) + '
' yield 'buffer size: ' + str(uwsgi.buffer_size) + '
' yield 'total_requests: ' + str(uwsgi.total_requests()) + '
' yield 'log size: ' + str(uwsgi.logsize()) + '
' yield 'workers: ' + str(uwsgi.numproc) + '
' yield "cwd: %s
" % os.getcwd() try: yield "mode: %s
" % uwsgi.mode except Exception: pass try: yield "pidfile: %s
" % uwsgi.pidfile except Exception: pass yield "

Hooks

" for h in range(0, 255): if uwsgi.has_hook(h): yield "%d
" % h yield '

dynamic options

' yield '' yield '' workers = uwsgi.workers() yield '

workers

' for w in workers: # print w # print w['running_time'] if w is not None: yield '' print w yield '
worker idpidin requestrequestsrunning timeaddress spacerss
' + str(w['id']) + '' + str(w['pid']) + '' + str(w['pid']) + '' + str(w['requests']) + '' + str(w['running_time']) + '' + str(w['vsz']) + '' + str(w['rss']) + '
' yield "

PYTHONPATH

" yield "" yield "%s" % str(os.uname())