{ "info": { "author": "Binh Le", "author_email": "lebinh.it@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3" ], "description": "================================================================\n``ngxtop`` - **real-time** metrics for nginx server (and others)\n================================================================\n\n**ngxtop** parses your nginx access log and outputs useful, ``top``-like, metrics of your nginx server.\nSo you can tell what is happening with your server in real-time.\n\n``ngxtop`` tries to determine the correct location and format of nginx access log file by default, so you can just run\n``ngxtop`` and having a close look at all requests coming to your nginx server. But it does not limit you to nginx\nand the default top view. ``ngxtop`` is flexible enough for you to configure and change most of its behaviours.\nYou can query for different things, specify your log and format, even parse remote Apache common access log with ease.\nSee sample usages below for some ideas about what you can do with it.\n\nInstallation\n------------\n\n::\n\n pip install ngxtop\n\n\nNote: ``ngxtop`` is primarily developed and tested with python2 but also supports python3.\n\nUsage\n-----\n\n::\n\n Usage:\n ngxtop [options]\n ngxtop [options] (print|top|avg|sum) \n ngxtop info\n\n Options:\n -l , --access-log access log file to parse.\n -f , --log-format log format as specify in log_format directive.\n --no-follow ngxtop default behavior is to ignore current lines in log\n and only watch for new lines as they are written to the access log.\n Use this flag to tell ngxtop to process the current content of the access log instead.\n -t , --interval report interval when running in follow mode [default: 2.0]\n\n -g , --group-by group by variable [default: request_path]\n -w , --having having clause [default: 1]\n -o , --order-by order of output for default query [default: count]\n -n , --limit limit the number of records included in report for top command [default: 10]\n -a ..., --a ... add exp (must be aggregation exp: sum, avg, min, max, etc.) into output\n\n -v, --verbose more verbose output\n -d, --debug print every line and parsed record\n -h, --help print this help message.\n --version print version information.\n\n Advanced / experimental options:\n -c , --config allow ngxtop to parse nginx config file for log format and location.\n -i , --filter filter in, records satisfied given expression are processed.\n -p , --pre-filter in-filter expression to check in pre-parsing phase.\n\nSamples\n-------\n\nDefault output\n~~~~~~~~~~~~~~\n\n::\n\n $ ngxtop\n running for 411 seconds, 64332 records processed: 156.60 req/sec\n\n Summary:\n | count | avg_bytes_sent | 2xx | 3xx | 4xx | 5xx |\n |---------+------------------+-------+-------+-------+-------|\n | 64332 | 2775.251 | 61262 | 2994 | 71 | 5 |\n\n Detailed:\n | request_path | count | avg_bytes_sent | 2xx | 3xx | 4xx | 5xx |\n |------------------------------------------+---------+------------------+-------+-------+-------+-------|\n | /abc/xyz/xxxx | 20946 | 434.693 | 20935 | 0 | 11 | 0 |\n | /xxxxx.json | 5633 | 1483.723 | 5633 | 0 | 0 | 0 |\n | /xxxxx/xxx/xxxxxxxxxxxxx | 3629 | 6835.499 | 3626 | 0 | 3 | 0 |\n | /xxxxx/xxx/xxxxxxxx | 3627 | 15971.885 | 3623 | 0 | 4 | 0 |\n | /xxxxx/xxx/xxxxxxx | 3624 | 7830.236 | 3621 | 0 | 3 | 0 |\n | /static/js/minified/utils.min.js | 3031 | 1781.155 | 2104 | 927 | 0 | 0 |\n | /static/js/minified/xxxxxxx.min.v1.js | 2889 | 2210.235 | 2068 | 821 | 0 | 0 |\n | /static/tracking/js/xxxxxxxx.js | 2594 | 1325.681 | 1927 | 667 | 0 | 0 |\n | /xxxxx/xxx.html | 2521 | 573.597 | 2520 | 0 | 1 | 0 |\n | /xxxxx/xxxx.json | 1840 | 800.542 | 1839 | 0 | 1 | 0 |\n\nView top source IPs of clients\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n $ ngxtop top remote_addr\n running for 20 seconds, 3215 records processed: 159.62 req/sec\n\n top remote_addr\n | remote_addr | count |\n |-----------------+---------|\n | 118.173.177.161 | 20 |\n | 110.78.145.3 | 16 |\n | 171.7.153.7 | 16 |\n | 180.183.67.155 | 16 |\n | 183.89.65.9 | 16 |\n | 202.28.182.5 | 16 |\n | 1.47.170.12 | 15 |\n | 119.46.184.2 | 15 |\n | 125.26.135.219 | 15 |\n | 125.26.213.203 | 15 |\n\nList 4xx or 5xx responses together with HTTP referer\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n $ ngxtop -i 'status >= 400' print request status http_referer\n running for 2 seconds, 28 records processed: 13.95 req/sec\n\n request, status, http_referer:\n | request | status | http_referer |\n |-----------+----------+----------------|\n | - | 400 | - |\n\nParse apache log from remote server with `common` format\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n $ ssh user@remote_server tail -f /var/log/apache2/access.log | ngxtop -f common\n running for 20 seconds, 1068 records processed: 53.01 req/sec\n\n Summary:\n | count | avg_bytes_sent | 2xx | 3xx | 4xx | 5xx |\n |---------+------------------+-------+-------+-------+-------|\n | 1068 | 28026.763 | 1029 | 20 | 19 | 0 |\n\n Detailed:\n | request_path | count | avg_bytes_sent | 2xx | 3xx | 4xx | 5xx |\n |------------------------------------------+---------+------------------+-------+-------+-------+-------|\n | /xxxxxxxxxx | 199 | 55150.402 | 199 | 0 | 0 | 0 |\n | /xxxxxxxx/xxxxx | 167 | 47591.826 | 167 | 0 | 0 | 0 |\n | /xxxxxxxxxxxxx/xxxxxx | 25 | 7432.200 | 25 | 0 | 0 | 0 |\n | /xxxx/xxxxx/x/xxxxxxxxxxxxx/xxxxxxx | 22 | 698.727 | 22 | 0 | 0 | 0 |\n | /xxxx/xxxxx/x/xxxxxxxxxxxxx/xxxxxx | 19 | 7431.632 | 19 | 0 | 0 | 0 |\n | /xxxxx/xxxxx/ | 18 | 7840.889 | 18 | 0 | 0 | 0 |\n | /xxxxxxxx/xxxxxxxxxxxxxxxxx | 15 | 7356.000 | 15 | 0 | 0 | 0 |\n | /xxxxxxxxxxx/xxxxxxxx | 15 | 9978.800 | 15 | 0 | 0 | 0 |\n | /xxxxx/ | 14 | 0.000 | 0 | 14 | 0 | 0 |\n | /xxxxxxxxxx/xxxxxxxx/xxxxx | 13 | 20530.154 | 13 | 0 | 0 | 0 |", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lebinh/ngxtop", "keywords": "cli monitoring nginx system", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "ngxtop", "package_url": "https://pypi.org/project/ngxtop/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ngxtop/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/lebinh/ngxtop" }, "release_url": "https://pypi.org/project/ngxtop/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "Real-time metrics for nginx server", "version": "0.0.2" }, "last_serial": 1055545, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "cbc34e42d6fb52ee71b4fb3880fe6968", "sha256": "ac4499b62a65f799059458959c7ebdc5cbb7765bef0be0a5b0d142da8015d98e" }, "downloads": -1, "filename": "ngxtop-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cbc34e42d6fb52ee71b4fb3880fe6968", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 11192, "upload_time": "2014-03-24T17:15:40", "url": "https://files.pythonhosted.org/packages/f6/10/4bc197028b86c3602e14934fef81f6a13952195db50b4a07348e8881aaaa/ngxtop-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e4163a8224dd7f89d6f99a077aa09236", "sha256": "c0665429e6d31b3fbc5b43d470d85f7d86721862f34b467400363097829c74b0" }, "downloads": -1, "filename": "ngxtop-0.0.1.tar.gz", "has_sig": false, "md5_digest": "e4163a8224dd7f89d6f99a077aa09236", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7671, "upload_time": "2014-03-24T17:15:25", "url": "https://files.pythonhosted.org/packages/c6/2c/ccc595c1e104e39a5c5dcfdb11f9b9944864afe53e38075bc5f5774b1c70/ngxtop-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "488ac409fb978183cfe611470b1eb0e5", "sha256": "012e2254cd2a5ac0ab96d92e76f97c6ecf611ee3296fc87467c97544d0aee7ba" }, "downloads": -1, "filename": "ngxtop-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "488ac409fb978183cfe611470b1eb0e5", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 14166, "upload_time": "2014-04-09T03:40:52", "url": "https://files.pythonhosted.org/packages/c7/20/9aafbe173b596dfbc996f1b8b957da88d160cf1c5279179d3b4990f40e00/ngxtop-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9758ff9c8163024a5a9b30df9fb6eedc", "sha256": "33c029075bc9a7f37c48564557218f9c0579d49c14bc01d51ab418deaa34181b" }, "downloads": -1, "filename": "ngxtop-0.0.2.tar.gz", "has_sig": false, "md5_digest": "9758ff9c8163024a5a9b30df9fb6eedc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9469, "upload_time": "2014-04-09T03:40:31", "url": "https://files.pythonhosted.org/packages/0d/5f/b688dc2745af4070a904ee0154484fd9ec14807d2fbaa929df89744c47c1/ngxtop-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "488ac409fb978183cfe611470b1eb0e5", "sha256": "012e2254cd2a5ac0ab96d92e76f97c6ecf611ee3296fc87467c97544d0aee7ba" }, "downloads": -1, "filename": "ngxtop-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "488ac409fb978183cfe611470b1eb0e5", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 14166, "upload_time": "2014-04-09T03:40:52", "url": "https://files.pythonhosted.org/packages/c7/20/9aafbe173b596dfbc996f1b8b957da88d160cf1c5279179d3b4990f40e00/ngxtop-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9758ff9c8163024a5a9b30df9fb6eedc", "sha256": "33c029075bc9a7f37c48564557218f9c0579d49c14bc01d51ab418deaa34181b" }, "downloads": -1, "filename": "ngxtop-0.0.2.tar.gz", "has_sig": false, "md5_digest": "9758ff9c8163024a5a9b30df9fb6eedc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9469, "upload_time": "2014-04-09T03:40:31", "url": "https://files.pythonhosted.org/packages/0d/5f/b688dc2745af4070a904ee0154484fd9ec14807d2fbaa929df89744c47c1/ngxtop-0.0.2.tar.gz" } ] }