Hi Jay,

On 07/12/17 12:28 PM, Jay Wineinger wrote:
I believe this means that the uwsgi module is only available for import to the python interpreter embedded by uwsgi.


Fair enough. I'm not going to use that module anyway.


Could someone tell me if this code is appropriate to get the total amount of live connections in use by uWSGI workers?

import urllib
import demjson

url = 'http://localhost:9001'

fp = urllib.urlopen(url)
json = demjson.decode(fp.read())

connections = 0

for worker in json['workers']:
    connections += worker['requests']

print connections

Thanks,

Etienne


_______________________________________________
uWSGI mailing list
uWSGI@lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to