{ "info": { "author": "piglei", "author_email": "piglei2007@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3" ], "description": "uwsgi-sloth\n===========\n\nuwsgi-sloth is a realtime uwsgi log analyer, designed for helping optimization\nof uwsgi app's performance.\n\nIt can both generates `a static report file `_ \nor analyze your log file in realtime(`demo `_).\n\nImage preview:\n\n.. image:: https://github.com/piglei/uwsgi-sloth/raw/master/uwsgi-sloth-screenshot.png\n\n\nYou should consider using uwsgi-sloth if your website are running under uwsgi\nand have no conception of how slow/fast your website is.\n\nQuickStart\n----------\n\nInstall\n^^^^^^^\n\nuwsgi-sloth is written in python, to install it, simply use pip:\n\n.. code-block:: bash\n\n # Install a stable version\n $ pip install uwsgi-sloth\n\n # Install the latest version from github\n $ pip install -e git+https://github.com/piglei/uwsgi-sloth#egg=uwsgi-sloth\n\n**uwsgi-sloth now only supports Python3.5 and above, for Python2 users, please install uwsgi-sloth<3.0.0 instead.**\n\nStatic report\n^^^^^^^^^^^^^\n\nAfter installation, you can analyzing your uwsgi log using ``uwsgi-sloth analyze``\ncommand.\n\n.. code-block:: bash\n\n # Generate a report\n $ uwsgi-sloth analyze -f uwsgi_access.log --output=report.html\n\n # Specify threshold for request process time\n $ uwsgi-sloth analyze -f uwsgi_access.log --output=report.html --min-msecs=400\n\nCheck more: `uwsgi-sloth analyze`_\n \nRealtime reports\n^^^^^^^^^^^^^^^^\n\nWe do support a more powerful feature: realtime uwsgi log report.\nIt's a little more complicated to configure.\n\nFirst, create a default config file using ``uwsgi-sloth echo_conf``:\n\n.. code-block:: bash\n\n uwsgi-sloth echo_conf > /data/uwsgi_sloth/myblog.conf\n\nThe default config file are like this:\n\n.. code-block:: ini\n\n # A sample uwsgi-sloth config file\n\n # uwsgi log path, only support default log format\n uwsgi_log_path = '/your_uwsgi_logs/web.log'\n\n # All HTML files and data files will store here, must have read/write permissions\n data_dir = '/you_data/uwsgi-sloth/' \n\n # Minimal msecs for detect slow requests, default to 200\n # min_msecs = 200\n\n # Domain for your website, best given\n domain = 'http://www.yourwebsite.com/'\n\n # Custom url regular expressions file\n # url_file = '/your_custom_url_file_path'\n\nAfter modified ``uwsgi_log_path`` and ``data_dir``, your can start uwsgi-sloth\nworker via ``uwsgi-sloth start -c /data/uwsgi_sloth/myblog.conf`` command, if\neverything goes fine, you will see some messages like this: ::\n\n [2014-06-26 01:32:56,851] uwsgi_sloth INFO: Start from last savepoint, last_log_datetime: 2014-06-26 09:32:04\n [2014-06-26 01:32:58,859] uwsgi_sloth INFO: Rendering HTML file /data/uwsgi_sloth/myblog/html/latest_5mins.html...\n ... ...\n\nThis may take several seconds if your log file are big.\n\nDemonize\n~~~~~~~~\n\nuwsgi-sloth does not support built-in deamonize option, so you may need tools like\n`supervisor `_ to manage this process.\n\nServe your reports\n~~~~~~~~~~~~~~~~~~\n\nNow, HTML files have been generated, we should configure our \nwebserver so we can visit it, this configuration is for nginx: ::\n\n\n $ cat /etc/nginx/sites-enabled/sloth_myblog.conf\n server {\n\n listen 80;\n server_name uwsgi-sloth.zlovezl.cn;\n\n location / {\n root /data/uwsgi_sloth/myblog/html/;\n index \"latest_5mins.html\";\n }\n }\n\nAfter reloading your nginx config, open your browser then you will see the fancy\nreports waiting for you.\n\nCommands\n--------\n\nuwsgi-sloth analyze\n^^^^^^^^^^^^^^^^^^^\n\nAvailable arguments\n\n::\n\n usage: uwsgi-sloth analyze [-h] -f FILEPATH [--output OUTPUT]\n [--min-msecs MIN_MSECS] [--domain DOMAIN]\n [--url-file URL_FILE]\n\n optional arguments:\n -h, --help show this help message and exit\n -f FILEPATH, --filepath FILEPATH\n Path of uwsgi log file\n --output OUTPUT HTML report file path\n --min-msecs MIN_MSECS\n Request serve time lower than this value will not be\n counted, default: 200\n --domain DOMAIN Make url in report become a hyper-link by settings a\n domain\n --url-file URL_FILE Customized url rules in regular expression\n --limit-url-groups LIMIT_URL_GROUPS\n Number of url groups considered, default: 200\n --limit-per-url-group LIMIT_PER_URL_GROUP\n Number of urls per group considered, default: 20\n\n\nUsing a customized url rules\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nFirst, get a list of url regular expressions.\n\n::\n\n $ cat url_rules\n # A valid url_rules file are seperated regular expressions\n ^club/(?P\\w+)/(?P\\d+)/(?P\\d+)/signup/$\n ^club/signup/success/$\n ^club/checkin/success/$\n\nUsing `--url-file` to specify this url_rules\n\n::\n\n $ uwsgi-sloth analyze -f uwsgi_access.log --output=report.html --url-file=url_rules\n\nuwsgi-sloth echo_conf\n^^^^^^^^^^^^^^^^^^^^^\n\nPrint a default config file\n\n\nuwsgi-sloth start\n^^^^^^^^^^^^^^^^^\n\nStart uwsgi-sloth worker to generate realtime report\n\n::\n\n $ uwsgi-sloth start -h\n usage: uwsgi-sloth start [-h] -c CONFIG\n\n optional arguments:\n -h, --help show this help message and exit\n -c CONFIG, --config CONFIG\n uwsgi-sloth config file, use \"uwsgi-sloth echo_conf\"\n for a default one\n\nNotes\n-----\n\n- Only default uwsgi log format is supported at present.\n- Tested under python 2.6/2.7\n- By default, uwsgi-sloth will classify ``url_path`` by replacing sequential\n digits part by '(\\d+)': ``/users/3074/`` -> ``/users/(\\d+)``\n\n\nAny feedbacks are greatly welcomed!", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/piglei/uwsgi-sloth", "keywords": "uwsgi log analyzer", "license": "Apache License, Version 2.0", "maintainer": "", "maintainer_email": "", "name": "uwsgi-sloth", "package_url": "https://pypi.org/project/uwsgi-sloth/", "platform": "", "project_url": "https://pypi.org/project/uwsgi-sloth/", "project_urls": { "Homepage": "https://github.com/piglei/uwsgi-sloth" }, "release_url": "https://pypi.org/project/uwsgi-sloth/3.0.2/", "requires_dist": null, "requires_python": "", "summary": "A simple uwsgi access log analyzer", "version": "3.0.2" }, "last_serial": 4878884, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "c8cc209c4a8ca1d40578caa19946bdba", "sha256": "f2dcbcde254e6933f1cbe00c73a0b3e849abeb1deae3a526528e830511fd1e04" }, "downloads": -1, "filename": "uwsgi-sloth-1.0.0.tar.gz", "has_sig": false, "md5_digest": "c8cc209c4a8ca1d40578caa19946bdba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5968, "upload_time": "2014-06-16T06:28:25", "url": "https://files.pythonhosted.org/packages/a2/08/587dc4caa0ec50000807bd69ccf4857e0ad6decee7d4a3e778a6f2ee101f/uwsgi-sloth-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "f5e92202e14133b8341faacdc60aa82f", "sha256": "30e585ffb47636b5647fc03abc273278c2dc64be149fd27a9013dbdd959981e6" }, "downloads": -1, "filename": "uwsgi-sloth-1.0.1.tar.gz", "has_sig": false, "md5_digest": "f5e92202e14133b8341faacdc60aa82f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6231, "upload_time": "2014-06-16T06:40:19", "url": "https://files.pythonhosted.org/packages/d4/d8/ae30ebfaa35b13e5e8ba9d4416ab185c5e7297acd251e5ebeb412951f55f/uwsgi-sloth-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "d2152a99f8fb772158258cea0e08e27c", "sha256": "0f670cdb89b7ad0c1d17f7e2c65939dba27aa1ae67b1729bed428eda004d2891" }, "downloads": -1, "filename": "uwsgi-sloth-1.0.2.tar.gz", "has_sig": false, "md5_digest": "d2152a99f8fb772158258cea0e08e27c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6237, "upload_time": "2014-06-16T06:49:14", "url": "https://files.pythonhosted.org/packages/cf/0a/351aeb92f79935a0cd904e16629a27df52156b26b40621f02bdf6b61534c/uwsgi-sloth-1.0.2.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "bc0f19c74c0b4db78a033cb600bcf489", "sha256": "9e9c067eadec7a39687080d48728d978c20310a612c7d90595d5f43205628561" }, "downloads": -1, "filename": "uwsgi-sloth-2.0.0.tar.gz", "has_sig": false, "md5_digest": "bc0f19c74c0b4db78a033cb600bcf489", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24012, "upload_time": "2014-06-26T16:35:30", "url": "https://files.pythonhosted.org/packages/e7/dd/fd2c8d7e72fba3b3b3cddfe904f52c1118c82b829664fa8de9df3cfb0da4/uwsgi-sloth-2.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "2d2b8c09ba999813bebfacc10d6a0d56", "sha256": "4a60c73e844b2bb859e49ee1e0e1e43d188e13b4512a9fd5484fcff7e44a7789" }, "downloads": -1, "filename": "uwsgi-sloth-2.0.1.tar.gz", "has_sig": false, "md5_digest": "2d2b8c09ba999813bebfacc10d6a0d56", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24121, "upload_time": "2014-06-27T00:47:31", "url": "https://files.pythonhosted.org/packages/e9/f5/6c076d684d24fff5fc2ba29218e3120ca0388ad8c1affe99b745be324919/uwsgi-sloth-2.0.1.tar.gz" } ], "2.0.2": [ { "comment_text": "", "digests": { "md5": "0101f0c33b7e15f661e0c840750b46a6", "sha256": "d13b4c5bd8425ddc2ce0d47bead6c6a9459f0971b793abb4193c67817d0cd3e8" }, "downloads": -1, "filename": "uwsgi-sloth-2.0.2.tar.gz", "has_sig": false, "md5_digest": "0101f0c33b7e15f661e0c840750b46a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24123, "upload_time": "2014-06-27T00:52:44", "url": "https://files.pythonhosted.org/packages/41/ec/767939682ffc28e5dac22c2a4c77b83b9e653192c3d439f43df93ed94603/uwsgi-sloth-2.0.2.tar.gz" } ], "2.1.2": [ { "comment_text": "", "digests": { "md5": "0af05fa65eb686aa53ea054fe7f85650", "sha256": "7950759929522907dd959b77a0bd9d6776417132342f65819b845194bd8d4f5a" }, "downloads": -1, "filename": "uwsgi-sloth-2.1.2.tar.gz", "has_sig": false, "md5_digest": "0af05fa65eb686aa53ea054fe7f85650", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21644, "upload_time": "2015-12-22T02:25:26", "url": "https://files.pythonhosted.org/packages/63/c7/e4daf4ed137de215ce83783ed6dcf5694cdc83c7333666297568c289460f/uwsgi-sloth-2.1.2.tar.gz" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "76056a2b4162dc41a765758205ed11b5", "sha256": "e47034feb2ca557008ac5dca18d1d2ad7681dbc832d92daee7fc13eede27703f" }, "downloads": -1, "filename": "uwsgi_sloth-3.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "76056a2b4162dc41a765758205ed11b5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 26757, "upload_time": "2018-11-18T10:48:36", "url": "https://files.pythonhosted.org/packages/0c/de/26f5dbd56c0f79ba06d30aec0180f71141b8d7593e3b83487232bfa73971/uwsgi_sloth-3.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bfcf1dee524672573950c3775b07ebf3", "sha256": "95c684cd844ec0123325aff7ef15103665f966633a531b3b0457544430df180e" }, "downloads": -1, "filename": "uwsgi-sloth-3.0.0.tar.gz", "has_sig": false, "md5_digest": "bfcf1dee524672573950c3775b07ebf3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22033, "upload_time": "2018-11-18T10:48:38", "url": "https://files.pythonhosted.org/packages/1d/af/685baca216b856aa6d3e4cac01d64d297ebaebfd3ab828ab492dbf4304a3/uwsgi-sloth-3.0.0.tar.gz" } ], "3.0.1": [ { "comment_text": "", "digests": { "md5": "453fe95e90a1f683c9278d1bfda512ea", "sha256": "042d0d1225d65ccd66803da7a395a6b345059b24db07b5104805fb163ff56d48" }, "downloads": -1, "filename": "uwsgi_sloth-3.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "453fe95e90a1f683c9278d1bfda512ea", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 26757, "upload_time": "2018-11-18T10:53:43", "url": "https://files.pythonhosted.org/packages/24/d8/296888f338d9eec753474ec342d7b18baeec4ba50a8d6d6f42c2865c8769/uwsgi_sloth-3.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "174a4a03c1bb752b5c18aa53f1446e94", "sha256": "10bd98353d964a6c5994b48c561e61d0013dbeaf8ae25651e36b531506e1babe" }, "downloads": -1, "filename": "uwsgi-sloth-3.0.1.tar.gz", "has_sig": false, "md5_digest": "174a4a03c1bb752b5c18aa53f1446e94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22034, "upload_time": "2018-11-18T10:53:45", "url": "https://files.pythonhosted.org/packages/30/43/4b9d20880309790d0aadd3e986a01409212597e3582ae6aa26468bb03fb9/uwsgi-sloth-3.0.1.tar.gz" } ], "3.0.2": [ { "comment_text": "", "digests": { "md5": "ff91b6f4b4667d70ad1e051946c5b796", "sha256": "8ac36bca138238ce1ae8a93eabb444e746a237ea364c874d3e2e185e93e33b3e" }, "downloads": -1, "filename": "uwsgi-sloth-3.0.2.tar.gz", "has_sig": false, "md5_digest": "ff91b6f4b4667d70ad1e051946c5b796", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21335, "upload_time": "2019-02-28T11:47:13", "url": "https://files.pythonhosted.org/packages/83/15/e16bed6bd7dbb063c5634c73a7f20382cc44f7c66833fed2e2a910738a8b/uwsgi-sloth-3.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ff91b6f4b4667d70ad1e051946c5b796", "sha256": "8ac36bca138238ce1ae8a93eabb444e746a237ea364c874d3e2e185e93e33b3e" }, "downloads": -1, "filename": "uwsgi-sloth-3.0.2.tar.gz", "has_sig": false, "md5_digest": "ff91b6f4b4667d70ad1e051946c5b796", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21335, "upload_time": "2019-02-28T11:47:13", "url": "https://files.pythonhosted.org/packages/83/15/e16bed6bd7dbb063c5634c73a7f20382cc44f7c66833fed2e2a910738a8b/uwsgi-sloth-3.0.2.tar.gz" } ] }